| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function init() |
||
| 16 | { |
||
| 17 | parent::init(); |
||
| 18 | |||
| 19 | $this->addFields([ |
||
| 20 | 'name' => ['type' => 'string'], |
||
| 21 | 'position' => ['type' => 'integer', 'default' => 0] |
||
| 22 | ]); |
||
| 23 | |||
| 24 | $this->hasOne('user', [User::class, 'our_field' => 'user_id']); |
||
| 25 | |||
| 26 | $this->hasMany('applets', [DashboardApplet::class, 'their_field' => 'dashboard_id']); |
||
| 27 | |||
| 28 | $this->addHook('beforeDelete', function($id) { |
||
| 29 | $this->withID($id)->ref('applets')->action('delete')->execute(); |
||
| 30 | }); |
||
| 33 |
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