Total Complexity | 5 |
Total Lines | 58 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | abstract class AbstractTestCase extends OrchestraTestCase |
||
10 | { |
||
11 | /** |
||
12 | * @var Filesystem |
||
13 | */ |
||
14 | protected $files; |
||
15 | |||
16 | /** |
||
17 | * Define environment setup. |
||
18 | * |
||
19 | * @param \Illuminate\Foundation\Application $app |
||
20 | * |
||
21 | * @return void |
||
22 | */ |
||
23 | protected function getEnvironmentSetUp($app) |
||
24 | { |
||
25 | $this->files = new Filesystem(); |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * Get package providers. |
||
30 | * |
||
31 | * @param \Illuminate\Foundation\Application $app |
||
32 | * @return array |
||
33 | */ |
||
34 | protected function getPackageProviders($app) |
||
|
|||
35 | { |
||
36 | return [ |
||
37 | HandlersServiceProvider::class, |
||
38 | ]; |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * Make the directory. |
||
43 | * |
||
44 | * @param string $path |
||
45 | * @return string |
||
46 | */ |
||
47 | protected function makeDirectory(string $path): string |
||
48 | { |
||
49 | if (! $this->files->isDirectory(dirname($path))) { |
||
50 | $this->files->makeDirectory(dirname($path), 0777, true, true); |
||
51 | } |
||
52 | |||
53 | return $path; |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * Put contents to file. |
||
58 | * |
||
59 | * @param string $path |
||
60 | * @param string $contents |
||
61 | * @param bool $lock |
||
62 | */ |
||
63 | protected function forceFilePutContents(string $path, string $contents, bool $lock = false): void |
||
67 | } |
||
68 | } |
||
69 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.