WithFastRoute::configureFastRoute()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 2
eloc 4
c 1
b 0
f 1
nc 2
nop 0
dl 0
loc 7
rs 10
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