WithFastRoute   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 5
c 1
b 0
f 1
dl 0
loc 9
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A configureFastRoute() 0 7 2
1
<?php
2
3
/*
4
 * This file is part of the doyo/mezzio-testing project.
5
 *
6
 * (c) Anthonius Munthi <https://itstoni.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Doyo\Mezzio\Testing\Modules;
15
16
use Doyo\Mezzio\Testing\Tests\Exception\FastRouteException;
17
18
trait WithFastRoute
19
{
20
    public static function configureFastRoute(): void
21
    {
22
        $class = 'Mezzio\Router\FastRouteRouter\ConfigProvider';
23
        if ( ! class_exists($class)) {
24
            FastRouteException::fastRouteNotInstalled();
25
        }
26
        static::addConfigProvider($class);
27
    }
28
}
29