Completed
Push — master ( 3338f6...2ff2f4 )
by Aydin
02:03
created

app/config.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
use function DI\factory;
4
use function DI\object;
5
use Interop\Container\ContainerInterface;
6
use PhpSchool\LearnYouPhp\Exercise\ArrayWeGo;
7
use PhpSchool\LearnYouPhp\Exercise\BabySteps;
8
use PhpSchool\LearnYouPhp\Exercise\ExceptionalCoding;
9
use PhpSchool\LearnYouPhp\Exercise\FilteredLs;
10
use PhpSchool\LearnYouPhp\Exercise\HelloWorld;
11
use PhpSchool\LearnYouPhp\Exercise\HttpJsonApi;
12
use PhpSchool\LearnYouPhp\Exercise\MyFirstIo;
13
use PhpSchool\LearnYouPhp\Exercise\TimeServer;
14
use PhpSchool\LearnYouPhp\TcpSocketFactory;
15
use Symfony\Component\Filesystem\Filesystem;
16
use Faker\Factory as FakerFactory;
17
18
return [
19
    //Exercises
20
    BabySteps::class    => object(BabySteps::class),
21
    HelloWorld::class   => object(HelloWorld::class),
22
    HttpJsonApi::class  => object(HttpJsonApi::class),
23
    MyFirstIo::class    => factory(function (ContainerInterface $c) {
24
        return new MyFirstIo($c->get(Filesystem::class), FakerFactory::create());
25
    }),
26
    FilteredLs::class   => factory(function (ContainerInterface $c) {
27
        return new FilteredLs($c->get(Filesystem::class));
28
    }),
29
    ArrayWeGo::class    => factory(function (ContainerInterface $c) {
30
        return new ArrayWeGo($c->get(Filesystem::class), FakerFactory::create());
31
    }),
32
    ExceptionalCoding::class => factory(function (ContainerInterface $c) {
33
        return new ExceptionalCoding($c->get(Filesystem::class), FakerFactory::create());
34
    }),
35
    TimeServer::class   => factory(function (ContainerInterface $c) {
0 ignored issues
show
The parameter $c is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
36
        return new TimeServer(new TcpSocketFactory);
37
    }),
38
];
39