Completed
Push — master ( fac006...f1fa80 )
by Joao
03:48
created
src/baseServiceProvider.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     {
16 16
         // Publish our routes
17 17
         // if (!$this->app->routesAreCached())
18
-		require __DIR__ . '/routes.php';
18
+        require __DIR__ . '/routes.php';
19 19
 
20 20
         // Publish our views
21 21
         $this->loadViewsFrom(base_path("resources/views"), 'base');
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,12 +19,12 @@  discard block
 block discarded – undo
19 19
         // Publish our views
20 20
         $this->loadViewsFrom(base_path("resources/views"), 'base');
21 21
         $this->publishes([
22
-            __DIR__ .  '/views' => base_path("resources/views")
22
+            __DIR__ . '/views' => base_path("resources/views")
23 23
         ]);
24 24
 
25 25
         // Publish our migrations
26 26
         $this->publishes([
27
-            __DIR__ .  '/migrations' => base_path("database/migrations")
27
+            __DIR__ . '/migrations' => base_path("database/migrations")
28 28
         ], 'migrations');
29 29
 
30 30
         // Publish a config file
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function register()
42 42
     {
43 43
         // Bind the
44
-        $this->app->bind('base', function($app){
44
+        $this->app->bind('base', function($app) {
45 45
             return new base;
46 46
         });
47 47
     }
Please login to merge, or discard this patch.
src/Models/BaseUser.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -240,8 +240,9 @@
 block discarded – undo
240 240
     {
241 241
         $results = $this->belongsToMany('App\Menu', 'Menu_User', 'user', 'menu')->withTimestamps()->where('pos', $pos)->get();
242 242
 
243
-        foreach ($this->groups as $group)
244
-            $results->merge($group->menus->where('pos', $pos));
243
+        foreach ($this->groups as $group) {
244
+                    $results->merge($group->menus->where('pos', $pos));
245
+        }
245 246
 
246 247
         return $results;
247 248
     }
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
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
         // Normalize into a six character long hex string
12 12
         $hex = str_replace('#', '', $hex);
13 13
         if (strlen($hex) == 3) {
14
-            $hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2);
14
+            $hex = str_repeat(substr($hex, 0, 1), 2) . str_repeat(substr($hex, 1, 1), 2) . str_repeat(substr($hex, 2, 1), 2);
15 15
         }
16 16
 
17 17
         // Split into three parts: R, G and B
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
         foreach ($color_parts as $color) {
22 22
             $color   = hexdec($color); // Convert to decimal
23
-            $color   = max(0,min(255,$color + $steps)); // Adjust color
23
+            $color   = max(0, min(255, $color + $steps)); // Adjust color
24 24
             $return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code
25 25
         }
26 26
 
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.
src/Migrations/2016_01_14_235300_create_base_tables.php 1 patch
Spacing   +6 added lines, -6 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);
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             $table->creation();
52 52
         });
53 53
 
54
-        Schema::create('Group', function (Blueprint $table) {
54
+        Schema::create('Group', function(Blueprint $table) {
55 55
             $table->increments('id');
56 56
             $table->string('name', 25);
57 57
             $table->string('description', 250)->nullable();
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             $table->unique('slug');
66 66
         });
67 67
 
68
-        Schema::create('Group_User', function (Blueprint $table) {
68
+        Schema::create('Group_User', function(Blueprint $table) {
69 69
             $table->increments('id');
70 70
             $table->integer('user')->unsigned();
71 71
             $table->integer('group')->unsigned();
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
             $table->foreign('group')->references('id')->on('Group');
79 79
         });
80 80
 
81
-        Schema::create('ActivityFeed', function (Blueprint $table) {
81
+        Schema::create('ActivityFeed', function(Blueprint $table) {
82 82
             $table->increments('id');
83 83
             $table->string('added_by', 150);
84 84
             $table->text('activity');
Please login to merge, or discard this patch.