Passed
Push — master ( 0991d4...ef4a94 )
by Fran
04:27
created
src/base/types/helpers/FileHelper.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  */
9 9
 class FileHelper {
10 10
     /**
11
-     * @param mixed $data
11
+     * @param string $data
12 12
      * @param string $path
13 13
      * @return int
14 14
      */
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
     /**
20 20
      * @param string $path
21
-     * @return mixed|bool
21
+     * @return string|false
22 22
      */
23 23
     public static function readFile($path) {
24 24
         $data = false;
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
     }
52 52
 
53 53
     /**
54
-     * @param $path
55
-     * @return bool
54
+     * @param string $path
55
+     * @return boolean|null
56 56
      */
57 57
     public static function deleteDir($path) {
58 58
         (new Filesystem())->remove($path);
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public static function readFile($path) {
24 24
         $data = false;
25
-        if(file_exists($path)) {
25
+        if (file_exists($path)) {
26 26
             $data = file_get_contents($path);
27 27
         }
28 28
         return $data;
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      * @return string
36 36
      */
37 37
     public static function generateHashFilename($verb, $slug, array $query = []) {
38
-        return sha1(strtolower($verb) . " " . $slug . " " . strtolower(http_build_query($query)));
38
+        return sha1(strtolower($verb)." ".$slug." ".strtolower(http_build_query($query)));
39 39
     }
40 40
 
41 41
     /**
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
     public static function generateCachePath(array $action, array $query = []) {
47 47
         $class = GeneratorHelper::extractClassFromNamespace($action['class']);
48 48
         $filename = self::generateHashFilename($action["http"], $action["slug"], $query);
49
-        $subPath = substr($filename, 0, 2) . DIRECTORY_SEPARATOR . substr($filename, 2, 2);
50
-        return $action['module'] . DIRECTORY_SEPARATOR . $class . DIRECTORY_SEPARATOR . $action['method'] . DIRECTORY_SEPARATOR . $subPath . DIRECTORY_SEPARATOR;
49
+        $subPath = substr($filename, 0, 2).DIRECTORY_SEPARATOR.substr($filename, 2, 2);
50
+        return $action['module'].DIRECTORY_SEPARATOR.$class.DIRECTORY_SEPARATOR.$action['method'].DIRECTORY_SEPARATOR.$subPath.DIRECTORY_SEPARATOR;
51 51
     }
52 52
 
53 53
     /**
Please login to merge, or discard this patch.