Completed
Push — master ( 9e3353...dc977e )
by Joao
02:24
created
src/Migrations/2016_01_14_235300_create_base_tables.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     public function up()
15 15
     {
16 16
 
17
-        Schema::create('User', function (Blueprint $table) {
17
+        Schema::create('User', function(Blueprint $table) {
18 18
             $table->increments('id');
19 19
             $table->string('username', 25)->nullable()->unique();
20 20
             $table->string('password', 60)->nullable();
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
             $table->creation();
35 35
         });
36 36
 
37
-        Schema::create('Logs', function (Blueprint $table) {
37
+        Schema::create('Logs', function(Blueprint $table) {
38 38
             $table->increments('id');
39 39
             $table->text('log');
40 40
             $table->timestamps();
41 41
             $table->creation();
42 42
         });
43 43
 
44
-        Schema::create('Settings', function (Blueprint $table) {
44
+        Schema::create('Settings', function(Blueprint $table) {
45 45
             $table->increments('id');
46 46
             $table->string('friendy_name', 25);
47 47
             $table->string('name', 25);
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             $table->creation();
51 51
         });
52 52
 
53
-        Schema::create('Group', function (Blueprint $table) {
53
+        Schema::create('Group', function(Blueprint $table) {
54 54
             $table->increments('id');
55 55
             $table->string('name', 25);
56 56
             $table->string('description', 250)->nullable();
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             $table->unique('slug');
64 64
         });
65 65
 
66
-        Schema::create('Group_User', function (Blueprint $table) {
66
+        Schema::create('Group_User', function(Blueprint $table) {
67 67
             $table->increments('id');
68 68
             $table->integer('user')->unsigned();
69 69
             $table->integer('group')->unsigned();
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             $table->foreign('group')->references('id')->on('Group');
76 76
         });
77 77
 
78
-        Schema::create('ActivityFeed', function (Blueprint $table) {
78
+        Schema::create('ActivityFeed', function(Blueprint $table) {
79 79
             $table->increments('id');
80 80
             $table->string('added_by', 150);
81 81
             $table->text('activity');
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             $table->timestamps();
87 87
         });
88 88
 
89
-        Schema::create('Permission', function (Blueprint $table) {
89
+        Schema::create('Permission', function(Blueprint $table) {
90 90
             $table->increments('id');
91 91
             $table->string('key', 100);
92 92
             $table->string('description', 250);
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
@@ -103,8 +103,9 @@
 block discarded – undo
103 103
         // If no name was specified for this index, we will create one using a basic
104 104
         // convention of the table name, followed by the columns, followed by an
105 105
         // index type, such as primary or index, which makes the index unique.
106
-        if (is_null($index))
107
-            $index = $this->createIndexName($type, $columns);
106
+        if (is_null($index)) {
107
+                    $index = $this->createIndexName($type, $columns);
108
+        }
108 109
         return $this->addCommand($type, compact('index', 'columns', 'length'));
109 110
     }
110 111
 
Please login to merge, or discard this patch.
src/Database/MySqlGrammar.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -17,12 +17,12 @@  discard block
 block discarded – undo
17 17
      */
18 18
     public function __construct()
19 19
     {
20
-        if ( ! in_array('Collate', $this->modifiers) )
20
+        if (!in_array('Collate', $this->modifiers))
21 21
         {
22 22
             array_splice($this->modifiers, array_search('Unsigned', $this->modifiers) + 1, 0, 'Collate');
23 23
         }
24 24
         // new versions of Laravel already have comment modifier
25
-        if ( ! in_array('Comment', $this->modifiers) )
25
+        if (!in_array('Comment', $this->modifiers))
26 26
         {
27 27
             array_splice($this->modifiers, array_search('After', $this->modifiers) - 1, 0, 'Comment');
28 28
         }
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      */
38 38
     protected function modifyCollate(IlluminateBlueprint $blueprint, Fluent $column)
39 39
     {
40
-        if ( ! is_null($column->collate) )
40
+        if (!is_null($column->collate))
41 41
         {
42 42
             $characterSet = strtok($column->collate, '_');
43 43
             return " character set $characterSet collate {$column->collate}";
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     protected function modifyComment(IlluminateBlueprint $blueprint, Fluent $column)
55 55
     {
56
-        if ( ! is_null($column->comment) )
56
+        if (!is_null($column->comment))
57 57
         {
58 58
             $comment = str_replace("'", "\'", $column->comment);
59 59
             return " comment '$comment'";
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     {
73 73
         $sql = parent::compileCreate($blueprint, $command, $connection);
74 74
         // Table annotation support
75
-        if ( isset($blueprint->comment) )
75
+        if (isset($blueprint->comment))
76 76
         {
77 77
             $comment = str_replace("'", "\'", $blueprint->comment);
78 78
             $sql .= " comment = '$comment'";
@@ -113,21 +113,21 @@  discard block
 block discarded – undo
113 113
     protected function compileKey(IlluminateBlueprint $blueprint, Fluent $command, $type)
114 114
     {
115 115
         $columns = [];
116
-        foreach($command->columns as $commandColumn)
116
+        foreach ($command->columns as $commandColumn)
117 117
         {
118
-            foreach($blueprint->getColumns() as $blueprintColumn)
118
+            foreach ($blueprint->getColumns() as $blueprintColumn)
119 119
             {
120
-                if ( $blueprintColumn->name != $commandColumn )
120
+                if ($blueprintColumn->name != $commandColumn)
121 121
                 {
122 122
                     continue;
123 123
                 }
124 124
 
125 125
                 $column = $this->wrap($commandColumn);
126
-                if ( isset($command->length) )
126
+                if (isset($command->length))
127 127
                 {
128 128
                     $column .= "({$command->length})";
129 129
                 }
130
-                elseif ( 'string' == $blueprintColumn->type && $blueprintColumn->length > 255 )
130
+                elseif ('string' == $blueprintColumn->type && $blueprintColumn->length > 255)
131 131
                 {
132 132
                     $column .= '(255)';
133 133
                 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -126,8 +126,7 @@
 block discarded – undo
126 126
                 if ( isset($command->length) )
127 127
                 {
128 128
                     $column .= "({$command->length})";
129
-                }
130
-                elseif ( 'string' == $blueprintColumn->type && $blueprintColumn->length > 255 )
129
+                } elseif ( 'string' == $blueprintColumn->type && $blueprintColumn->length > 255 )
131 130
                 {
132 131
                     $column .= '(255)';
133 132
                 }
Please login to merge, or discard this patch.
src/Traits/Creation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,17 +11,17 @@
 block discarded – undo
11 11
     {
12 12
 
13 13
         // create a event to happen on updating
14
-        static::updating(function($table)  {
14
+        static::updating(function($table) {
15 15
             $table->updated_by = Sentinel::getUser()->id;
16 16
         });
17 17
 
18 18
         // create a event to happen on deleting
19
-        static::deleting(function($table)  {
19
+        static::deleting(function($table) {
20 20
             $table->deleted_by = Sentinel::getUser()->id;
21 21
         });
22 22
 
23 23
         // create a event to happen on saving
24
-        static::saving(function($table)  {
24
+        static::saving(function($table) {
25 25
             $table->created_by = Sentinel::getUser()->id;
26 26
         });
27 27
 
Please login to merge, or discard this patch.