Completed
Pull Request — master (#42)
by claudio
10:02
created
app/Console/Commands/Optimise/Path.php 1 patch
Braces   +13 added lines, -8 removed lines patch added patch discarded remove patch
@@ -48,8 +48,9 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function __destruct()
50 50
     {
51
-        if ($this->path && is_dir($this->path) && !self::delTree($this->path))
52
-            throw new OptimiseException('problems during removing of path directory');
51
+        if ($this->path && is_dir($this->path) && !self::delTree($this->path)) {
52
+                    throw new OptimiseException('problems during removing of path directory');
53
+        }
53 54
     }
54 55
 
55 56
     /**
@@ -76,12 +77,16 @@  discard block
 block discarded – undo
76 77
     {
77 78
         $path = new Path(tempnam(sys_get_temp_dir(), 'OPT')); //TODO check the return in case of errors this return false on failure
78 79
         unlink($path->getPath()); //remove file to create a dir
79
-        if(file_exists($path->getPath()))
80
-            throw new OptimiseException('problem during creation of tmp dir (the directory already exists)');
81
-        if(!@mkdir($path->getPath()))
82
-            throw new OptimiseException('problem during creation of tmp dir (mkdir problem)');;
83
-        if(! is_dir($path->getPath()))
84
-            throw new OptimiseException('problem during creation of tmp dir (it is not possible to create directory)');
80
+        if(file_exists($path->getPath())) {
81
+                    throw new OptimiseException('problem during creation of tmp dir (the directory already exists)');
82
+        }
83
+        if(!@mkdir($path->getPath())) {
84
+                    throw new OptimiseException('problem during creation of tmp dir (mkdir problem)');
85
+        }
86
+        ;
87
+        if(! is_dir($path->getPath())) {
88
+                    throw new OptimiseException('problem during creation of tmp dir (it is not possible to create directory)');
89
+        }
85 90
         return $path;
86 91
     }
87 92
 
Please login to merge, or discard this patch.
app/Listeners/Optimise/OkListener.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,9 @@
 block discarded – undo
33 33
         self::sendCompanyEmail($event->getCompany()->email);
34 34
         //send emails to employees
35 35
         $employees = $event->getCompany()->employees()->with('meetings')->get();
36
-        foreach($employees as $employee)
37
-            self::sendEmployeeEmail($employee->email, $employee->meetings);
36
+        foreach($employees as $employee) {
37
+                    self::sendEmployeeEmail($employee->email, $employee->meetings);
38
+        }
38 39
     }
39 40
 
40 41
     /**
Please login to merge, or discard this patch.
app/Http/Controllers/Companies/Auth/AuthController.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,8 +90,9 @@
 block discarded – undo
90 90
         {
91 91
             config(['jwt.ttl' =>'43200']); //30 days
92 92
             $this->custom = array_merge($this->custom, ['remember'=>'true']);
93
-        }else
94
-            $this->custom = array_merge($this->custom, ['remember'=>'false']);
93
+        } else {
94
+                    $this->custom = array_merge($this->custom, ['remember'=>'false']);
95
+        }
95 96
         return $this->postLoginOriginal($request);
96 97
     }
97 98
 
Please login to merge, or discard this patch.
app/Http/Controllers/Employees/Auth/AuthController.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,8 +90,9 @@
 block discarded – undo
90 90
         {
91 91
             config(['jwt.ttl' =>'43200']); //30 days
92 92
             $this->custom = array_merge($this->custom, ['remember'=>'true']);
93
-        }else
94
-            $this->custom = array_merge($this->custom, ['remember'=>'false']);
93
+        } else {
94
+                    $this->custom = array_merge($this->custom, ['remember'=>'false']);
95
+        }
95 96
         return $this->postLoginOriginal($request);
96 97
     }
97 98
 
Please login to merge, or discard this patch.