Conditions | 4 |
Paths | 6 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | public function __construct(array $elements = [], Matrix $matrix = null, $matrixOffset = null) |
||
31 | { |
||
32 | foreach ($elements as $offset => $element) { |
||
33 | $this->setElement($offset, $element); |
||
34 | } |
||
35 | |||
36 | if ($matrix) { |
||
37 | if (!$matrixOffset) { |
||
|
|||
38 | throw new \InvalidArgumentException('You must also supply a matrix offset when setting the matrix'); |
||
39 | } |
||
40 | |||
41 | $this->setMatrix($matrix, $matrixOffset); |
||
42 | } |
||
43 | } |
||
44 | |||
70 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
integer
values, zero is a special case, in particular the following results might be unexpected: