for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Everlution\Navigation\Match\Voter;
use Everlution\Navigation\Match\MatchInterface;
use Everlution\Navigation\Match\VoterInterface;
/**
* Class PrefixMatchVoter.
*
* @author Ivan Barlog <[email protected]>
*/
class PrefixMatchVoter implements VoterInterface
{
public function matches(string $url, MatchInterface $match): bool
if (false === $match instanceof PrefixMatch) {
return false;
}
return 0 === strpos($url, $match->getValue());