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 LengthMatcher

LengthMatcher determines if an actual array, string, or Countable has a length equivalent to the expected value.

Peridot\Leo\Matcher\AbstractMatcher implements Peridot\Leo\Matcher\MatcherInterface
Extended by Peridot\Leo\Matcher\LengthMatcher
Namespace: Peridot\Leo\Matcher
Package: Peridot\Leo\Matcher
Located at Matcher/LengthMatcher.php
Methods summary
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
protected mixed
# doMatch( string|array|Countable $actual )

Match the length of the countable interface or string against the expected value.

Match the length of the countable interface or string against the expected value.

Parameters

$actual

Returns

mixed
protected boolean
# isCountable( mixed $actual )

Determine if the native count() function can return a valid result on the actual value.

Determine if the native count() function can return a valid result on the actual value.

Parameters

$actual

Returns

boolean
Methods inherited from Peridot\Leo\Matcher\AbstractMatcher
__construct(), getTemplate(), invert(), isNegated(), match(), setAssertion(), setTemplate()
Properties summary
protected integer $count
#
Properties inherited from Peridot\Leo\Matcher\AbstractMatcher
$assertion, $expected, $negated, $template
Leo API documentation generated by ApiGen