ResourceNotFoundException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
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
}