PHP Class PhpSpec\Runner\Maintainer\CollaboratorsMaintainer

Inheritance: implements PhpSpec\Runner\Maintainer\MaintainerInterface
Mostra file Open project: phpspec/phpspec Class Usage Examples

Public Methods

Method Description
__construct ( Unwrapper $unwrapper, PhpSpec\Loader\Transformer\TypeHintIndex $typeHintIndex )
getPriority ( ) : integer
prepare ( ExampleNode $example, PhpSpec\Specification $context, MatcherManager $matchers, CollaboratorManager $collaborators )
supports ( ExampleNode $example ) : boolean
teardown ( ExampleNode $example, PhpSpec\Specification $context, MatcherManager $matchers, CollaboratorManager $collaborators )

Private Methods

Method Description
generateCollaborators ( CollaboratorManager $collaborators, ReflectionFunctionAbstract $function, ReflectionClass $classRefl )
getOrCreateCollaborator ( CollaboratorManager $collaborators, string $name ) : Collaborator
getParameterTypeFromIndex ( ReflectionClass $classRefl, ReflectionParameter $parameter ) : string
getParameterTypeFromReflection ( ReflectionParameter $parameter ) : string
isUnsupportedTypeHinting ( ReflectionParameter $parameter )
throwCollaboratorNotFound ( Exception $e, ReflectionParameter | null $parameter, string $className = null )

Method Details

__construct() public method

public __construct ( Unwrapper $unwrapper, PhpSpec\Loader\Transformer\TypeHintIndex $typeHintIndex )
$unwrapper PhpSpec\Wrapper\Unwrapper
$typeHintIndex PhpSpec\Loader\Transformer\TypeHintIndex

getPriority() public method

public getPriority ( ) : integer
return integer

prepare() public method

public prepare ( ExampleNode $example, PhpSpec\Specification $context, MatcherManager $matchers, CollaboratorManager $collaborators )
$example PhpSpec\Loader\Node\ExampleNode
$context PhpSpec\Specification
$matchers PhpSpec\Runner\MatcherManager
$collaborators PhpSpec\Runner\CollaboratorManager

supports() public method

public supports ( ExampleNode $example ) : boolean
$example PhpSpec\Loader\Node\ExampleNode
return boolean

teardown() public method

public teardown ( ExampleNode $example, PhpSpec\Specification $context, MatcherManager $matchers, CollaboratorManager $collaborators )
$example PhpSpec\Loader\Node\ExampleNode
$context PhpSpec\Specification
$matchers PhpSpec\Runner\MatcherManager
$collaborators PhpSpec\Runner\CollaboratorManager