Completed
Branch master (d19b6f)
by Jonathan
08:09
created
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.
tests/Browser/MenuTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
         $user = User::first();
16 16
         $homeModule = Module::where('name', 'home')->first();
17 17
 
18
-        $this->browse(function ($browser) use ($user, $homeModule) {
18
+        $this->browse(function($browser) use ($user, $homeModule) {
19 19
             $browser->visit('/login')
20 20
                     ->type('identity', $user->email)
21 21
                     ->type('password', 'admin')
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.
resources/views/modules/default/list/main.blade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,9 +63,9 @@
 block discarded – undo
63 63
                                         {{ uctrans('field.'.$column['name'], $module) }}
64 64
                                         <?php
65 65
                                             // If a special template exists, use it. Else use the generic template
66
-                                            $uitypeViewName = sprintf('uitypes.search.%s', $column['uitype']);
66
+                                            $uitypeViewName = sprintf('uitypes.search.%s', $column[ 'uitype' ]);
67 67
                                             $uitypeFallbackView = 'uccello::modules.default.uitypes.search.text';
68
-                                            $uitypeViewToInclude = uccello()->view($column['package'], $module, $uitypeViewName, $uitypeFallbackView);
68
+                                            $uitypeViewToInclude = uccello()->view($column[ 'package' ], $module, $uitypeViewName, $uitypeFallbackView);
69 69
                                         ?>
70 70
                                         @include($uitypeViewToInclude)
71 71
                                     </th>
Please login to merge, or discard this patch.
resources/views/modules/default/detail/main.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
                 {{-- Badge --}}
84 84
                 <?php
85 85
                     $relatedModule = $relatedlist->relatedModule;
86
-                    $countMethod = $relatedlist->method . 'Count';
86
+                    $countMethod = $relatedlist->method.'Count';
87 87
 
88 88
                     $model = new $relatedModule->model_class;
89 89
                     $count = $model->$countMethod($relatedlist, $record->id);
Please login to merge, or discard this patch.