@@ -48,8 +48,9 @@ discard block |
||
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 |
||
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 |
@@ -33,8 +33,9 @@ |
||
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 | /** |
@@ -111,8 +111,9 @@ |
||
111 | 111 | { |
112 | 112 | config(['jwt.ttl' =>'43200']); //30 days |
113 | 113 | $this->custom = array_merge($this->custom, ['remember'=>'true']); |
114 | - }else |
|
115 | - $this->custom = array_merge($this->custom, ['remember'=>'false']); |
|
114 | + } else { |
|
115 | + $this->custom = array_merge($this->custom, ['remember'=>'false']); |
|
116 | + } |
|
116 | 117 | |
117 | 118 | return $this->postLoginOriginal($request); |
118 | 119 | } |
@@ -90,8 +90,9 @@ |
||
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 |