1 | <?php |
||
29 | class Light extends Entity implements LightPrimitiveIF |
||
30 | { |
||
31 | |||
32 | /** |
||
33 | * Init |
||
34 | * |
||
35 | * {@inheritdoc} |
||
36 | * |
||
37 | * @return void |
||
38 | */ |
||
39 | 6 | public function init() |
|
44 | |||
45 | 6 | public function defaults() |
|
48 | |||
49 | /** |
||
50 | * light.angle |
||
51 | * |
||
52 | * {@inheritdoc} |
||
53 | * |
||
54 | * @param float $angle |
||
|
|||
55 | * @return LightPrimitiveIF |
||
56 | */ |
||
57 | 1 | public function angle(float $angle = 60): LightPrimitiveIF |
|
62 | |||
63 | /** |
||
64 | * light.color |
||
65 | * |
||
66 | * {@inheritdoc} |
||
67 | * |
||
68 | * @param string $color |
||
69 | * @return LightPrimitiveIF |
||
70 | */ |
||
71 | 4 | public function color(string $color = '#fff'): LightPrimitiveIF |
|
76 | |||
77 | /** |
||
78 | * light.decay |
||
79 | * |
||
80 | * {@inheritdoc} |
||
81 | * |
||
82 | * @param int $decay |
||
83 | * @return LightPrimitiveIF |
||
84 | */ |
||
85 | 1 | public function decay(int $decay = 1): LightPrimitiveIF |
|
90 | |||
91 | /** |
||
92 | * light.distance |
||
93 | * |
||
94 | * {@inheritdoc} |
||
95 | * |
||
96 | * @param float $distance |
||
97 | * @return LightPrimitiveIF |
||
98 | */ |
||
99 | 4 | public function distance(float $distance = 0.0): LightPrimitiveIF |
|
104 | |||
105 | /** |
||
106 | * light.exponent |
||
107 | * |
||
108 | * {@inheritdoc} |
||
109 | * |
||
110 | * @param float $exponent |
||
111 | * @return LightPrimitiveIF |
||
112 | */ |
||
113 | 1 | public function exponent(float $exponent = 10.0): LightPrimitiveIF |
|
118 | |||
119 | /** |
||
120 | * light.groundColor |
||
121 | * |
||
122 | * {@inheritdoc} |
||
123 | * |
||
124 | * @param string $ground_color |
||
125 | * @return LightPrimitiveIF |
||
126 | */ |
||
127 | 1 | public function groundColor(string $ground_color = '#fff'): LightPrimitiveIF |
|
132 | |||
133 | /** |
||
134 | * light.intensity |
||
135 | * |
||
136 | * {@inheritdoc} |
||
137 | * |
||
138 | * @param float $intensity |
||
139 | * @return LightPrimitiveIF |
||
140 | */ |
||
141 | 1 | public function intensity(float $intensity = 1.0): LightPrimitiveIF |
|
146 | |||
147 | /** |
||
148 | * light.type |
||
149 | * |
||
150 | * {@inheritdoc} |
||
151 | * |
||
152 | * @param string $type |
||
153 | * @return LightPrimitiveIF |
||
154 | */ |
||
155 | 4 | public function type(string $type = 'directional'): LightPrimitiveIF |
|
160 | } |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.