| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function getMeasurements($prefix, array $keys) { |
||
| 31 | $measurements = []; |
||
| 32 | $prefixedKeys = array_map(function($key) use ($prefix) { |
||
| 33 | return $this->prefix.$prefix.':'.$key; |
||
| 34 | }, $keys); |
||
| 35 | foreach ($this->memcached->getMulti($prefixedKeys) as $key => $value) { |
||
| 36 | $unprefixedKey = substr($key, strlen($this->prefix) + strlen($prefix) + 1); |
||
|
|
|||
| 37 | $measurements[$unprefixedKey] = $value !== false ? (float)$value : 'Nan'; |
||
| 38 | } |
||
| 39 | return $measurements; |
||
| 40 | } |
||
| 41 | } |
||
| 42 |
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.