Completed
Push — master ( 21c71e...209be6 )
by Jose Luis
13:29
created
src/Http/Controllers/Core/FlowController.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
     /**
21 21
      * @param Requests\FlowRequest $request
22
-     * @return mixed
22
+     * @return \Illuminate\Http\JsonResponse
23 23
      */
24 24
     public function store(Requests\FlowRequest $request)
25 25
     {
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     /**
32 32
      * @param Requests\FlowRequest $request
33 33
      * @param $id
34
-     * @return mixed
34
+     * @return \Illuminate\Http\JsonResponse
35 35
      */
36 36
     public function update(Requests\FlowRequest $request, $id)
37 37
     {
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
     /**
44 44
      * @param $id
45
-     * @return mixed
45
+     * @return \Illuminate\Http\JsonResponse
46 46
      */
47 47
     public function destroy($id)
48 48
     {
Please login to merge, or discard this patch.
src/Menu/MenuService.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public function addMenuDefinition($class)
30 30
     {
31
-        if(class_exists($class)) {
31
+        if (class_exists($class)) {
32 32
             $this->groups->push($class);
33 33
         }
34 34
     }
@@ -39,37 +39,37 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function render($group = 'sidebar')
41 41
     {
42
-        $this->groups->each(function($class){
42
+        $this->groups->each(function($class) {
43 43
             $definition = app($class);
44 44
             $menu = app('menu')->instance($definition->getInstance());
45
-            if($definition->isDropdown()) {
45
+            if ($definition->isDropdown()) {
46 46
                 $menu->dropdown($definition->getName(), function($sub) use ($definition) {
47 47
                     $definition->items->each(function($item) use ($sub) {
48
-                        if($item['type'] == 'route') {
48
+                        if ($item['type'] == 'route') {
49 49
                             $sub->route($item['route'], $item['name'], [], 0, ['active' => $item['active-state']])
50 50
                                 ->hideWhen($item['ability']);
51 51
                         }
52
-                        if($item['type'] == 'header') {
52
+                        if ($item['type'] == 'header') {
53 53
                             $sub->addHeader($item['name']);
54 54
                         }
55
-                        if($item['type'] == 'url') {
55
+                        if ($item['type'] == 'url') {
56 56
                             $sub->url($item['url'], $item['name'], 0, ['active' => $item['active-state']])
57
-                                ->hideWhen($item['ability']);;
57
+                                ->hideWhen($item['ability']); ;
58 58
                         }
59 59
                     });
60 60
                 });
61
-            } else {
61
+            }else {
62 62
                 $definition->items->each(function($item) use ($menu) {
63
-                    if($item['type'] == 'route') {
63
+                    if ($item['type'] == 'route') {
64 64
                         $menu->route($item['route'], $item['name'], [], 0, ['active' => $item['active-state']])
65 65
                             ->hideWhen($item['ability']);
66 66
                     }
67
-                    if($item['type'] == 'header') {
67
+                    if ($item['type'] == 'header') {
68 68
                         $menu->addHeader($item['name']);
69 69
                     }
70
-                    if($item['type'] == 'url') {
70
+                    if ($item['type'] == 'url') {
71 71
                         $menu->url($item['url'], $item['name'], 0, ['active' => $item['active-state']])
72
-                            ->hideWhen($item['ability']);;
72
+                            ->hideWhen($item['ability']); ;
73 73
                     }
74 74
                 });
75 75
             }
Please login to merge, or discard this patch.
src/Providers/JarvisFoundationServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -116,11 +116,11 @@
 block discarded – undo
116 116
      */
117 117
     protected function registerMenus()
118 118
     {
119
-        if(!app('menu')->instance('sidebar')) {
120
-            app('menu')->create('sidebar', function ($menu) {
119
+        if (!app('menu')->instance('sidebar')) {
120
+            app('menu')->create('sidebar', function($menu) {
121 121
                 $menu->enableOrdering();
122 122
             });
123
-            $this->app->singleton('menu.service', function(){
123
+            $this->app->singleton('menu.service', function() {
124 124
                 return new MenuService();
125 125
             });
126 126
         }
Please login to merge, or discard this patch.
src/Http/Controllers/Core/FieldsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
     {
125 125
         $fieldTypes = app('field.types');
126 126
         if (!isset($fieldTypes->types[$type])) {
127
-            throw new NotAcceptableHttpException('El field type ' . $type . ' no esta registrado');
127
+            throw new NotAcceptableHttpException('El field type '.$type.' no esta registrado');
128 128
         }
129 129
         $this->fieldType = app($fieldTypes->types[$type]);
130 130
     }
Please login to merge, or discard this patch.
src/Http/routes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 /** Notifications Routes **/
4
-Route::group(['middleware' => ['web', 'auth'], 'namespace' => 'Hechoenlaravel\JarvisFoundation\Http\Controllers'], function () {
4
+Route::group(['middleware' => ['web', 'auth'], 'namespace' => 'Hechoenlaravel\JarvisFoundation\Http\Controllers'], function() {
5 5
     Route::get('notifications', ['as' => 'notifications.index', 'uses' => 'NotificationsController@index']);
6 6
     Route::get('notifications/{id}/read', ['as' => 'notifications.read', 'uses' => 'NotificationsController@read']);
7
-    Route::group(['prefix' => 'api'], function(){
8
-        Route::group(['prefix' => 'core'], function(){
7
+    Route::group(['prefix' => 'api'], function() {
8
+        Route::group(['prefix' => 'core'], function() {
9 9
             Route::resource('entity/{id}/fields', 'Core\FieldsController', ['only' => ['index', 'store', 'update', 'destroy']]);
10 10
             Route::put('entity/{id}/order-fields', 'Core\FieldsController@reOrderFieldId');
11 11
             Route::get('field-type/{type}/form', 'Core\FieldsController@fieldTypeForm');
Please login to merge, or discard this patch.