1 | <?php |
||
16 | abstract class Generic |
||
17 | { |
||
18 | /** Generated classes namespace prefix */ |
||
19 | const GENERATED_NAMESPACE = '\samsonframework\orm\generated\\'; |
||
20 | |||
21 | /** @var string Generated class name */ |
||
22 | public $className; |
||
23 | |||
24 | /** @var string Generated parent class */ |
||
25 | protected $parentClass; |
||
26 | |||
27 | /** @var Generator Code generation instance */ |
||
28 | protected $generator; |
||
29 | |||
30 | /** @var \samsonframework\ormgenerator\metadata\GenericMetadata Entity query Generic */ |
||
31 | protected $metadata; |
||
32 | |||
33 | /** |
||
34 | * OOP constructor. |
||
35 | * |
||
36 | * @param Generator $generator Code generation instance |
||
37 | * @param \samsonframework\orm\generator\metadata\GenericMetadata $Generic Entity query metadata |
||
|
|||
38 | */ |
||
39 | public function __construct(Generator $generator, $metadata) |
||
45 | |||
46 | /** |
||
47 | * Generic class generation. |
||
48 | * |
||
49 | * @param Generic|metadata\GenericMetadata $metadata Entity metadata |
||
50 | * |
||
51 | * @return string Generated PHP class code |
||
52 | */ |
||
53 | public function generate(Generic $metadata = null) |
||
68 | |||
69 | /** |
||
70 | * Class uses generation part. |
||
71 | * |
||
72 | * @param \samsonframework\orm\generator\metadata\GenericMetadata $metadata Entity metadata |
||
73 | */ |
||
74 | protected function createUses($metadata) |
||
78 | |||
79 | /** |
||
80 | * Class definition generation part. |
||
81 | * |
||
82 | * @param \samsonframework\orm\generator\metadata\GenericMetadata $metadata Entity metadata |
||
83 | */ |
||
84 | abstract protected function createDefinition($metadata); |
||
85 | |||
86 | /** |
||
87 | * Class constants generation part. |
||
88 | * |
||
89 | * @param \samsonframework\orm\generator\metadata\GenericMetadata $metadata Entity metadata |
||
90 | */ |
||
91 | protected function createConstants($metadata) |
||
95 | |||
96 | /** |
||
97 | * Class static fields generation part. |
||
98 | * |
||
99 | * @param \samsonframework\orm\generator\metadata\GenericMetadata $metadata Entity metadata |
||
100 | */ |
||
101 | protected function createStaticFields($metadata) |
||
105 | |||
106 | /** |
||
107 | * Class static methods generation part. |
||
108 | * |
||
109 | * @param \samsonframework\orm\generator\metadata\GenericMetadata $metadata Entity metadata |
||
110 | */ |
||
111 | protected function createStaticMethods($metadata) |
||
115 | |||
116 | /** |
||
117 | * Class fields generation part. |
||
118 | * |
||
119 | * @param \samsonframework\orm\generator\metadata\GenericMetadata $metadata Entity metadata |
||
120 | */ |
||
121 | protected function createFields($metadata) |
||
125 | |||
126 | /** |
||
127 | * Class methods generation part. |
||
128 | * |
||
129 | * @param \samsonframework\orm\generator\metadata\GenericMetadata $metadata Entity metadata |
||
130 | */ |
||
131 | protected function createMethods($metadata) |
||
135 | |||
136 | /** |
||
137 | * Class constructor generation part. |
||
138 | * |
||
139 | * @param \samsonframework\orm\generator\metadata\GenericMetadata $metadata Entity metadata |
||
140 | */ |
||
141 | protected function createConstructor($metadata) |
||
145 | } |
||
146 | //[PHPCOMPRESSOR(remove,end)] |
||
147 |
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.