1 | <?php |
||
2 | |||
3 | namespace mindplay\sql\model\schema; |
||
4 | |||
5 | use mindplay\sql\model\TableFactory; |
||
6 | |||
7 | /** |
||
8 | * This is an abstract base-class for user-defined Schema-types. |
||
9 | */ |
||
10 | abstract class Schema |
||
11 | { |
||
12 | private TableFactory $factory; |
||
13 | |||
14 | 1 | public function __construct(TableFactory $factory) |
|
15 | { |
||
16 | 1 | $this->factory = $factory; |
|
17 | } |
||
18 | |||
19 | /** |
||
20 | * This name is used to qualify table-references, e.g. using schema-names in Postgres, or |
||
21 | * table-name prefixes in MySQL. |
||
22 | * |
||
23 | * The default implementation returns NULL - override this in your Schema implementation, if needed. |
||
24 | * |
||
25 | * @return string|null optional Schema-name, or NULL |
||
26 | */ |
||
27 | public function getName(): string|null |
||
28 | { |
||
29 | return null; |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @param $class_name Table class-name |
||
34 | * @param $table_name relational table-name |
||
0 ignored issues
–
show
|
|||
35 | * @param $alias optional Table alias |
||
0 ignored issues
–
show
The type
mindplay\sql\model\schema\optional 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 ![]() |
|||
36 | */ |
||
37 | 1 | protected function createTable(string $class_name, string $table_name, string|null $alias = null): Table |
|
38 | { |
||
39 | 1 | return $this->factory->createTable($this, $class_name, $table_name, $alias); |
|
40 | } |
||
41 | |||
42 | /** |
||
43 | * @ignore |
||
44 | * |
||
45 | * @param string $name |
||
46 | * |
||
47 | * @return Table |
||
48 | */ |
||
49 | 1 | public function __get($name) |
|
50 | { |
||
51 | // TODO caching |
||
52 | |||
53 | 1 | return $this->$name(null); |
|
54 | } |
||
55 | } |
||
56 |
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