Completed
Push — master ( 4f25b6...e7033c )
by Joao
02:34
created
src/Traits/CaptchaTrait.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,10 +15,11 @@
 block discarded – undo
15 15
         $recaptcha = new ReCaptcha($secret);
16 16
         $resp = $recaptcha->verify($response, $remoteip);
17 17
 
18
-        if ($resp->isSuccess())
19
-            return true;
20
-        else
21
-            return false;
18
+        if ($resp->isSuccess()) {
19
+                    return true;
20
+        } else {
21
+                    return false;
22
+        }
22 23
     }
23 24
 
24 25
 }
25 26
\ No newline at end of file
Please login to merge, or discard this patch.
src/Traits/Creation.php 1 patch
Braces   +19 added lines, -15 removed lines patch added patch discarded remove patch
@@ -14,10 +14,11 @@  discard block
 block discarded – undo
14 14
 
15 15
         // create a event to happen on deleting
16 16
         static::deleting(function($table)  {
17
-            if (class_exists('Cartalyst\Sentinel\Laravel\Facades\Sentinel'))
18
-                $table->deleted_by = Sentinel::getUser()->id;
19
-            else
20
-                $table->deleted_by = Auth::user()->id;
17
+            if (class_exists('Cartalyst\Sentinel\Laravel\Facades\Sentinel')) {
18
+                            $table->deleted_by = Sentinel::getUser()->id;
19
+            } else {
20
+                            $table->deleted_by = Auth::user()->id;
21
+            }
21 22
 
22 23
             $table->update(['deleted_by' => $table->deleted_by]);
23 24
         });
@@ -27,19 +28,22 @@  discard block
 block discarded – undo
27 28
 
28 29
             if (class_exists('Cartalyst\Sentinel\Laravel\Facades\Sentinel'))
29 30
             {
30
-                if (Sentinel::check())
31
-                    $table->modified_by = Sentinel::getUser()->id;
32
-
33
-                if (Sentinel::check() && ($table->created_by == null || !($table->created_by > 0)))
34
-                    $table->created_by = Sentinel::getUser()->id;
35
-            }
36
-            else
31
+                if (Sentinel::check()) {
32
+                                    $table->modified_by = Sentinel::getUser()->id;
33
+                }
34
+
35
+                if (Sentinel::check() && ($table->created_by == null || !($table->created_by > 0))) {
36
+                                    $table->created_by = Sentinel::getUser()->id;
37
+                }
38
+            } else
37 39
             {
38
-                if (!Auth::guest())
39
-                    $table->modified_by = Auth::user()->id;
40
+                if (!Auth::guest()) {
41
+                                    $table->modified_by = Auth::user()->id;
42
+                }
40 43
 
41
-                if (!Auth::guest() && ($table->created_by == null || !($table->created_by > 0)))
42
-                    $table->created_by = Auth::user()->id;
44
+                if (!Auth::guest() && ($table->created_by == null || !($table->created_by > 0))) {
45
+                                    $table->created_by = Auth::user()->id;
46
+                }
43 47
             }
44 48
 
45 49
         });
Please login to merge, or discard this patch.
src/Database/MySqlGrammar.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -122,8 +122,7 @@
 block discarded – undo
122 122
                 if ( isset($command->length) )
123 123
                 {
124 124
                     $column .= "({$command->length})";
125
-                }
126
-                elseif ( 'string' == $blueprintColumn->type && $blueprintColumn->length > 255 )
125
+                } elseif ( 'string' == $blueprintColumn->type && $blueprintColumn->length > 255 )
127 126
                 {
128 127
                     $column .= '(255)';
129 128
                 }
Please login to merge, or discard this patch.
src/Database/Blueprint.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,8 +109,9 @@
 block discarded – undo
109 109
         // If no name was specified for this index, we will create one using a basic
110 110
         // convention of the table name, followed by the columns, followed by an
111 111
         // index type, such as primary or index, which makes the index unique.
112
-        if (is_null($index))
113
-            $index = $this->createIndexName($type, $columns);
112
+        if (is_null($index)) {
113
+                    $index = $this->createIndexName($type, $columns);
114
+        }
114 115
         return $this->addCommand($type, compact('index', 'columns', 'length'));
115 116
     }
116 117
 
Please login to merge, or discard this patch.
src/Commands/SetupCommand.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -57,8 +57,9 @@  discard block
 block discarded – undo
