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

LamentException.php (1 issue)

Labels
Severity
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
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