CronLingo\Parser::expects PHP Méthode

expects() public méthode

Enforce expectations of a certain token
public expects ( $token, $types )
$token
$types
    public function expects($token, $types)
    {
        if (!is_array($types)) {
            $types = array($types);
        }
        if (!$this->is($token, $types)) {
            $t = isset($token['token']) ? $token['token'] : 'NULL';
            throw new ParseException('Expected ' . implode(',', $types) . ' but got ' . $t);
        }
    }