| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | protected function translatePluginErrorCodes( array $codes ) |
||
| 42 | { |
||
| 43 | $errors = []; |
||
| 44 | $i18n = $this->getContext()->getI18n(); |
||
| 45 | |||
| 46 | foreach( $codes as $scope => $list ) |
||
| 47 | { |
||
| 48 | foreach( $list as $object => $errcode ) |
||
| 49 | { |
||
| 50 | $key = $scope . ( $scope !== 'product' ? '.' . $object : '' ) . '.' . $errcode; |
||
| 51 | $errors[] = $i18n->dt( 'mshop/code', $key ); |
||
| 52 | } |
||
| 53 | } |
||
| 54 | |||
| 55 | return $errors; |
||
| 56 | } |
||
| 58 |