src/Expectation/Matcher/SuffixMatcher.php
public function match($subject)
    {
        $this->subject = $subject;

        $suffixLength = strlen($this->suffix);
        if (!$suffixLength) {
            return true;
        }

        return (substr($subject, -$suffixLength) === $this->suffix);
    }
public function match($subject)
    {
        $this->subject = $subject;

        $suffixLength = strlen($this->suffix);
        if (!$suffixLength) {
            return true;
        }

        return (substr($subject, -$suffixLength) === $this->suffix);
    }
public function match ( $ subject ) { $ this -> subject = $ subject ; $ suffixLength = strlen ( $ this -> suffix ) ; if ( ! $ suffixLength ) { return true ; } return ( substr ( $ subject , - $ suffixLength ) === $ this -> suffix ) ; }
Returns true if the subject ends with the given suffix, false otherwise.

@param  mixed   $subject The string to test
@return boolean Whether or not the string contains the suffix
Returns true if the subject ends with the given suffix false otherwise .