| Total Complexity | 5 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class Domain extends BaseDomain |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * {@inheritdoc} |
||
| 15 | */ |
||
| 16 | public function getCachedServicesPath(): string |
||
| 17 | { |
||
| 18 | // This checks if we are running on a Laravel Vapor managed instance |
||
| 19 | // and sets the path to a writable one (services path is not on a writable storage in Vapor). |
||
| 20 | if (!is_null(env('VAPOR_MAINTENANCE_MODE', null))) { |
||
| 21 | return Str::replaceLast('config.php', $this->getSnakeName() . '_domain.php', $this->app->getCachedConfigPath()); |
||
| 22 | } |
||
| 23 | |||
| 24 | return Str::replaceLast('services.php', $this->getSnakeName() . '_domain.php', $this->app->getCachedServicesPath()); |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * {@inheritdoc} |
||
| 29 | */ |
||
| 30 | public function registerProviders(): void |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * {@inheritdoc} |
||
| 38 | */ |
||
| 39 | public function registerAliases(): void |
||
| 47 |