Completed
Push — master ( 574434...a77268 )
by Joao
06:32
created
src/Traits/Creation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     {
14 14
 
15 15
         // create a event to happen on deleting
16
-        static::deleting(function($table)  {
16
+        static::deleting(function($table) {
17 17
             if (class_exists('Cartalyst\Sentinel\Laravel\Facades\Sentinel'))
18 18
                 $table->deleted_by = Sentinel::getUser()->id;
19 19
             else
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
         });
24 24
 
25 25
         // create a event to happen on saving
26
-        static::saving(function($table)  {
26
+        static::saving(function($table) {
27 27
 
28 28
             if (class_exists('Cartalyst\Sentinel\Laravel\Facades\Sentinel'))
29 29
             {
Please login to merge, or discard this patch.
src/Database/MySqlGrammar.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -13,12 +13,12 @@  discard block
 block discarded – undo
13 13
 
14 14
     public function __construct()
15 15
     {
16
-        if ( ! in_array('Collate', $this->modifiers) )
16
+        if (!in_array('Collate', $this->modifiers))
17 17
         {
18 18
             array_splice($this->modifiers, array_search('Unsigned', $this->modifiers) + 1, 0, 'Collate');
19 19
         }
20 20
         // new versions of Laravel already have comment modifier
21
-        if ( ! in_array('Comment', $this->modifiers) )
21
+        if (!in_array('Comment', $this->modifiers))
22 22
         {
23 23
             array_splice($this->modifiers, array_search('After', $this->modifiers) - 1, 0, 'Comment');
24 24
         }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     protected function modifyCollate(IlluminateBlueprint $blueprint, Fluent $column)
35 35
     {
36
-        if ( ! is_null($column->collate) )
36
+        if (!is_null($column->collate))
37 37
         {
38 38
             $characterSet = strtok($column->collate, '_');
39 39
             return " character set $characterSet collate {$column->collate}";
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     protected function modifyComment(IlluminateBlueprint $blueprint, Fluent $column)
51 51
     {
52
-        if ( ! is_null($column->comment) )
52
+        if (!is_null($column->comment))
53 53
         {
54 54
             $comment = str_replace("'", "\'", $column->comment);
55 55
             return " comment '$comment'";
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     {
69 69
         $sql = parent::compileCreate($blueprint, $command, $connection);
70 70
         // Table annotation support
71
-        if ( isset($blueprint->comment) )
71
+        if (isset($blueprint->comment))
72 72
         {
73 73
             $comment = str_replace("'", "\'", $blueprint->comment);
74 74
             $sql .= " comment = '$comment'";
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      */
96 96
     protected function typeSet(Fluent $column)
97 97
     {
98
-        return "set('" . implode("', '", $column->allowed) . "')";
98
+        return "set('".implode("', '", $column->allowed)."')";
99 99
     }
100 100
 
101 101
     /**
@@ -109,21 +109,21 @@  discard block
 block discarded – undo
109 109
     protected function compileKey(IlluminateBlueprint $blueprint, Fluent $command, $type)
110 110
     {
111 111
         $columns = [];
112
-        foreach($command->columns as $commandColumn)
112
+        foreach ($command->columns as $commandColumn)
113 113
         {
114
-            foreach($blueprint->getColumns() as $blueprintColumn)
114
+            foreach ($blueprint->getColumns() as $blueprintColumn)
115 115
             {
116
-                if ( $blueprintColumn->name != $commandColumn )
116
+                if ($blueprintColumn->name != $commandColumn)
117 117
                 {
118 118
                     continue;
119 119
                 }
120 120
 
121 121
                 $column = $this->wrap($commandColumn);
122
-                if ( isset($command->length) )
122
+                if (isset($command->length))
123 123
                 {
124 124
                     $column .= "({$command->length})";
125 125
                 }
126
-                elseif ( 'string' == $blueprintColumn->type && $blueprintColumn->length > 255 )
126
+                elseif ('string' == $blueprintColumn->type && $blueprintColumn->length > 255)
127 127
                 {
128 128
                     $column .= '(255)';
129 129
                 }
Please login to merge, or discard this patch.
src/Database/Blueprint.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
     public function hasForeign($table, $foreign)
91 91
     {
92 92
         $sql = $this->grammar->compileHasForeign();
93
-        $table = $this->connection->getTablePrefix() . $table;
93
+        $table = $this->connection->getTablePrefix().$table;
94 94
         return count($this->connection->select($sql, [$table, $foreign])) > 0;
95 95
     }
96 96
 
Please login to merge, or discard this patch.
src/Commands/SetupCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
     private function compileConfigFiles()
51 51
     {
52 52
         $path = base_path('/config');
53
-        $mainFile = $path . '/jlourenco.php';
53
+        $mainFile = $path.'/jlourenco.php';
54 54
         $fileExists = file_exists($mainFile);
55 55
 
56
-        $files = array_filter(scandir($path), function ($var) {
56
+        $files = array_filter(scandir($path), function($var) {
57 57
             return (!(stripos($var, 'jlourenco.') === false) && $var != 'jlourenco.php');
58 58
         });
59 59
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
         foreach ($files as $file)
69 69
         {
70
-            $in = fopen($path . '/' . $file, "r");
70
+            $in = fopen($path.'/'.$file, "r");
71 71
 
72 72
             while ($line = fgets($in))
73 73
             {
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
             fclose($in);
79 79
 
80
-            unlink($path . '/' . $file);
80
+            unlink($path.'/'.$file);
81 81
         }
82 82
 
83 83
         $content .= "];\n";
Please login to merge, or discard this patch.
src/supportServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
     {
41 41
         // Publish a config file
42 42
         $this->publishes([
43
-            __DIR__ . '/config' => base_path('/config')
43
+            __DIR__.'/config' => base_path('/config')
44 44
         ], 'config');
45 45
     }
46 46
 
Please login to merge, or discard this patch.
src/Helpers/ColorHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
         // Normalize into a six character long hex string
10 10
         $hex = str_replace('#', '', $hex);
11 11
         if (strlen($hex) == 3) {
12
-            $hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2);
12
+            $hex = str_repeat(substr($hex, 0, 1), 2).str_repeat(substr($hex, 1, 1), 2).str_repeat(substr($hex, 2, 1), 2);
13 13
         }
14 14
 
15 15
         // Split into three parts: R, G and B
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
         foreach ($color_parts as $color) {
20 20
             $color   = hexdec($color); // Convert to decimal
21
-            $color   = max(0,min(255,$color + $steps)); // Adjust color
21
+            $color   = max(0, min(255, $color + $steps)); // Adjust color
22 22
             $return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code
23 23
         }
24 24
 
Please login to merge, or discard this patch.