original_string: protected function getCallbacksForType($abstract, $object, array $callbacksPerType)
      {
          $results = [];
  
          foreach ($callbacksPerType as $type => $callbacks) {
              if ($type === $abstract || $object instanceof $type) {
                  $results = array_merge($results, $callbacks);
              }
          }
  
          return $results;
      }
code: protected function getCallbacksForType($abstract, $object, array $callbacksPerType)
      {
          $results = [];
  
          foreach ($callbacksPerType as $type => $callbacks) {
              if ($type === $abstract || $object instanceof $type) {
                  $results = array_merge($results, $callbacks);
              }
          }
  
          return $results;
      }
code_tokens: protected function getCallbacksForType ( $ abstract , $ object , array $ callbacksPerType ) { $ results = [ ] ; foreach ( $ callbacksPerType as $ type => $ callbacks ) { if ( $ type === $ abstract || $ object instanceof $ type ) { $ results = array_merge ( $ results , $ callbacks ) ; } } return $ results ; }
docstring: Get all callbacks for a given type.
  
  @param  string  $abstract
  @param  object  $object
  @param  array   $callbacksPerType
  
  @return array
docstring_tokens: Get all callbacks for a given type .