MissingDependencyException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 19
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A fromPackageName() 0 7 1
1
<?php
2
3
namespace TomPHP\ContainerConfigurator\Exception;
4
5
use LogicException;
6
use TomPHP\ExceptionConstructorTools;
7
8
final class MissingDependencyException extends LogicException implements Exception
9
{
10
    use ExceptionConstructorTools;
11
12
    /**
13
     * @internal
14
     *
15
     * @param string $packageName
16
     *
17
     * @return self
18
     */
19
    public static function fromPackageName($packageName)
20
    {
21
        return self::create('The package "%s" is missing. Please run "composer require %s" to install it.', [
22
            $packageName,
23
            $packageName,
24
        ]);
25
    }
26
}
27