Issues (480)

src/Route/Match/Plugin/Optional.php (1 issue)

Labels
Severity
1
<?php
2
/**
3
 *
4
 */
5
6
namespace Mvc5\Route\Match\Plugin;
0 ignored issues
show
A parse error occurred: Syntax error, unexpected T_MATCH, expecting T_STRING on line 6 at column 21
Loading history...
7
8
use Mvc5\Route\Route;
9
10
use function in_array;
11
12
use const Mvc5\OPTIONAL;
13
14
trait Optional
15
{
16
    /**
17
     * @param Route $route
18
     * @param string $name
19
     * @return bool
20
     */
21 7
    protected function optional(Route $route, string $name) : bool
22
    {
23 7
        return in_array($name, (array) $route[OPTIONAL]);
24
    }
25
}
26