1 | <?php |
||
9 | class DirectoriesHaveCorrectPermissions implements Check |
||
10 | { |
||
11 | /** @var Filesystem */ |
||
12 | private $filesystem; |
||
13 | |||
14 | /** @var Collection */ |
||
15 | private $paths; |
||
16 | |||
17 | /** |
||
18 | * DirectoriesHaveCorrectPermissions constructor. |
||
19 | * @param Filesystem $filesystem |
||
20 | */ |
||
21 | 4 | public function __construct(Filesystem $filesystem) |
|
22 | { |
||
23 | 4 | $this->filesystem = $filesystem; |
|
24 | 4 | } |
|
25 | |||
26 | /** |
||
27 | * The name of the check. |
||
28 | * |
||
29 | * @param array $config |
||
30 | * @return string |
||
31 | */ |
||
32 | public function name(array $config): string |
||
33 | { |
||
34 | return trans('self-diagnosis::checks.directories_have_correct_permissions.name'); |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * The error message to display in case the check does not pass. |
||
39 | * |
||
40 | * @param array $config |
||
41 | * @return string |
||
42 | */ |
||
43 | public function message(array $config): string |
||
44 | { |
||
45 | return trans('self-diagnosis::checks.directories_have_correct_permissions.message', [ |
||
46 | 'directories' => $this->paths->implode(PHP_EOL), |
||
47 | ]); |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * Perform the actual verification of this check. |
||
52 | * |
||
53 | * @param array $config |
||
54 | * @return bool |
||
55 | */ |
||
56 | 4 | public function check(array $config): bool |
|
66 | } |
||
67 |