original_string: private function beforeAfterControllerAction(string $when): void
      {
          $method = $when.\ucfirst($this->routeAction);
  
          if (\method_exists($this->controller, $method) && $method !== $when) {
              \call_user_func([$this->controller, $method]);
          }
      }
code: private function beforeAfterControllerAction(string $when): void
      {
          $method = $when.\ucfirst($this->routeAction);
  
          if (\method_exists($this->controller, $method) && $method !== $when) {
              \call_user_func([$this->controller, $method]);
          }
      }
code_tokens: private function beforeAfterControllerAction ( string $ when ) : void { $ method = $ when . \ ucfirst ( $ this -> routeAction ) ; if ( \ method_exists ( $ this -> controller , $ method ) && $ method !== $ when ) { \ call_user_func ( [ $ this -> controller , $ method ] ) ; } }
docstring: Run action before or after controller action execution.
  
  @param string $when
  
  @return void
docstring_tokens: Run action before or after controller action execution .