1 | <?php |
||
2 | |||
3 | abstract class Model extends Cortex |
||
0 ignored issues
–
show
|
|||
4 | { |
||
5 | protected $app; |
||
6 | protected $db = 'DB'; |
||
7 | protected $fieldConf = array( |
||
8 | 'created_at' => array( |
||
9 | 'type' => Schema::DT_TIMESTAMP, |
||
0 ignored issues
–
show
The type
Schema was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
10 | 'default' => Schema::DF_CURRENT_TIMESTAMP |
||
11 | ), |
||
12 | 'updated_at' => array( |
||
13 | 'type' => Schema::DT_TIMESTAMP, |
||
14 | 'default' => '0-0-0 0:0:0' |
||
15 | ), |
||
16 | 'deleted_at' => array( |
||
17 | 'type' => Schema::DT_TIMESTAMP, |
||
18 | 'default' => '0-0-0 0:0:0' |
||
19 | ) |
||
20 | ); |
||
21 | |||
22 | public function __construct() |
||
23 | { |
||
24 | if (property_exists($this, 'fields')) { |
||
25 | $this->fieldConf = array_merge($this->fields, $this->fieldConf); |
||
26 | } |
||
27 | |||
28 | parent::__construct(); |
||
29 | $this->app = f3(); |
||
30 | //$this->beforesave($this->validate(get_called_class())); |
||
31 | } |
||
32 | |||
33 | /*private function validate($caller, $parent) { |
||
34 | $valid = true; |
||
35 | foreach($this->getFieldConfiguration() as $field => $conf) { |
||
36 | if(isset($conf['type']) && !isset($conf['relType'])){ |
||
37 | $val = $this->get($field); |
||
38 | $model = strtolower(str_replace('\\','.',$class)); |
||
39 | // check required fields |
||
40 | if ($valid && isset($conf['required'])) |
||
41 | $valid = \Validation::instance()->required($val,$field,'error.'.$model.'.'.$field); |
||
42 | // check unique |
||
43 | if ($valid && isset($conf['unique'])) |
||
44 | $valid = \Validation::instance()->unique($self,$val,$field,'error.'.$model.'.'.$field); |
||
45 | if (!$valid) |
||
46 | break; |
||
47 | } |
||
48 | } |
||
49 | return $valid; |
||
50 | }*/ |
||
51 | } |
||
52 |
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