Passed
Push — master ( f89ee0...ab76f6 )
by Patryk
01:15
created
src/Cache/CacheFile.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
      */
12 12
     public static function isCacheDir()
13 13
     {
14
-        if(!is_dir(__DIR__ .'/cache/')) mkdir(__DIR__ ."/cache/", 0700);
14
+        if (!is_dir(__DIR__.'/cache/')) mkdir(__DIR__."/cache/", 0700);
15 15
 
16 16
         return true;
17 17
     }
@@ -23,11 +23,11 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public static function isFile()
25 25
     {
26
-        $files = glob(__DIR__ .'/cache/*.txt');
26
+        $files = glob(__DIR__.'/cache/*.txt');
27 27
         $count = count($files);
28
-        if($count>0){
28
+        if ($count>0) {
29 29
             $output = true;
30
-        }else{
30
+        }else {
31 31
             $output = false;
32 32
         }
33 33
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public static function getFileName()
43 43
     {
44
-        $files = glob(__DIR__ .'/cache/*.txt');
44
+        $files = glob(__DIR__.'/cache/*.txt');
45 45
         $file = $files[0];
46 46
         $fileName = explode("/cache/", $file);
47 47
         $fileName = $fileName[1];
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
         $getSourceName = $getSourceName[0];
61 61
 
62 62
         $current_time = time();
63
-        if($current_time>$getSourceName){
63
+        if ($current_time>$getSourceName) {
64 64
                 $output = false;
65
-        }else{
65
+        }else {
66 66
                 $output = true;
67 67
         }
68 68
 
@@ -79,13 +79,13 @@  discard block
 block discarded – undo
79 79
      */
80 80
     public static function setNewCacheFile($file, $data, $time)
81 81
     {
82
-        if($file) unlink(__DIR__ .'/cache/'.$file);
82
+        if ($file) unlink(__DIR__.'/cache/'.$file);
83 83
 
84 84
         $current_time = time();
85 85
         $new_time = $current_time + $time*60;
86 86
 
87 87
         $file_name = $new_time.".txt";
88
-        file_put_contents(__DIR__ .'/cache/'.$file_name, $data);
88
+        file_put_contents(__DIR__.'/cache/'.$file_name, $data);
89 89
 
90 90
         return true;
91 91
     }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      */
98 98
     public static function getCache($file)
99 99
     {
100
-        $data = file_get_contents(__DIR__ .'/cache/'.$file);
100
+        $data = file_get_contents(__DIR__.'/cache/'.$file);
101 101
 
102 102
         return $data;
103 103
     }
Please login to merge, or discard this patch.