Test Setup Failed
Push — master ( 09d53f...47950f )
by Robin
02:04
created
src/RequestLoggerServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      */
24 24
     public function register()
25 25
     {
26
-        $this->app->singleton(RequestLogger::class, function () {
26
+        $this->app->singleton(RequestLogger::class, function() {
27 27
             return new RequestLogger();
28 28
         });
29 29
         $this->app->alias(RequestLogger::class, 'request-logger');
Please login to merge, or discard this patch.
src/RequestLogger.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 class RequestLogger
9 9
 {
10 10
     public function saveLog($data, $type = 'access') {
11
-        if(empty($type)) {
11
+        if (empty($type)) {
12 12
             throw new \Exception('Type isnt correct set.');
13 13
         }
14 14
 
@@ -16,10 +16,10 @@  discard block
 block discarded – undo
16 16
 
17 17
         $folder = storage_path($base_path);
18 18
 
19
-        if(!File::exists($folder)) {
19
+        if (!File::exists($folder)) {
20 20
             $result = File::makeDirectory($folder);
21 21
 
22
-            if(!$result) {
22
+            if (!$result) {
23 23
                 throw new \Exception('Cannot create folder in storage path.');
24 24
             }
25 25
         }
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         $file = storage_path($base_path.'/'.$date_folder.'/'.$type.'.log');
29 29
 
30 30
         $write_check = File::put($file, $data);
31
-        if(!$write_check) {
31
+        if (!$write_check) {
32 32
             throw new \Exception('Cannot write content to file.');
33 33
         }
34 34
 
Please login to merge, or discard this patch.