1 | <?php |
||
22 | class SubstepDefinition extends AbstractFormDefinitionComponent |
||
23 | { |
||
24 | /** |
||
25 | * @var string |
||
26 | * @validate NotEmpty |
||
27 | */ |
||
28 | protected $substep; |
||
29 | |||
30 | /** |
||
31 | * @var \Romm\Formz\Form\Definition\Condition\Activation |
||
32 | * @validate Romm.Formz:Internal\ConditionIsValid |
||
33 | */ |
||
34 | protected $activation; |
||
35 | |||
36 | /** |
||
37 | * @var \Romm\Formz\Form\Definition\Step\Step\Substep\SubstepDefinition |
||
38 | */ |
||
39 | protected $next; |
||
40 | |||
41 | /** |
||
42 | * @var \Romm\Formz\Form\Definition\Step\Step\Substep\DivergenceSubstepDefinition[] |
||
43 | */ |
||
44 | protected $divergence; |
||
45 | |||
46 | /** |
||
47 | * @return Substep |
||
48 | */ |
||
49 | public function getSubstep() |
||
58 | |||
59 | /** |
||
60 | * @return Activation |
||
61 | */ |
||
62 | public function getActivation() |
||
66 | |||
67 | /** |
||
68 | * @return bool |
||
69 | */ |
||
70 | public function hasActivation() |
||
74 | |||
75 | public function getLevel() |
||
93 | |||
94 | /** |
||
95 | * @todo |
||
96 | * |
||
97 | * @return bool |
||
98 | */ |
||
99 | public function isLast() |
||
104 | |||
105 | /** |
||
106 | * @return bool |
||
107 | */ |
||
108 | public function hasNextSubstep() |
||
112 | |||
113 | /** |
||
114 | * @return SubstepDefinition |
||
115 | */ |
||
116 | public function getNextSubstep() |
||
124 | |||
125 | /** |
||
126 | * @return DivergenceSubstepDefinition[] |
||
127 | */ |
||
128 | public function getDivergenceSubsteps() |
||
132 | |||
133 | /** |
||
134 | * @return bool |
||
135 | */ |
||
136 | public function hasDivergence() |
||
140 | |||
141 | /** |
||
142 | * @return string |
||
143 | */ |
||
144 | public function hash() |
||
170 | } |
||
171 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.