Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| MakerServiceProvider | 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\Maker; |
| 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: maker.yaml |
| 9 | * @codeCoverageIgnore |
| 10 | */ |
| 11 | class MakerServiceProvider extends ServiceProvider |
| 12 | { |
| 13 | use UseGeneratedMethods; |
| 14 | |
| 15 | public function register() |
| 16 | { |
| 17 | $this->app->singleton( |
| 18 | \Apie\Maker\CodeGenerators\CreateDomainObject::class, |
| 19 | function ($app) { |
| 20 | return new \Apie\Maker\CodeGenerators\CreateDomainObject( |
| 21 | $this->parseArgument('%apie.bounded_contexts%', \Apie\Maker\CodeGenerators\CreateDomainObject::class, 0), |
| 22 | $this->parseArgument('%apie.scan_bounded_contexts%', \Apie\Maker\CodeGenerators\CreateDomainObject::class, 1) |
| 23 | ); |
| 24 | } |
| 25 | ); |
| 26 | $this->app->singleton( |
| 27 | \Apie\Maker\Command\ApieCreateDomainCommand::class, |
| 28 | function ($app) { |
| 29 | return new \Apie\Maker\Command\ApieCreateDomainCommand( |
| 30 | $app->make(\Apie\Core\BoundedContext\BoundedContextHashmap::class), |
| 31 | $app->make(\Apie\Maker\CodeGenerators\CreateDomainObject::class), |
| 32 | $app->make(\Apie\Core\Other\FileWriterInterface::class) |
| 33 | ); |
| 34 | } |
| 35 | ); |
| 36 | \Apie\ServiceProviderGenerator\TagMap::register( |
| 37 | $this->app, |
| 38 | \Apie\Maker\Command\ApieCreateDomainCommand::class, |
| 39 | array( |
| 40 | 0 => |
| 41 | array( |
| 42 | 'name' => 'console.command', |
| 43 | ), |
| 44 | ) |
| 45 | ); |
| 46 | $this->app->tag([\Apie\Maker\Command\ApieCreateDomainCommand::class], 'console.command'); |
| 47 | $this->app->singleton( |
| 48 | \Apie\Maker\BoundedContext\Services\CodeWriter::class, |
| 49 | function ($app) { |
| 50 | return new \Apie\Maker\BoundedContext\Services\CodeWriter( |
| 51 | $app->make(\Apie\Core\Other\FileWriterInterface::class) |
| 52 | ); |
| 53 | } |
| 54 | ); |
| 55 | \Apie\ServiceProviderGenerator\TagMap::register( |
| 56 | $this->app, |
| 57 | \Apie\Maker\BoundedContext\Services\CodeWriter::class, |
| 58 | array( |
| 59 | 0 => 'apie.context', |
| 60 | ) |
| 61 | ); |
| 62 | $this->app->tag([\Apie\Maker\BoundedContext\Services\CodeWriter::class], 'apie.context'); |
| 63 | $this->app->singleton( |
| 64 | \Apie\Maker\ContextBuilders\AddMakerConfigToContext::class, |
| 65 | function ($app) { |
| 66 | return new \Apie\Maker\ContextBuilders\AddMakerConfigToContext( |
| 67 | $this->parseArgument('%apie.maker%', \Apie\Maker\ContextBuilders\AddMakerConfigToContext::class, 0) |
| 68 | ); |
| 69 | } |
| 70 | ); |
| 71 | \Apie\ServiceProviderGenerator\TagMap::register( |
| 72 | $this->app, |
| 73 | \Apie\Maker\ContextBuilders\AddMakerConfigToContext::class, |
| 74 | array( |
| 75 | 0 => 'apie.core.context_builder', |
| 76 | ) |
| 77 | ); |
| 78 | $this->app->tag([\Apie\Maker\ContextBuilders\AddMakerConfigToContext::class], 'apie.core.context_builder'); |
| 79 | |
| 80 | } |
| 81 | } |