Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
6 / 6
ConsolePackage
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
6 / 6
 addToContainer
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
6 / 6
<?php declare(strict_types=1);
namespace Bone\Console;
use Barnacle\Container;
use Barnacle\RegistrationInterface;
class ConsolePackage implements RegistrationInterface
{
    /**
     * @param Container $c
     */
    public function addToContainer(Container $c)
    {
        $c[ConsoleApplication::class] = $c->factory(function(Container $c) {
            $app = new ConsoleApplication();
            $consoleCommands = $c->get('consoleCommands');
            $app->addCommands($consoleCommands);
            return $app;
        });
    }
}