for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types = 1);
namespace Everlution\Navigation\Voter\Regex;
use Everlution\Navigation\Voter\MatchVoter;
/**
* Class RegexVoter.
* @author Ivan Barlog <[email protected]>
*/
class RegexVoter extends MatchVoter
{
* @param string $haystack
* @param string $needle
* @return bool
protected function matches(string $haystack, string $needle): bool
return 1 === preg_match($needle, $haystack);
}