1 | <?php |
||
29 | class FogComponent extends ComponentAbstract implements FogCMPTIF |
||
30 | { |
||
31 | |||
32 | /** |
||
33 | * Initialize Component |
||
34 | * |
||
35 | * {@inheritdoc} |
||
36 | * |
||
37 | * @return bool |
||
38 | */ |
||
39 | 1 | public function initializeComponent(): bool |
|
46 | |||
47 | /** |
||
48 | * Fog type |
||
49 | * |
||
50 | * Type of fog distribution. Can be linear or exponential. |
||
51 | * |
||
52 | * @param string $type |
||
53 | * @return FogCMPTIF |
||
54 | */ |
||
55 | 1 | public function type(string $type = 'linear'): FogCMPTIF |
|
60 | |||
61 | /** |
||
62 | * Fog color |
||
63 | * |
||
64 | * Color of fog. For example, if set to black, far away objects will be rendered black. |
||
65 | * |
||
66 | * @param string $color |
||
67 | * @return FogCMPTIF |
||
68 | */ |
||
69 | 1 | public function color(string $color = '#000'): FogCMPTIF |
|
74 | |||
75 | /** |
||
76 | * Fog near |
||
77 | * |
||
78 | * Minimum distance to start applying fog. Objects closer than this won’t be affected by fog. |
||
79 | * |
||
80 | * @param string $near |
||
|
|||
81 | * @return FogCMPTIF |
||
82 | */ |
||
83 | 1 | public function near(int $near = 1): FogCMPTIF |
|
88 | |||
89 | /** |
||
90 | * Fog far |
||
91 | * |
||
92 | * Maximum distance to stop applying fog. Objects farther than this won’t be affected by fog. |
||
93 | * |
||
94 | * @param int $far |
||
95 | * @return FogCMPTIF |
||
96 | */ |
||
97 | 1 | public function far(int $far = 1000): FogCMPTIF |
|
102 | |||
103 | /** |
||
104 | * Fog density |
||
105 | * |
||
106 | * How quickly the fog grows dense. |
||
107 | * |
||
108 | * @param float $density |
||
109 | * @return FogCMPTIF |
||
110 | */ |
||
111 | 1 | public function density(float $density = 0.00025): FogCMPTIF |
|
116 | |||
117 | } |
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.