Sstalle\php7cc\Token\TokenCollection::isTokenEqualToOrFollowedBy PHP Method

isTokenEqualToOrFollowedBy() public method

public isTokenEqualToOrFollowedBy ( integer $tokenPosition, integer $stringValue ) : boolean
$tokenPosition integer
$stringValue integer
return boolean
    public function isTokenEqualToOrFollowedBy($tokenPosition, $stringValue)
    {
        return $this->isTokenEqualTo($tokenPosition, $stringValue) || $this->isTokenFollowedBy($tokenPosition, $stringValue);
    }

Usage Example

Example #1
0
 /**
  * @dataProvider isTokenEqualToOrFollowedByProvider
  */
 public function testIsTokenEqualToOrFollowedBy($tokens, $position, $value, $result)
 {
     $collection = new TokenCollection($tokens);
     $this->assertSame($result, $collection->isTokenEqualToOrFollowedBy($position, $value));
 }