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