1 | <?php |
||
16 | abstract class Generic |
||
17 | { |
||
18 | /** @var Generator Code generation instance */ |
||
19 | protected $generator; |
||
20 | |||
21 | /** @var \samsoncms\api\generator\metadata\Generic Entity query Generic */ |
||
22 | protected $metadata; |
||
23 | |||
24 | /** |
||
25 | * OOP constructor. |
||
26 | * |
||
27 | * @param Generator $generator Code generation instance |
||
28 | * @param \samsoncms\api\generator\metadata\Generic $Generic Entity query metadata |
||
|
|||
29 | */ |
||
30 | public function __construct(Generator $generator, $metadata) |
||
35 | |||
36 | /** |
||
37 | * Generic class generation. |
||
38 | * |
||
39 | * @param \samsoncms\api\generator\metadata\Generic $metadata Entity metadata |
||
40 | * |
||
41 | * @return string Generated PHP class code |
||
42 | */ |
||
43 | public function generate(Generic $metadata = null) |
||
58 | |||
59 | /** |
||
60 | * Class uses generation part. |
||
61 | * |
||
62 | * @param \samsoncms\api\generator\metadata\Generic $metadata Entity metadata |
||
63 | */ |
||
64 | protected function createUses($metadata) |
||
68 | |||
69 | /** |
||
70 | * Class definition generation part. |
||
71 | * |
||
72 | * @param \samsoncms\api\generator\metadata\Generic $metadata Entity metadata |
||
73 | */ |
||
74 | abstract protected function createDefinition($metadata); |
||
75 | |||
76 | /** |
||
77 | * Class constants generation part. |
||
78 | * |
||
79 | * @param \samsoncms\api\generator\metadata\Generic $metadata Entity metadata |
||
80 | */ |
||
81 | protected function createConstants($metadata) |
||
85 | |||
86 | /** |
||
87 | * Class static fields generation part. |
||
88 | * |
||
89 | * @param \samsoncms\api\generator\metadata\Generic $metadata Entity metadata |
||
90 | */ |
||
91 | protected function createStaticFields($metadata) |
||
95 | |||
96 | /** |
||
97 | * Class static methods generation part. |
||
98 | * |
||
99 | * @param \samsoncms\api\generator\metadata\Generic $metadata Entity metadata |
||
100 | */ |
||
101 | protected function createStaticMethods($metadata) |
||
105 | |||
106 | /** |
||
107 | * Class fields generation part. |
||
108 | * |
||
109 | * @param \samsoncms\api\generator\metadata\Generic $metadata Entity metadata |
||
110 | */ |
||
111 | protected function createFields($metadata) |
||
115 | |||
116 | /** |
||
117 | * Class methods generation part. |
||
118 | * |
||
119 | * @param \samsoncms\api\generator\metadata\Generic $metadata Entity metadata |
||
120 | */ |
||
121 | protected function createMethods($metadata) |
||
125 | |||
126 | /** |
||
127 | * Class constructor generation part. |
||
128 | * |
||
129 | * @param \samsoncms\api\generator\metadata\Generic $metadata Entity metadata |
||
130 | */ |
||
131 | protected function createConstructor($metadata) |
||
135 | } |
||
136 | //[PHPCOMPRESSOR(remove,end)] |
||
137 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.