Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
FakerServiceProvider | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | n/a |
0 / 0 |
|||
register | n/a |
0 / 0 |
n/a |
0 / 0 |
1 |
1 | <?php |
2 | namespace Apie\Faker; |
3 | |
4 | use Apie\ServiceProviderGenerator\UseGeneratedMethods; |
5 | use Illuminate\Support\ServiceProvider; |
6 | |
7 | /** |
8 | * This file is generated with apie/service-provider-generator from file: faker.yaml |
9 | * @codeCoverageIgnore |
10 | */ |
11 | class FakerServiceProvider extends ServiceProvider |
12 | { |
13 | use UseGeneratedMethods; |
14 | |
15 | public function register() |
16 | { |
17 | $this->app->singleton( |
18 | \Faker\Generator::class, |
19 | function ($app) { |
20 | return call_user_func( |
21 | 'Apie\\Common\\Wrappers\\GeneralServiceFactory::createFaker', |
22 | $this->getTaggedServicesIterator('apie.faker') |
23 | ); |
24 | |
25 | } |
26 | ); |
27 | $this->app->singleton( |
28 | \Apie\Faker\Command\ApieSeedCommand::class, |
29 | function ($app) { |
30 | return new \Apie\Faker\Command\ApieSeedCommand( |
31 | $app->make(\Apie\Core\BoundedContext\BoundedContextHashmap::class), |
32 | $app->make('apie') |
33 | ); |
34 | } |
35 | ); |
36 | \Apie\ServiceProviderGenerator\TagMap::register( |
37 | $this->app, |
38 | \Apie\Faker\Command\ApieSeedCommand::class, |
39 | array( |
40 | 0 => 'console.command', |
41 | ) |
42 | ); |
43 | $this->app->tag([\Apie\Faker\Command\ApieSeedCommand::class], 'console.command'); |
44 | $this->app->singleton( |
45 | \Apie\Faker\Datalayers\FakerDatalayer::class, |
46 | function ($app) { |
47 | return new \Apie\Faker\Datalayers\FakerDatalayer( |
48 | $app->make(\Faker\Generator::class), |
49 | $app->make(\Apie\Core\Datalayers\Search\LazyLoadedListFilterer::class) |
50 | ); |
51 | } |
52 | ); |
53 | \Apie\ServiceProviderGenerator\TagMap::register( |
54 | $this->app, |
55 | \Apie\Faker\Datalayers\FakerDatalayer::class, |
56 | array( |
57 | 0 => 'apie.datalayer', |
58 | ) |
59 | ); |
60 | $this->app->tag([\Apie\Faker\Datalayers\FakerDatalayer::class], 'apie.datalayer'); |
61 | $this->app->bind('apie.faker', \Faker\Generator::class); |
62 | |
63 | |
64 | } |
65 | } |