| Conditions | 2 |
| Paths | 2 |
| Total Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | 51 | public function boot() |
|
| 17 | { |
||
| 18 | 51 | $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); |
|
| 19 | |||
| 20 | 51 | if ($this->app->runningInConsole()) { |
|
| 21 | 51 | $this->publishes([ |
|
| 22 | 51 | __DIR__.'/../config/config.php' => config_path('ab-testing.php'), |
|
| 23 | 51 | ], 'config'); |
|
| 24 | |||
| 25 | 51 | $this->commands([ |
|
| 26 | 51 | ReportCommand::class, |
|
| 27 | ResetCommand::class, |
||
| 28 | ]); |
||
| 29 | } |
||
| 30 | |||
| 31 | Request::macro('abExperiment', function () { |
||
| 32 | 3 | return app(AbTesting::class)->getExperiment(); |
|
| 33 | 51 | }); |
|
| 34 | |||
| 35 | Blade::if('ab', function ($experiment) { |
||
| 36 | 3 | return app(AbTesting::class)->isExperiment($experiment); |
|
| 37 | 51 | }); |
|
| 38 | 51 | } |
|
| 39 | |||
| 54 |