original_string: public function handle(Event $event)
      {
          $name = $event->getName();
          list(, $method) = explode('.', $name);
          if (empty($this->_config['for']) && empty($this->_config['when'])) {
              return $this->{$method}($event);
          }
          if ($this->matches($event)) {
              return $this->{$method}($event);
          }
      }
code: public function handle(Event $event)
      {
          $name = $event->getName();
          list(, $method) = explode('.', $name);
          if (empty($this->_config['for']) && empty($this->_config['when'])) {
              return $this->{$method}($event);
          }
          if ($this->matches($event)) {
              return $this->{$method}($event);
          }
      }
code_tokens: public function handle ( Event $ event ) { $ name = $ event -> getName ( ) ; list ( , $ method ) = explode ( '.' , $ name ) ; if ( empty ( $ this -> _config [ 'for' ] ) && empty ( $ this -> _config [ 'when' ] ) ) { return $ this -> { $ method } ( $ event ) ; } if ( $ this -> matches ( $ event ) ) { return $ this -> { $ method } ( $ event ) ; } }
docstring: Handler method that applies conditions and resolves the correct method to call.
  
  @param \Cake\Event\Event $event The event instance.
  @return mixed
docstring_tokens: Handler method that applies conditions and resolves the correct method to call .