| Total Complexity | 8 |
| Total Lines | 57 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class AppIdentifier |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * The key registered in the container for the application identifier. |
||
| 9 | */ |
||
| 10 | const IDENTIFIER_KEY = 'apps.identifier'; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Get the current application identifier. |
||
| 14 | * |
||
| 15 | * @return string |
||
| 16 | */ |
||
| 17 | 3 | public static function get() |
|
| 26 | ); |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Refresh the current application identifier. |
||
| 31 | * |
||
| 32 | * @return void |
||
| 33 | */ |
||
| 34 | 1 | public static function refresh() |
|
| 35 | { |
||
| 36 | 1 | app()->forgetInstance(static::IDENTIFIER_KEY); |
|
| 37 | 1 | } |
|
| 38 | |||
| 39 | /** |
||
| 40 | * Get application identifier for the given URL. |
||
| 41 | * |
||
| 42 | * @param string $url |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | 1 | protected static function getForUrl($url) |
|
| 62 | } |
||
| 63 | } |
||
| 64 |