Completed
Push — master ( 573b33...6d07d9 )
by Tom
11s
created

MissingDependencyException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

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
     * @param string $packageName
14
     *
15
     * @return self
16
     */
17
    public static function fromPackageName($packageName)
18
    {
19
        return self::create('The package "%s" is missing. Please run "composer require %s" to install it.', [
20
            $packageName,
21
            $packageName,
22
        ]);
23
    }
24
}
25