Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
70 | public function isDateSelected() |
||
71 | { |
||
72 | $value = $this->jQuery('val()'); |
||
73 | |||
74 | self::debug(['Comparing "%s" with "%s".'], [$value, $this->formatted]); |
||
75 | |||
76 | if ($value !== $this->formatted) { |
||
77 | throw new \Exception(sprintf('DatePicker contains the "%s" but should "%s".', $value, $this->formatted)); |
||
78 | } |
||
79 | |||
80 | return $this; |
||
81 | } |
||
82 | } |
||
83 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.