for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/**
* balloon
*
* @copyright Copryright (c) 2012-2018 gyselroth GmbH (https://gyselroth.com)
* @license GPL-3.0 https://opensource.org/licenses/GPL-3.0
*/
namespace Balloon\Bootstrap;
use ErrorException;
use Psr\Log\LoggerInterface;
abstract class AbstractBootstrap
{
* Logger.
* @var LoggerInterface
protected $logger;
* Inject object.
* @param mixed $object
* @return AbstractBootstrap
public function inject($object): self
$object
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
return $this;
}
* Set error handler.
protected function setErrorHandler(): self
set_error_handler(function ($severity, $message, $file, $line) {
$log = $message.' in '.$file.':'.$line;
switch ($severity) {
case E_ERROR:
case E_USER_ERROR:
$this->logger->error($log, [
'category' => get_class($this),
]);
break;
case E_WARNING:
case E_USER_WARNING:
$this->logger->warning($log, [
default:
$this->logger->debug($log, [
throw new ErrorException($message, 0, $severity, $file, $line);
});
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.