| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 4 | ||
| Bugs | 2 | Features | 1 |
| 1 | <?php |
||
| 22 | public static function buildIndexActionArray(&$metaDataArray, $section) |
||
| 23 | { |
||
| 24 | $loader = GeneralUtility::makeInstance(\HDNET\OnpageIntegration\Loader\ApiResultLoader::class); |
||
| 25 | |||
| 26 | for ($i = 0; $i < count($metaDataArray[0]); $i++) { |
||
|
|
|||
| 27 | |||
| 28 | $graphDataArray = $loader->load('zoom_' . $section . '_' . $i . '_graph'); |
||
| 29 | $errorReportyKey = $metaDataArray[0][$i]['errors']; |
||
| 30 | |||
| 31 | $metaDataArray[0][$i]['errors'] = self::errorReport($graphDataArray, $errorReportyKey); |
||
| 32 | $metaDataArray[0][$i]['test'] = $graphDataArray; |
||
| 33 | } |
||
| 34 | } |
||
| 35 | |||
| 63 |
If the size of the collection does not change during the iteration, it is generally a good practice to compute it beforehand, and not on each iteration: