1 | <?php |
||
35 | trait Primitives |
||
36 | { |
||
37 | |||
38 | /** |
||
39 | * |
||
40 | * @var array $spheres |
||
41 | */ |
||
42 | protected $spheres = array(); |
||
43 | |||
44 | /** |
||
45 | * |
||
46 | * @var array $boxes |
||
47 | */ |
||
48 | protected $boxes = array(); |
||
49 | |||
50 | /** |
||
51 | * |
||
52 | * @var array $cylinders |
||
53 | */ |
||
54 | protected $cylinders = array(); |
||
55 | |||
56 | /** |
||
57 | * |
||
58 | * @var array $planes |
||
59 | */ |
||
60 | protected $planes = array(); |
||
61 | |||
62 | /** |
||
63 | * |
||
64 | * @var \AframeVR\Extras\Primitives\Sky $sky |
||
65 | */ |
||
66 | protected $sky; |
||
67 | |||
68 | /** |
||
69 | * A-Frame Primitive box |
||
70 | * |
||
71 | * @param string $name |
||
72 | * @return Entity |
||
73 | */ |
||
74 | 9 | public function box(string $name = 'untitled'): Entity |
|
78 | |||
79 | /** |
||
80 | * A-Frame Primitive sphere |
||
81 | * |
||
82 | * @param string $name |
||
83 | * @return Entity |
||
84 | */ |
||
85 | 5 | public function sphere(string $name = 'untitled'): Entity |
|
89 | |||
90 | /** |
||
91 | * A-Frame Primitive cylinder |
||
92 | * |
||
93 | * @param string $name |
||
94 | * @return Entity |
||
95 | */ |
||
96 | 5 | public function cylinder(string $name = 'untitled'): Entity |
|
100 | |||
101 | /** |
||
102 | * A-Frame Primitive plane |
||
103 | * |
||
104 | * @param string $name |
||
105 | * @return Entity |
||
106 | */ |
||
107 | 5 | public function plane(string $name = 'untitled'): Entity |
|
111 | |||
112 | /** |
||
113 | * A-Frame Primitive sky |
||
114 | * |
||
115 | * @return Entity |
||
116 | */ |
||
117 | 5 | public function sky(): Entity |
|
121 | |||
122 | /** |
||
123 | * Add all used primitevs to the scene |
||
124 | * |
||
125 | * @param \DOMDocument $aframe_dom |
||
|
|||
126 | * @param \DOMElement $scene |
||
127 | * @return void |
||
128 | */ |
||
129 | 3 | protected function preparePrimitives() |
|
140 | } |
||
141 |
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.