@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | if ($execMethodName) { // Used to test for null but it could easily be an empty string |
| 172 | 172 | $this->log( "Rendering with exec: {$execMethodName}, args:".var_export($execArgs, true ), LogLevel::DEBUG ); |
| 173 | 173 | $out = $this->execMethod( $execMethodName, $execArgs ); |
| 174 | - }else { |
|
| 174 | + } else { |
|
| 175 | 175 | $this->log( "Rendering without exec", LogLevel::DEBUG ); |
| 176 | 176 | $out = $this->template->render( $this->state, $this->props ); |
| 177 | 177 | if (!( $out instanceof ViewComponentResponse )) { |
@@ -197,12 +197,12 @@ discard block |
||
| 197 | 197 | if (count( $methodName ) == 1) { |
| 198 | 198 | $methodName = $methodName[ 0 ] . 'Handler'; |
| 199 | 199 | $out = $this->$methodName( $args ); |
| 200 | - }else { |
|
| 200 | + } else { |
|
| 201 | 201 | $childName = array_shift( $methodName ); |
| 202 | 202 | $child = $this->childComponents[ $childName ]; |
| 203 | 203 | if ($child instanceof AbstractViewComponent) { |
| 204 | 204 | $out = $child->execMethod( $methodName, $args ); |
| 205 | - }else { |
|
| 205 | + } else { |
|
| 206 | 206 | throw new \Exception( implode( ".", $methodName ) . " is not a valid method." ); |
| 207 | 207 | } |
| 208 | 208 | } |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | } |
| 284 | 284 | if (null !== ( $pPath = $this->parent->getPath() )) { |
| 285 | 285 | return $pPath . '.' . $this->handle; |
| 286 | - }else { |
|
| 286 | + } else { |
|
| 287 | 287 | return $this->handle; |
| 288 | 288 | } |
| 289 | 289 | } |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | } |
| 307 | 307 | $child = new $type( $handle, $this, $this->exec, $this->logger ); |
| 308 | 308 | $this->childComponents[ $handle ] = $child; |
| 309 | - }else { |
|
| 309 | + } else { |
|
| 310 | 310 | // exec, di and logger are set recursively in rehydrate() |
| 311 | 311 | $child = $this->childComponents[ $handle ]; |
| 312 | 312 | } |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | /** |
| 145 | - * @return array |
|
| 145 | + * @return string[] |
|
| 146 | 146 | */ |
| 147 | 147 | public function __sleep() |
| 148 | 148 | { |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | /** |
| 185 | 185 | * Execute a component method within the page or component. |
| 186 | 186 | * Called first on a top level component which then passes the call down to the appropriate sub-component (or executes on itself if appropriate). |
| 187 | - * @param array|string $methodName A methodname in the format subComponent.anotherSubComponent.methodName. Either dotted string as described, or parts in an array. The top level page component shouldn't be included |
|
| 187 | + * @param string $methodName A methodname in the format subComponent.anotherSubComponent.methodName. Either dotted string as described, or parts in an array. The top level page component shouldn't be included |
|
| 188 | 188 | * @param array $args |
| 189 | 189 | * @throws \Exception |
| 190 | 190 | * @return Response |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | /** |
| 217 | - * @param $execMethod |
|
| 217 | + * @param string $execMethod |
|
| 218 | 218 | * @return string |
| 219 | 219 | */ |
| 220 | 220 | public function getExecPath( $execMethod ) |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | * Render a child component. |
| 323 | 323 | * |
| 324 | 324 | * @param $handle |
| 325 | - * @return Response |
|
| 325 | + * @return string |
|
| 326 | 326 | * @throws \Exception |
| 327 | 327 | */ |
| 328 | 328 | public function renderChild( $handle ) |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | |
| 101 | 101 | if (class_exists( "Puli\\TwigExtension\\PuliExtension" ) && null !== $this->repo) { |
| 102 | 102 | $loader = new \Twig_Loader_Chain( [ new PuliTemplateLoader( $this->repo ), new Twig_Loader_String() ] ); |
| 103 | - }else { |
|
| 103 | + } else { |
|
| 104 | 104 | $loader = new Twig_Loader_String(); |
| 105 | 105 | } |
| 106 | 106 | return $loader; |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | if( null == $responseCode ){ |
| 41 | 41 | if( $type == "redirect" ){ |
| 42 | 42 | $responseCode = 301; |
| 43 | - }else{ |
|
| 43 | + } else{ |
|
| 44 | 44 | $responseCode = 200; |
| 45 | 45 | } |
| 46 | 46 | } |