@@ -31,9 +31,9 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | private function buildKey($inArray) |
| 33 | 33 | { |
| 34 | - $aReturn = []; |
|
| 34 | + $aReturn = [ ]; |
|
| 35 | 35 | foreach ($inArray as $key => $val) { |
| 36 | - $aReturn[] = str_repeat('_', $key) . $val; |
|
| 36 | + $aReturn[ ] = str_repeat('_', $key).$val; |
|
| 37 | 37 | } |
| 38 | 38 | return implode('', $aReturn); |
| 39 | 39 | } |
@@ -48,9 +48,9 @@ discard block |
||
| 48 | 48 | return $sReturn; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - protected function mergeArraysIntoFirstSecond($stAry, $ndAry, $pSq = ['first', 'second']) |
|
| 51 | + protected function mergeArraysIntoFirstSecond($stAry, $ndAry, $pSq = [ 'first', 'second' ]) |
|
| 52 | 52 | { |
| 53 | - $row = []; |
|
| 53 | + $row = [ ]; |
|
| 54 | 54 | foreach ($stAry as $key => $val) { |
| 55 | 55 | if (is_array($val)) { |
| 56 | 56 | foreach ($val as $ky2 => $vl2) { |
@@ -58,27 +58,27 @@ discard block |
||
| 58 | 58 | foreach ($vl2 as $ky3 => $vl3) { |
| 59 | 59 | if (is_array($vl3)) { |
| 60 | 60 | foreach ($vl3 as $ky4 => $vl4) { |
| 61 | - $row[$this->buildKey([$key, $ky2, $ky3, $ky4])] = [ |
|
| 62 | - $pSq[0] => $vl4, |
|
| 63 | - $pSq[1] => $this->emptyIfNotSet($ndAry[$key][$ky2][$ky3][$ky4]), |
|
| 61 | + $row[ $this->buildKey([ $key, $ky2, $ky3, $ky4 ]) ] = [ |
|
| 62 | + $pSq[ 0 ] => $vl4, |
|
| 63 | + $pSq[ 1 ] => $this->emptyIfNotSet($ndAry[ $key ][ $ky2 ][ $ky3 ][ $ky4 ]), |
|
| 64 | 64 | ]; |
| 65 | 65 | } |
| 66 | 66 | } else { |
| 67 | - $row[$this->buildKey([$key, $ky2, $ky3])] = [ |
|
| 68 | - $pSq[0] => $vl3, |
|
| 69 | - $pSq[1] => $this->emptyIfNotSet($ndAry[$key][$ky2][$ky3]), |
|
| 67 | + $row[ $this->buildKey([ $key, $ky2, $ky3 ]) ] = [ |
|
| 68 | + $pSq[ 0 ] => $vl3, |
|
| 69 | + $pSq[ 1 ] => $this->emptyIfNotSet($ndAry[ $key ][ $ky2 ][ $ky3 ]), |
|
| 70 | 70 | ]; |
| 71 | 71 | } |
| 72 | 72 | } |
| 73 | 73 | } else { |
| 74 | - $row[$this->buildKey([$key, $ky2])] = [ |
|
| 75 | - $pSq[0] => $vl2, |
|
| 76 | - $pSq[1] => $this->emptyIfNotSet($ndAry[$key][$ky2]), |
|
| 74 | + $row[ $this->buildKey([ $key, $ky2 ]) ] = [ |
|
| 75 | + $pSq[ 0 ] => $vl2, |
|
| 76 | + $pSq[ 1 ] => $this->emptyIfNotSet($ndAry[ $key ][ $ky2 ]), |
|
| 77 | 77 | ]; |
| 78 | 78 | } |
| 79 | 79 | } |
| 80 | 80 | } else { |
| 81 | - $row[$key] = [$pSq[0] => $val, $pSq[1] => $this->emptyIfNotSet($ndAry[$key])]; |
|
| 81 | + $row[ $key ] = [ $pSq[ 0 ] => $val, $pSq[ 1 ] => $this->emptyIfNotSet($ndAry[ $key ]) ]; |
|
| 82 | 82 | } |
| 83 | 83 | } |
| 84 | 84 | return $row; |