for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Protoku\Kernel;
use Dotenv\Dotenv;
use League\BooBoo\Formatter\JsonFormatter;
use League\BooBoo\Runner;
use League\Container\Container;
use League\Container\ContainerAwareTrait;
use League\Container\ReflectionContainer;
abstract class AbstractKernel
{
use ContainerAwareTrait;
/**
* AbstractKernel constructor.
*/
public function __construct()
$this->createErrorHandler();
$this->createContainer();
$this->loadEnvironment();
}
private function createErrorHandler()
$runner = new Runner(new JsonFormatter);
new \League\BooBoo\Formatter\JsonFormatter()
object<League\BooBoo\Formatter\JsonFormatter>
array
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example:
function acceptsInteger($int) { } $x = '123'; // string "123" // Instead of acceptsInteger($x); // we recommend to use acceptsInteger((integer) $x);
$runner->register();
private function createContainer()
$container = new Container;
$container->delegate(new ReflectionContainer);
$this->setContainer($container);
private function loadEnvironment()
$environment = new Dotenv(getcwd() . '/../');
$environment->load();
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: