Total Complexity | 5 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Coverage | 40% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class DynamicExport |
||
8 | { |
||
9 | /** |
||
10 | * Indicates if NovaExportConfiguration migrations will be run. |
||
11 | */ |
||
12 | public static bool $runsMigrations = true; |
||
13 | |||
14 | /** |
||
15 | * Indicates if NovaExportConfiguration will provide download route. |
||
16 | */ |
||
17 | public static bool $useRoutes = true; |
||
18 | |||
19 | /** |
||
20 | * Route Configuration callback |
||
21 | */ |
||
22 | public static Closure|null $routeConfigurationCallback = null; |
||
23 | |||
24 | public static function ignoreMigrations(): static |
||
25 | { |
||
26 | static::$runsMigrations = false; |
||
27 | |||
28 | return new static; |
||
29 | } |
||
30 | |||
31 | public static function withoutRoutes(): static |
||
32 | { |
||
33 | static::$useRoutes = false; |
||
34 | |||
35 | return new static; |
||
36 | } |
||
37 | |||
38 | 10 | public static function routeConfiguration(?\Closure $callback = null): mixed |
|
53 | 10 | ]; |
|
54 | } |
||
55 | |||
57 |