@@ -182,13 +182,13 @@ discard block |
||
| 182 | 182 | */ |
| 183 | 183 | private function setHookMethods(array &$aHookMethods, $xValue) |
| 184 | 184 | { |
| 185 | - foreach($xValue as $sCalledMethod => $xMethodToCall) |
|
| 185 | + foreach ($xValue as $sCalledMethod => $xMethodToCall) |
|
| 186 | 186 | { |
| 187 | - if(is_array($xMethodToCall)) |
|
| 187 | + if (is_array($xMethodToCall)) |
|
| 188 | 188 | { |
| 189 | 189 | $aHookMethods[$sCalledMethod] = $xMethodToCall; |
| 190 | 190 | } |
| 191 | - elseif(is_string($xMethodToCall)) |
|
| 191 | + elseif (is_string($xMethodToCall)) |
|
| 192 | 192 | { |
| 193 | 193 | $aHookMethods[$sCalledMethod] = [$xMethodToCall]; |
| 194 | 194 | } |
@@ -205,18 +205,18 @@ discard block |
||
| 205 | 205 | */ |
| 206 | 206 | public function configure(string $sName, $xValue) |
| 207 | 207 | { |
| 208 | - switch($sName) |
|
| 208 | + switch ($sName) |
|
| 209 | 209 | { |
| 210 | 210 | // Set the separator |
| 211 | 211 | case 'separator': |
| 212 | - if($xValue === '_' || $xValue === '.') |
|
| 212 | + if ($xValue === '_' || $xValue === '.') |
|
| 213 | 213 | { |
| 214 | 214 | $this->sSeparator = $xValue; |
| 215 | 215 | } |
| 216 | 216 | break; |
| 217 | 217 | // Set the protected methods |
| 218 | 218 | case 'protected': |
| 219 | - if(is_array($xValue)) |
|
| 219 | + if (is_array($xValue)) |
|
| 220 | 220 | { |
| 221 | 221 | $this->aProtectedMethods = array_merge($this->aProtectedMethods, $xValue); |
| 222 | 222 | } |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | $this->aAttributes = array_merge($this->aAttributes, $xValue); |
| 235 | 235 | break; |
| 236 | 236 | case 'excluded': |
| 237 | - $this->bExcluded = (bool)$xValue; |
|
| 237 | + $this->bExcluded = (bool) $xValue; |
|
| 238 | 238 | break; |
| 239 | 239 | default: |
| 240 | 240 | break; |
@@ -340,11 +340,11 @@ discard block |
||
| 340 | 340 | private function callHookMethods(array $aHookMethods, string $sMethod) |
| 341 | 341 | { |
| 342 | 342 | $aMethods = $aHookMethods[$sMethod] ?? $aHookMethods['*'] ?? []; |
| 343 | - foreach($aMethods as $xKey => $xValue) |
|
| 343 | + foreach ($aMethods as $xKey => $xValue) |
|
| 344 | 344 | { |
| 345 | 345 | $sMethodName = $xValue; |
| 346 | 346 | $aMethodArgs = []; |
| 347 | - if(is_string($xKey)) |
|
| 347 | + if (is_string($xKey)) |
|
| 348 | 348 | { |
| 349 | 349 | $sMethodName = $xKey; |
| 350 | 350 | $aMethodArgs = is_array($xValue) ? $xValue : [$xValue]; |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | |
| 370 | 370 | // Set attributes from the DI container |
| 371 | 371 | $aAttributes = $this->aAttributes[$sMethod] ?? $this->aAttributes['*'] ?? []; |
| 372 | - foreach($aAttributes as $sName => $sClass) |
|
| 372 | + foreach ($aAttributes as $sName => $sClass) |
|
| 373 | 373 | { |
| 374 | 374 | // Set the protected attributes of the object |
| 375 | 375 | $cSetter = function($c) use($sClass, $sName) { |