1 | <?php |
||
5 | class PermissionsChecker |
||
6 | { |
||
7 | /** |
||
8 | * @var array |
||
9 | */ |
||
10 | protected $results = []; |
||
11 | |||
12 | /** |
||
13 | * Set the result array permissions and errors. |
||
14 | * |
||
15 | * @return mixed |
||
|
|||
16 | */ |
||
17 | public function __construct() |
||
23 | |||
24 | /** |
||
25 | * Check for the folders permissions. |
||
26 | * |
||
27 | * @param array $folders |
||
28 | * @return array |
||
29 | */ |
||
30 | public function check(array $folders) |
||
45 | |||
46 | /** |
||
47 | * Get a folder permission. |
||
48 | * |
||
49 | * @param $folder |
||
50 | * @return string |
||
51 | */ |
||
52 | private function getPermission($folder) |
||
56 | |||
57 | /** |
||
58 | * Add the file to the list of results. |
||
59 | * |
||
60 | * @param $folder |
||
61 | * @param $permission |
||
62 | * @param $isSet |
||
63 | */ |
||
64 | private function addFile($folder, $permission, $isSet) |
||
72 | |||
73 | /** |
||
74 | * Add the file and set the errors. |
||
75 | * |
||
76 | * @param $folder |
||
77 | * @param $permission |
||
78 | * @param $isSet |
||
79 | */ |
||
80 | private function addFileAndSetErrors($folder, $permission, $isSet) |
||
86 | } |
||
87 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.