original_string: protected function callHooks($name)
      {
          $hooks = Arr::get($this->hooks, $name, []);
  
          foreach ($hooks as $func) {
              if (!$func instanceof Closure) {
                  continue;
              }
  
              $response = call_user_func($func, $this);
  
              if ($response instanceof Response) {
                  return $response;
              }
          }
      }
code: protected function callHooks($name)
      {
          $hooks = Arr::get($this->hooks, $name, []);
  
          foreach ($hooks as $func) {
              if (!$func instanceof Closure) {
                  continue;
              }
  
              $response = call_user_func($func, $this);
  
              if ($response instanceof Response) {
                  return $response;
              }
          }
      }
code_tokens: protected function callHooks ( $ name ) { $ hooks = Arr :: get ( $ this -> hooks , $ name , [ ] ) ; foreach ( $ hooks as $ func ) { if ( ! $ func instanceof Closure ) { continue ; } $ response = call_user_func ( $ func , $ this ) ; if ( $ response instanceof Response ) { return $ response ; } } }
docstring: Call hooks by giving name.
  
  @param string $name
  
  @return Response
docstring_tokens: Call hooks by giving name .