Passed
Branch main (a52c5c)
by Sammy
03:30 queued 01:56
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;
0 ignored issues
show
Bug introduced by
The type Psr\Container\ContainerExceptionInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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