Overview

Namespaces

  • None
  • Peridot
    • Leo
      • Formatter
      • Interfaces
        • Assert
      • Matcher
        • Template
      • ObjectPath
      • Responder
  • PHP

Classes

  • AbstractMatcher
  • CountableMatcher
  • EmptyMatcher
  • EqualMatcher
  • ExceptionMatcher
  • GreaterThanMatcher
  • GreaterThanOrEqualMatcher
  • InclusionMatcher
  • InstanceofMatcher
  • KeysMatcher
  • LengthMatcher
  • LessThanMatcher
  • LessThanOrEqualMatcher
  • Match
  • NullMatcher
  • PatternMatcher
  • PredicateMatcher
  • PropertyMatcher
  • RangeMatcher
  • SameMatcher
  • SubStringMatcher
  • TrueMatcher
  • TruthyMatcher
  • TypeMatcher

Interfaces

  • MatcherInterface
  • Overview
  • Namespace
  • Class
  • Tree

Class TypeMatcher

TypeMatcher determines if an actual value has the same type as the expected type.

Peridot\Leo\Matcher\AbstractMatcher implements Peridot\Leo\Matcher\MatcherInterface
Extended by Peridot\Leo\Matcher\TypeMatcher
Namespace: Peridot\Leo\Matcher
Package: Peridot\Leo\Matcher
Located at Matcher/TypeMatcher.php
Methods summary
public Peridot\Leo\Matcher\Match
# match( mixed $actual )

Perform a match against an actual value.

Perform a match against an actual value.

Parameters

$actual

Returns

Peridot\Leo\Matcher\Match

Overrides

Peridot\Leo\Matcher\AbstractMatcher::match()
public boolean
# doMatch( mixed $actual )

Determine if the actual value has the same type as the expected value. Uses the native gettype() function to compare.

Determine if the actual value has the same type as the expected value. Uses the native gettype() function to compare.

Parameters

$actual

Returns

boolean
public Peridot\Leo\Matcher\Template\TemplateInterface
# getDefaultTemplate( )

Return a default TemplateInterface if none was set.

Return a default TemplateInterface if none was set.

Returns

Peridot\Leo\Matcher\Template\TemplateInterface
Methods inherited from Peridot\Leo\Matcher\AbstractMatcher
__construct(), getTemplate(), invert(), isNegated(), setAssertion(), setTemplate()
Properties summary
protected string $type
#
Properties inherited from Peridot\Leo\Matcher\AbstractMatcher
$assertion, $expected, $negated, $template
Leo API documentation generated by ApiGen