for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of expect package.
*
* (c) Noritaka Horio <[email protected]>
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace expect\configurator;
use expect\Configurator;
use expect\context\DefaultContextFactory;
use expect\factory\DefaultMatcherFactory;
use expect\package\DefaultPackageRegistrar;
use expect\registry\DefaultMatcherRegistry;
use expect\reporter\ExceptionReporter;
* Default configurator
* Configure by the default
* @author Noritaka Horio <[email protected]>
* @copyright Noritaka Horio <[email protected]>
final class DefaultConfigurator implements Configurator
{
* {@inheritdoc}
public function configure()
$registry = new DefaultMatcherRegistry();
$packageRegistrar = new DefaultPackageRegistrar();
$packageRegistrar->registerTo($registry);
$dictionary = $registry->toDictionary();
$matcherFactory = new DefaultMatcherFactory($dictionary);
return new DefaultContextFactory($matcherFactory, new ExceptionReporter());
}