UriParametersMissingException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 4
dl 0
loc 12
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A from() 0 6 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Northwoods\Router\Error;
5
6
final class UriParametersMissingException extends \InvalidArgumentException
7
{
8
    /**
9
     * @param string[] $missing
10
     * @param string[] $params
11
     */
12 1
    public static function from(string $name, array $missing, array $params): self
13
    {
14 1
        $missing = implode(',', $missing);
15 1
        $params = implode(',', $params);
16
17 1
        return new self("Route '$name' expects parameters [$missing] but received [$params]");
18
    }
19
}
20