Completed
Pull Request — master (#7)
by Jonathan
12:15
created
database/migrations/2018_04_15_000003_create_domains_modules_table.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create($this->tablePrefix . 'domains_modules', function (Blueprint $table) {
16
+        Schema::create($this->tablePrefix.'domains_modules', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->unsignedInteger('domain_id');
19 19
             $table->unsignedInteger('module_id');
@@ -21,15 +21,15 @@  discard block
 block discarded – undo
21 21
 
22 22
             // Foreign keys
23 23
             $table->foreign('domain_id')
24
-                    ->references('id')->on($this->tablePrefix . 'domains')
24
+                    ->references('id')->on($this->tablePrefix.'domains')
25 25
                     ->onDelete('cascade');
26 26
 
27 27
             $table->foreign('module_id')
28
-                    ->references('id')->on($this->tablePrefix . 'modules')
28
+                    ->references('id')->on($this->tablePrefix.'modules')
29 29
                     ->onDelete('cascade');
30 30
 
31 31
             // Unique keys
32
-            $table->unique(['domain_id', 'module_id']);
32
+            $table->unique([ 'domain_id', 'module_id' ]);
33 33
         });
34 34
     }
35 35
 
@@ -40,6 +40,6 @@  discard block
 block discarded – undo
40 40
      */
41 41
     public function down()
42 42
     {
43
-        Schema::dropIfExists($this->tablePrefix . 'domains_modules');
43
+        Schema::dropIfExists($this->tablePrefix.'domains_modules');
44 44
     }
45 45
 }
Please login to merge, or discard this patch.
database/migrations/2018_04_15_000018_create_profile_structure.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $module->name = 'profile';
38 38
         $module->icon = 'lock';
39 39
         $module->model_class = 'Uccello\Core\Models\Profile';
40
-        $module->data = ["package" => "uccello/uccello", "admin" => true, "mandatory" => true];
40
+        $module->data = [ "package" => "uccello/uccello", "admin" => true, "mandatory" => true ];
41 41
         $module->save();
42 42
 
43 43
         return $module;
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         $field->name = 'name';
68 68
         $field->uitype_id = uitype('text')->id;
69 69
         $field->displaytype_id = displaytype('everywhere')->id;
70
-        $field->data = ['rules' => 'required'];
70
+        $field->data = [ 'rules' => 'required' ];
71 71
         $field->sequence = 0;
72 72
         $field->block_id = $block->id;
73 73
         $field->module_id = $module->id;
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         $field->name = 'description';
79 79
         $field->uitype_id = uitype('textarea')->id;
80 80
         $field->displaytype_id = displaytype('everywhere')->id;
81
-        $field->data = ['large' => true];
81
+        $field->data = [ 'large' => true ];
82 82
         $field->sequence = 1;
83 83
         $field->block_id = $block->id;
84 84
         $field->module_id = $module->id;
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         $filter->user_id = null;
94 94
         $filter->name = 'filter.all';
95 95
         $filter->type = 'list';
96
-        $filter->columns = ['id', 'name', 'description', 'created_at', 'updated_at'];
96
+        $filter->columns = [ 'id', 'name', 'description', 'created_at', 'updated_at' ];
97 97
         $filter->conditions = null;
98 98
         $filter->order_by = null;
99 99
         $filter->is_default = true;
