Passed
Push — main ( 01e304...2324cf )
by Sammy
01:36
created

LamentException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 3
dl 0
loc 6
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php 
2
namespace HexMakina\LeMarchand;
3
4
use \Psr\Container\ContainerExceptionInterface;
5
6
class LamentException extends \Exception implements ContainerExceptionInterface
7
{
8
  public function __construct($configuration)
9
  {
10
    $configuration = json_encode(var_export($configuration));
0 ignored issues
show
Bug introduced by
Are you sure the usage of var_export($configuration) is correct as it seems to always return null.

This check looks for function or method calls that always return null and whose return value is used.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
if ($a->getObject()) {

The method getObject() can return nothing but null, so it makes no sense to use the return value.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
11
    return parent::__construct("HellBound Error using '$configuration'");
12
  }  
13
}
14
15