57 57
             return (!(stripos($var, 'jlourenco.') === false) && $var != 'jlourenco.php');
58 58
         });
59 59
 
60
-        if ($fileExists)
61
-            unlink($mainFile);
60
+        if ($fileExists) {
61
+                    unlink($mainFile);
62
+        }
62 63
 
63 64
         touch($mainFile);
64 65
 
@@ -71,8 +72,9 @@  discard block
 block discarded – undo
71 72
 
72 73
             while ($line = fgets($in))
73 74
             {
74
-                if ((stripos($line, '<?php') === false) && (stripos($line, '];') === false) && (stripos($line, 'return [') === false))
75
-                    $content .= $line;
75
+                if ((stripos($line, '<?php') === false) && (stripos($line, '];') === false) && (stripos($line, 'return [') === false)) {
76
+                                    $content .= $line;
77
+                }
76 78
             }
77 79
 
78 80
             fclose($in);
@@ -84,8 +86,9 @@  discard block
 block discarded – undo
84 86
 
85 87
         $bytesWritten = File::append($mainFile, $content);
86 88
 
87
-        if ($bytesWritten === false)
88
-            $this->info('Couldn\'t write to config file.');
89
+        if ($bytesWritten === false) {
90
+                    $this->info('Couldn\'t write to config file.');
91
+        }
89 92
 
90 93
         $this->info('Config files compiled');
91 94
     }
Please login to merge, or discard this patch.
src/supportServiceProvider.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -121,8 +121,9 @@
 block discarded – undo
121 121
 
122 122
         $config = $this->app['config']->get('jlourenco.support');
123 123
 
124
-        if (array_get($config, 'Setting.autoAlias'))
125
-            $this->app->alias('setting', 'jlourenco\support\Setting');
124
+        if (array_get($config, 'Setting.autoAlias')) {
125
+                    $this->app->alias('setting', 'jlourenco\support\Setting');
126
+        }
126 127
     }
127 128
 
128 129
     /**
Please login to merge, or discard this patch.
src/Setting.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -174,8 +174,7 @@
 block discarded – undo
174 174
         if (is_file($this->path.'/'.$this->filename))
175 175
         {
176 176
             $this->settings = json_decode(file_get_contents($this->path.'/'.$this->filename), true);
177
-        }
178
-        else
177
+        } else
179 178
         {
180 179
             $this->settings = array();
181 180
         }
Please login to merge, or discard this patch.
src/Helpers/FileLoader.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,9 @@
 block discarded – undo
7 7
     {
8 8
         $path = $this->getPath($namespace);
9 9
 
10
-        if (is_null($path))
11
-            return;
10
+        if (is_null($path)) {
11
+                    return;
12
+        }
12 13
 
13 14
         $file = (!$environment || ($environment == 'production')) ? "{$path}/{$group}.php" : "{$path}/{$environment}/{$group}.php";
14 15
 
Please login to merge, or discard this patch.
src/Commands/ConfigCommand.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -57,8 +57,9 @@  discard block
 block discarded – undo
57 57
             return (!(stripos($var, 'jlourenco.') === false) && $var != 'jlourenco.php');
58 58
         });
59 59
 
60
-        if ($fileExists)
61
-            unlink($mainFile);
60
+        if ($fileExists) {
61
+                    unlink($mainFile);
62
+        }
62 63
 
63 64
         touch($mainFile);
64 65
 
@@ -71,8 +72,9 @@  discard block
 block discarded – undo
71 72
 
72 73
             while ($line = fgets($in))
73 74
             {
74
-                if ((stripos($line, '<?php') === false) && (stripos($line, '];') === false) && (stripos($line, 'return [') === false))
75
-                    $content .= $line;
75
+                if ((stripos($line, '<?php') === false) && (stripos($line, '];') === false) && (stripos($line, 'return [') === false)) {
76
+                                    $content .= $line;
77
+                }
76 78
             }
77 79
 
78 80
             fclose($in);
@@ -84,8 +86,9 @@  discard block
 block discarded – undo
84 86
 
85 87
         $bytesWritten = File::append($mainFile, $content);
86 88
 
87
-        if ($bytesWritten === false)
88
-            $this->info('Couldn\'t write to config file.');
89
+        if ($bytesWritten === false) {
90
+                    $this->info('Couldn\'t write to config file.');
91
+        }
89 92
 
90 93
         $this->info('Config files compiled');
91 94
     }
Please login to merge, or discard this patch.