@@ -50,14 +50,14 @@ discard block |
||
| 50 | 50 | $sPrefix = trim((string)$sPrefix); |
| 51 | 51 | $nDepth = intval($nDepth); |
| 52 | 52 | // Check the max depth |
| 53 | - if($nDepth < 0 || $nDepth > 9) |
|
| 53 | + if ($nDepth < 0 || $nDepth > 9) |
|
| 54 | 54 | { |
| 55 | 55 | throw new \Jaxon\Exception\Config\Data(jaxon_trans('config.errors.data.depth', |
| 56 | 56 | array('key' => $sPrefix, 'depth' => $nDepth))); |
| 57 | 57 | } |
| 58 | - foreach($aOptions as $sName => $xOption) |
|
| 58 | + foreach ($aOptions as $sName => $xOption) |
|
| 59 | 59 | { |
| 60 | - if(is_int($sName)) |
|
| 60 | + if (is_int($sName)) |
|
| 61 | 61 | { |
| 62 | 62 | continue; |
| 63 | 63 | } |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | // Save the value of this option |
| 68 | 68 | $this->aOptions[$sFullName] = $xOption; |
| 69 | 69 | // Save the values of its sub-options |
| 70 | - if(is_array($xOption)) |
|
| 70 | + if (is_array($xOption)) |
|
| 71 | 71 | { |
| 72 | 72 | // Recursively read the options in the array |
| 73 | 73 | $this->_setOptions($xOption, $sFullName, $nDepth + 1); |
@@ -89,9 +89,9 @@ discard block |
||
| 89 | 89 | $aKeys = explode('.', (string)$sKeys); |
| 90 | 90 | foreach ($aKeys as $sKey) |
| 91 | 91 | { |
| 92 | - if(($sKey)) |
|
| 92 | + if (($sKey)) |
|
| 93 | 93 | { |
| 94 | - if(!array_key_exists($sKey, $aOptions) || !is_array($aOptions[$sKey])) |
|
| 94 | + if (!array_key_exists($sKey, $aOptions) || !is_array($aOptions[$sKey])) |
|
| 95 | 95 | { |
| 96 | 96 | throw new \Jaxon\Exception\Config\Data(jaxon_trans('config.errors.data.missing', array('key' => $sKeys))); |
| 97 | 97 | } |
@@ -139,13 +139,12 @@ discard block |
||
| 139 | 139 | $sPrefix = rtrim($sPrefix, '.') . '.'; |
| 140 | 140 | $sPrefixLen = strlen($sPrefix); |
| 141 | 141 | $aOptions = array(); |
| 142 | - foreach($this->aOptions as $sName => $xValue) |
|
| 142 | + foreach ($this->aOptions as $sName => $xValue) |
|
| 143 | 143 | { |
| 144 | - if(substr($sName, 0, $sPrefixLen) == $sPrefix) |
|
| 144 | + if (substr($sName, 0, $sPrefixLen) == $sPrefix) |
|
| 145 | 145 | { |
| 146 | 146 | $iNextDotPos = strpos($sName, '.', $sPrefixLen); |
| 147 | - $sOptionName = $iNextDotPos === false ? substr($sName, $sPrefixLen) : |
|
| 148 | - substr($sName, $sPrefixLen, $iNextDotPos - $sPrefixLen); |
|
| 147 | + $sOptionName = $iNextDotPos === false ? substr($sName, $sPrefixLen) : substr($sName, $sPrefixLen, $iNextDotPos - $sPrefixLen); |
|
| 149 | 148 | $aOptions[$sOptionName] = $sPrefix . $sOptionName; |
| 150 | 149 | } |
| 151 | 150 | } |