| Conditions | 5 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 5 |
| Changes | 6 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 44 | 7 | public function removeDefaultDOMAttributes() |
|
| 45 | { |
||
| 46 | 7 | $defaults = $this->getShaderClassDefaultVars(); |
|
| 47 | 7 | $vars = get_object_vars($this); |
|
|
|
|||
| 48 | |||
| 49 | 7 | foreach ($vars as $name => $value) { |
|
| 50 | 7 | if ($name === 'shader') |
|
| 51 | 7 | continue; |
|
| 52 | |||
| 53 | 7 | if (empty($value) || $value === $defaults[$name]) { |
|
| 54 | 7 | unset($this->$name); |
|
| 55 | } |
||
| 56 | } |
||
| 57 | 7 | } |
|
| 58 | |||
| 65 |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.