1 | <?php |
||
2 | |||
3 | require __DIR__.'/../vendor/autoload.php'; |
||
4 | require __DIR__.'/config.php'; |
||
5 | require __DIR__.'/Models/User.php'; |
||
6 | |||
7 | /* NOTE: in case of error an exception is thrown */ |
||
8 | |||
9 | use HnrAzevedo\Datamanager\DatamanagerException; |
||
10 | use Model\User; |
||
0 ignored issues
–
show
|
|||
11 | |||
12 | try{ |
||
13 | $entity = new User(); |
||
14 | |||
15 | /* Remove by cause *Where* */ |
||
16 | $entity->remove()->where([ |
||
17 | ['name','=','Other Name'], |
||
18 | 'OR' => ['email','LIKE','[email protected]'] |
||
19 | ])->execute(); |
||
20 | |||
21 | /* Remove by primary key */ |
||
22 | /* NOTE: Required to have already returned a query */ |
||
23 | $entity->remove()->execute(); |
||
24 | /* OR */ |
||
25 | $entity->remove(true); |
||
26 | |||
27 | }catch(DatamanagerException $er){ |
||
28 | |||
29 | die("Code Error: {$er->getCode()}, Line: {$er->getLine()}, File: {$er->getFile()}, Message: {$er->getMessage()}."); |
||
30 | |||
31 | } |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths