ViewReferenceNotFoundException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 17
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 2
1
<?php
2
3
namespace Victoire\Bundle\ViewReferenceBundle\Exception;
4
5
class ViewReferenceNotFoundException extends \Exception
0 ignored issues
show
introduced by
Missing class doc comment
Loading history...
6
{
7
    /**
8
     * ViewReferenceNotFoundException constructor.
9
     *
10
     * @param array $parameters
11
     */
12
    public function __construct(array $parameters)
13
    {
14
        $parametersAsString = [];
15
        foreach ($parameters as $key => $value) {
16
            $parametersAsString[] = $key.': '.$value;
17
        }
18
        $message = sprintf('Oh no! Cannot find a viewReference for the given parameters %s', implode(',', $parametersAsString));
19
        parent::__construct($message, 424);
20
    }
21
}
22