Skip to content

Instantly share code, notes, and snippets.

@josephzidell
Created February 7, 2014 15:01
Show Gist options
  • Select an option

  • Save josephzidell/8864311 to your computer and use it in GitHub Desktop.

Select an option

Save josephzidell/8864311 to your computer and use it in GitHub Desktop.
Sublime Search / Replace `$this->Model->exists(...) { throw ...}` to `$this->Model->check(...);`
Search:
```
(s?)\$this->(.*)->id = \$(.*);\n.*if \(!\$this->.*->exists\(\)\) \{\n.*throw new NotFoundException\(__\((.*)\)\);\n.*\}
```
Replace:
```
$this->\2->check($\3, \4);
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment