Total Complexity | 10 |
Total Lines | 61 |
Duplicated Lines | 0 % |
Changes | 4 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | trait ResetsApplication |
||
11 | { |
||
12 | protected function resetApplication(): void |
||
13 | { |
||
14 | $this->resetMedia(); |
||
|
|||
15 | $this->resetPages(); |
||
16 | $this->resetPosts(); |
||
17 | $this->resetDocs(); |
||
18 | $this->resetSite(); |
||
19 | } |
||
20 | |||
21 | /** @deprecated unless applicable usages are found */ |
||
22 | protected function resetMedia(): void |
||
23 | { |
||
24 | // |
||
25 | } |
||
26 | |||
27 | protected function resetPages(): void |
||
28 | { |
||
29 | array_map('\Hyde\Testing\TestCase::unlinkUnlessDefault', glob(Hyde::path('_pages/*.md'))); |
||
30 | array_map('\Hyde\Testing\TestCase::unlinkUnlessDefault', glob(Hyde::path('_pages/*.blade.php'))); |
||
31 | } |
||
32 | |||
33 | protected function resetPosts(): void |
||
36 | } |
||
37 | |||
38 | protected function resetDocs(): void |
||
39 | { |
||
40 | array_map('\Hyde\Testing\TestCase::unlinkUnlessDefault', glob(Hyde::path('_docs/*.md'))); |
||
41 | } |
||
42 | |||
43 | protected function resetSite(): void |
||
44 | { |
||
45 | Filesystem::cleanDirectory('_site'); |
||
46 | } |
||
47 | |||
48 | protected function withoutDefaultPages(): void |
||
49 | { |
||
50 | Hyde::unlink('_pages/404.blade.php'); |
||
51 | Hyde::unlink('_pages/index.blade.php'); |
||
52 | } |
||
53 | |||
54 | protected function restoreDefaultPages(): void |
||
58 | } |
||
59 | |||
60 | protected static function unlinkUnlessDefault(string $filepath): void |
||
61 | { |
||
71 | } |
||
72 | } |
||
73 | } |
||
74 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.