ConstraintImplementationTrait
trait ConstraintImplementationTrait
internal | This trait is not covered by the backward compatibility promise |
Implementation of an inheritance constraint class.
The trait expects the following static attributes to be defined::
private static $verb; // for example $verb = 'extends class'; private static $negatedVerb; // for example $negatedVerb = 'does not extend class'; private static $validation; // for example $validation = ['class_exists', 'a class-string']; private static $inheritance; // for example $validation = 'class_parents'; private static $supports; // for example $supports = ['class_exists'];
Methods
No description
Returns short description of what we examine, e.g. 'impements interface'
.
Returns short negated description of what we examine, e.g. 'does not impement interface'
.
No description
Checks if $subject may be used as an argument to inheritance().
Details
at line 39
static ConstraintImplementationTrait
create(string $expected)
No description
at line 49
protected string
verb()
Returns short description of what we examine, e.g. 'impements interface'
.
at line 57
protected string
negatedVerb()
Returns short negated description of what we examine, e.g. 'does not impement interface'
.
at line 67
protected array
inheritance(string $class)
No description
at line 78
protected bool
supports(string $subject)
Checks if $subject may be used as an argument to inheritance().