Issues (16)

src/Match/Voter/ExactMatchVoter.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Everlution\Navigation\Match\Voter;
0 ignored issues
show
A parse error occurred: Syntax error, unexpected T_MATCH, expecting T_STRING on line 5 at column 32
Loading history...
6
7
use Everlution\Navigation\Match\MatchInterface;
8
use Everlution\Navigation\Match\VoterInterface;
9
10
/**
11
 * Class ExactMatchVoter.
12
 *
13
 * @author Ivan Barlog <[email protected]>
14
 */
15
class ExactMatchVoter implements VoterInterface
16
{
17
    public function matches(string $url, MatchInterface $match): bool
18
    {
19
        if (false === $match instanceof ExactMatch) {
20
            return false;
21
        }
22
23
        return $url === $match->getValue();
24
    }
25
}
26