Passed
Push — master ( 8e9a4b...0b4ca3 )
by Sebastian
03:12
created

ClassLoaderNotFoundException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 10
rs 10
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * @package Application Utils
4
 * @subpackage ClassFinder
5
 * @see \AppUtils\ClassHelper\ClassLoaderNotFoundException
6
 */
7
8
declare(strict_types=1);
9
10
namespace AppUtils\ClassHelper;
11
12
/**
13
 * @package Application Utils
14
 * @subpackage ClassFinder
15
 * @author Sebastian Mordziol <[email protected]>
16
 */
17
class ClassLoaderNotFoundException extends BaseClassHelperException
18
{
19
    public const ERROR_CODE = 111101;
20
21
    /**
22
     * @param string[] $searchPaths
23
     */
24
    public function __construct(array $searchPaths)
25
    {
26
        parent::__construct(
27
            'Composer auto-loader not found.',
28
            sprintf(
29
                'The composer auto-loader could not be found in any of the possible paths:'.PHP_EOL.
30
                '%s',
31
                '- '.implode(PHP_EOL.'- ', $searchPaths)
32
            ),
33
            self::ERROR_CODE
34
        );
35
    }
36
}
37