Skip to content

Commit 580a5c6

Browse files
committedAug 13, 2021
add enforce query convention
1 parent 577a859 commit 580a5c6

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
 

‎composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"require-dev": {
4040
"facade/ignition": "^2.5",
4141
"fakerphp/faker": "^1.9.1",
42+
"imanghafoori/laravel-microscope": "^1.0",
4243
"laravel/sail": "^1.0.1",
4344
"mockery/mockery": "^1.4.2",
4445
"nunomaduro/collision": "^5.0",

‎search_replace.php

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
return [
4+
"'<1:name>'::'<2:name>'" => [
5+
'name' => 'enforce_query',
6+
'replace' => "'<1>'::query()->'<2>'",
7+
'filters' => [
8+
1 => [
9+
'is_subclass_of' => 'Illuminate\Database\Eloquent\Model'
10+
],
11+
2 => [
12+
"in_array" => [
13+
'where', 'count', 'find', 'findOrNew', 'findOrFail'
14+
]
15+
]
16+
]
17+
],
18+
];

0 commit comments

Comments
 (0)
Please sign in to comment.