Please login to merge, or discard this patch.
database/migrations/2018_04_15_000025_create_settings_module.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     public function down()
27 27
     {
28 28
         // Drop table
29
-        Schema::dropIfExists($this->tablePrefix . 'settings');
29
+        Schema::dropIfExists($this->tablePrefix.'settings');
30 30
 
31 31
         // Delete module
32 32
         Module::where('name', 'settings')->forceDelete();
Please login to merge, or discard this patch.
database/migrations/2018_04_15_000017_create_domain_structure.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         $module->name = 'domain';
41 41
         $module->icon = 'domain';
42 42
         $module->model_class = 'Uccello\Core\Models\Domain';
43
-        $module->data = ["package" => "uccello/uccello", "admin" => true, "mandatory" => true];
43
+        $module->data = [ "package" => "uccello/uccello", "admin" => true, "mandatory" => true ];
44 44
         $module->save();
45 45
 
46 46
         return $module;
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $field->name = 'name';
71 71
         $field->uitype_id = uitype('text')->id;
72 72
         $field->displaytype_id = displaytype('everywhere')->id;
73
-        $field->data = ['rules' => 'required|unique:' . $this->getTablePrefix() . 'domains,name,%id%'];
73
+        $field->data = [ 'rules' => 'required|unique:'.$this->getTablePrefix().'domains,name,%id%' ];
74 74
         $field->sequence = 0;
75 75
         $field->block_id = $block->id;
76 76
         $field->module_id = $module->id;
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         $field->name = 'parent';
82 82
         $field->uitype_id = uitype('entity')->id;
83 83
         $field->displaytype_id = displaytype('everywhere')->id;
84
-        $field->data = ['module' => 'domain', 'field' => 'name'];
84
+        $field->data = [ 'module' => 'domain', 'field' => 'name' ];
85 85
         $field->sequence = 1;
86 86
         $field->block_id = $block->id;
87 87
         $field->module_id = $module->id;
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         $field->name = 'description';
93 93
         $field->uitype_id = uitype('textarea')->id;
94 94
         $field->displaytype_id = displaytype('everywhere')->id;
95
-        $field->data = ['large' => true];
95
+        $field->data = [ 'large' => true ];
96 96
         $field->sequence = 2;
97 97
         $field->block_id = $block->id;
98 98
         $field->module_id = $module->id;
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         $filter->user_id = null;
108 108
         $filter->name = 'filter.all';
109 109
         $filter->type = 'list';
110
-        $filter->columns = ['id', 'name', 'description', 'parent', 'created_at', 'updated_at'];
110
+        $filter->columns = [ 'id', 'name', 'description', 'parent', 'created_at', 'updated_at' ];
111 111
         $filter->conditions = null;
112 112
         $filter->order_by = null;
113 113
         $filter->is_default = true;
Please login to merge, or discard this patch.
database/migrations/2018_04_15_000022_create_relatedlists_table.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create($this->tablePrefix . 'relatedlists', function (Blueprint $table) {
16
+        Schema::create($this->tablePrefix.'relatedlists', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->unsignedInteger('module_id');
19 19
             $table->unsignedInteger('related_module_id');
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
             $table->unsignedInteger('related_field_id')->nullable();
22 22
             $table->string('label');
23 23
             $table->string('icon')->nullable();
24
-            $table->enum('type', ['n-1', 'n-n']);
24
+            $table->enum('type', [ 'n-1', 'n-n' ]);
25 25
             $table->string('method');
26 26
             $table->unsignedInteger('sequence');
27 27
             $table->text('data')->nullable();
@@ -29,23 +29,23 @@  discard block
 block discarded – undo
29 29
 
30 30
             // Foreign keys
31 31
             $table->foreign('module_id')
32
-                    ->references('id')->on($this->tablePrefix . 'modules')
32
+                    ->references('id')->on($this->tablePrefix.'modules')
33 33
                     ->onDelete('cascade');
34 34
 
35 35
             $table->foreign('related_module_id')
36
-                    ->references('id')->on($this->tablePrefix . 'modules')
36
+                    ->references('id')->on($this->tablePrefix.'modules')
37 37
                     ->onDelete('cascade');
38 38
 
39 39
             $table->foreign('tab_id')
40
-                    ->references('id')->on($this->tablePrefix . 'tabs')
40
+                    ->references('id')->on($this->tablePrefix.'tabs')
41 41
                     ->onDelete('cascade');
42 42
 
43 43
             $table->foreign('related_field_id')
44
-            ->references('id')->on($this->tablePrefix . 'fields')
44
+            ->references('id')->on($this->tablePrefix.'fields')
45 45
                     ->onDelete('cascade');
46 46
 
47 47
             // Unique keys
48
-            $table->unique(['module_id', 'related_module_id', 'label'], 'relatedlists_unique_key');
48
+            $table->unique([ 'module_id', 'related_module_id', 'label' ], 'relatedlists_unique_key');
49 49
         });
50 50
     }
51 51
 
@@ -56,6 +56,6 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function down()
58 58
     {
59
-        Schema::dropIfExists($this->tablePrefix . 'relatedlists');
59
+        Schema::dropIfExists($this->tablePrefix.'relatedlists');
60 60
     }
61 61
 }
