ResourceNotFoundException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 9
rs 9.6666
cc 1
eloc 6
nc 1
nop 2
1
<?php
2
3
namespace ComradeReader\Exception;
4
5
/**
6
 * Resource not found / 404 HTTP Error
7
 *
8
 * @package ComradeReader\Exception
9
 */
10
class ResourceNotFoundException extends ReaderException
11
{
12
    /**
13
     * @param string          $resource
14
     * @param \Exception|null $previous
15
     */
16
    public function __construct($resource, \Exception $previous = null)
17
    {
18
        parent::__construct(
19
            'Resource "' . $resource . '" was not found on remote server, got a HTTP 404 error while trying to get the resource. ' .
20
                'Please verify if the resource exists, and if the HTTP method is correct',
21
            404,
22
            $previous
23
        );
24
    }
25
}