for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Install GitHub App
<?php
namespace Overblog\GraphQLBundle\Definition;
final class LazyConfig
{
/** @var \Closure */
private $loader;
/** @var GlobalVariables */
private $globalVariables;
/**
* @var callable
*/
private $onPostLoad = [];
private function __construct(\Closure $loader, GlobalVariables $globalVariables = null)
$this->loader = $loader;
$this->globalVariables = $globalVariables ?: new GlobalVariables();
}
public static function create(\Closure $loader, GlobalVariables $globalVariables = null)
return new self($loader, $globalVariables);
* @return array
public function load()
$loader = $this->loader;
$config = $loader($this->globalVariables);
foreach ($this->onPostLoad as $postLoader) {
$this->onPostLoad
callable
$config = $postLoader($config);
return $config;
public function addPostLoader(callable $postLoader)
$this->onPostLoad[] = $postLoader;