| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public static function guess(string $projectDir, string $stage): string |
||
| 12 | { |
||
| 13 | if (is_dir($configDir = sprintf(self::CONFIG_DIR, $projectDir))) { |
||
| 14 | return sprintf('%s/%s/deploy.php', $configDir, $stage); |
||
| 15 | } |
||
| 16 | |||
| 17 | if (is_dir($configDir = sprintf(self::LEGACY_CONFIG_DIR, $projectDir))) { |
||
| 18 | return sprintf('%s/deploy_%s.php', $configDir, $stage); |
||
| 19 | } |
||
| 20 | |||
| 21 | throw new \RuntimeException(sprintf('None of the usual Laravel config dirs exist in the application. Create one of these dirs before continuing: "%s" or "%s".', self::CONFIG_DIR, self::LEGACY_CONFIG_DIR)); |
||
| 22 | } |
||
| 24 |