Please login to merge, or discard this patch.
config/uccello.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 return [
4
-  'skin' => 'uccello',
4
+    'skin' => 'uccello',
5 5
 ];
Please login to merge, or discard this patch.
routes/api.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-Route::name('uccello.api.')->group(function () {
3
+Route::name('uccello.api.')->group(function() {
4 4
 
5 5
     // Adapt params if we use or not multi domains
6 6
     if (!uccello()->useMultiDomains()) {
@@ -15,8 +15,8 @@  discard block
 block discarded – undo
15 15
     Route::get('refresh', 'Core\ApiAuthController@refresh')->name('refresh');
16 16
 
17 17
     Route::get($domainAndModuleParams, 'Core\ApiController@index')->name('index');
18
-    Route::get($domainAndModuleParams . '/{id}', 'Core\ApiController@show')->name('show');
18
+    Route::get($domainAndModuleParams.'/{id}', 'Core\ApiController@show')->name('show');
19 19
     Route::post($domainAndModuleParams, 'Core\ApiController@store')->name('store');
20
-    Route::post($domainAndModuleParams . '/{id}', 'Core\ApiController@update')->name('update');
21
-    Route::delete($domainAndModuleParams . '/{id}', 'Core\ApiController@destroy')->name('destroy');
20
+    Route::post($domainAndModuleParams.'/{id}', 'Core\ApiController@update')->name('update');
21
+    Route::delete($domainAndModuleParams.'/{id}', 'Core\ApiController@destroy')->name('destroy');
22 22
 });
Please login to merge, or discard this patch.
routes/web.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 Route::get('logout', '\App\Http\Controllers\Auth\LoginController@logout')->name('logout');
4 4
 
5
-Route::name('uccello.')->group(function () {
5
+Route::name('uccello.')->group(function() {
6 6
 
7 7
     // Adapt params if we use or not multi domains
8 8
     if (!uccello()->useMultiDomains()) {
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         ->defaults('module', 'user')
27 27
         ->name('user.edit');
28 28
 
29
-    Route::post($domainParam . '/domain', 'Domain\EditController@save')
29
+    Route::post($domainParam.'/domain', 'Domain\EditController@save')
30 30
         ->defaults('module', 'domain')
31 31
         ->name('domain.save');
32 32
 
Please login to merge, or discard this patch.
resources/views/layouts/partials/link/main.blade.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,13 +13,13 @@  discard block
 block discarded – undo
13 13
             $cssClass .= 'btn ';
14 14
 
15 15
             // Icon
16
-            if($link->icon) {
16
+            if ($link->icon) {
17 17
                 $cssClass .= 'icon-right ';
18 18
             }
19 19
 
20 20
             // Color
21 21
             if (!empty($link->data->color)) {
22
-                $cssClass .= 'bg-' . $link->data->color . ' ';
22
+                $cssClass .= 'bg-'.$link->data->color.' ';
23 23
             } else {
24 24
                 $cssClass .= 'bg-primary ';
25 25
             }
@@ -34,12 +34,12 @@  discard block
 block discarded – undo
34 34
         // Get all variables from the URL (e.g. http://domain.tld?id=$id$)
35 35
         preg_match_all('`\$(.+?)\$`', $linkUrl, $matches);
36 36
 
37
-        foreach ($matches[1] as $i => $attribute) {
37
+        foreach ($matches[ 1 ] as $i => $attribute) {
38 38
             // Get
39 39
             $value = ucattribute($record, $attribute);
40 40
 
41 41
             // Replace the variable by its value
42
-            $linkUrl = str_replace($matches[0][$i], urlencode($value), $linkUrl);
42
+            $linkUrl = str_replace($matches[ 0 ][ $i ], urlencode($value), $linkUrl);
43 43
         }
44 44
     }
45 45
 ?>
Please login to merge, or discard this patch.