1 | <?php |
||
9 | class RepositorySettings |
||
10 | { |
||
11 | 12 | public static function fromAnnotation($model, Reader $reader) |
|
45 | |||
46 | /** @var string */ |
||
47 | protected $table; |
||
48 | |||
49 | /** @var string */ |
||
50 | protected $model; |
||
51 | |||
52 | /** @var array */ |
||
53 | protected $columns = []; |
||
54 | |||
55 | /** @var array */ |
||
56 | protected $casts = []; |
||
57 | |||
58 | /** @var string */ |
||
59 | protected $identifier = 'id'; |
||
60 | |||
61 | /** @var bool */ |
||
62 | protected $increments = true; |
||
63 | |||
64 | /** |
||
65 | * @example |
||
66 | * [ |
||
67 | * 'model' => RepositoryTestActor::class, |
||
68 | * 'table' => 'actor', |
||
69 | * 'columns' => [ |
||
70 | * 'id' => 'act_id', |
||
71 | * 'firstName' => 'first_name', |
||
72 | * 'lastName' => 'last_name', |
||
73 | * 'lastUpdate' => 'last_update', |
||
74 | * ], |
||
75 | * 'identifier' => 'id', |
||
76 | * 'increments' => true, |
||
77 | * ] |
||
78 | * @param string $table |
||
79 | * @param array $settings |
||
80 | */ |
||
81 | 12 | public function __construct($table, array $settings = []) |
|
88 | |||
89 | /** |
||
90 | * @return string |
||
91 | */ |
||
92 | 7 | public function getTable() |
|
96 | |||
97 | /** |
||
98 | * @return string |
||
99 | */ |
||
100 | 10 | public function getModel() |
|
104 | |||
105 | /** |
||
106 | * @return array |
||
107 | */ |
||
108 | 11 | public function getColumns() |
|
112 | |||
113 | /** |
||
114 | * @return string |
||
115 | */ |
||
116 | 2 | public function getIdentifier() |
|
120 | |||
121 | /** |
||
122 | * @return boolean |
||
123 | */ |
||
124 | 1 | public function isIncrements() |
|
128 | |||
129 | /** |
||
130 | * @return array |
||
131 | */ |
||
132 | 10 | public function getCasts() |
|
136 | } |
||
137 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.