@@ -119,7 +119,7 @@ |
||
119 | 119 | } |
120 | 120 | |
121 | 121 | /** |
122 | - * @return mixed |
|
122 | + * @return string |
|
123 | 123 | */ |
124 | 124 | public function presentFront() |
125 | 125 | { |
@@ -92,7 +92,7 @@ |
||
92 | 92 | public function present() |
93 | 93 | { |
94 | 94 | $date = null; |
95 | - if(!empty($this->value)){ |
|
95 | + if (!empty($this->value)) { |
|
96 | 96 | $date = Carbon::createFromTimestamp(strtotime($this->value)); |
97 | 97 | } |
98 | 98 | return Field::text($this->fieldSlug, empty($date) ? null : $date->format('m/d/Y'), ['label' => $this->fieldName, 'class' => 'datepicker']); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | public function execute($command, callable $next) |
22 | 22 | { |
23 | 23 | $pipeline = null; |
24 | - DB::transaction(function () use ($next, $command, &$pipeline){ |
|
24 | + DB::transaction(function() use ($next, $command, &$pipeline){ |
|
25 | 25 | $pipeline = $next($command); |
26 | 26 | }); |
27 | 27 | return $pipeline; |
@@ -95,11 +95,11 @@ |
||
95 | 95 | public function present() |
96 | 96 | { |
97 | 97 | $options = []; |
98 | - foreach(unserialize($this->fieldOptions) as $o) |
|
98 | + foreach (unserialize($this->fieldOptions) as $o) |
|
99 | 99 | { |
100 | 100 | $options[$o] = $o; |
101 | 101 | } |
102 | - return Field::select($this->fieldSlug, $options , $this->value, ['label' => $this->fieldName, 'class' => 'select2']); |
|
102 | + return Field::select($this->fieldSlug, $options, $this->value, ['label' => $this->fieldName, 'class' => 'select2']); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | /** |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | public function presentFront() |
123 | 123 | { |
124 | 124 | $options = unserialize($this->fieldOptions); |
125 | - if(isset($options['transform'])){ |
|
125 | + if (isset($options['transform'])) { |
|
126 | 126 | return $this->transformText($options['transform']); |
127 | 127 | } |
128 | 128 | return strtoupper($this->value); |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | */ |
135 | 135 | protected function transformText($transformation) |
136 | 136 | { |
137 | - switch ($transformation){ |
|
137 | + switch ($transformation) { |
|
138 | 138 | case "1": |
139 | 139 | return strtoupper($this->value); |
140 | 140 | case "2": |
@@ -119,7 +119,7 @@ |
||
119 | 119 | } |
120 | 120 | |
121 | 121 | /** |
122 | - * @return mixed |
|
122 | + * @return string |
|
123 | 123 | */ |
124 | 124 | public function presentFront() |
125 | 125 | { |
@@ -19,7 +19,7 @@ discard block |
||
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 |
||
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 |
||
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 | { |
@@ -28,7 +28,7 @@ discard block |
||
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 |
||
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 | } |
@@ -116,11 +116,11 @@ |
||
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 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | 'hidden' => (bool) $field->hidden, |
24 | 24 | 'order' => $field->order, |
25 | 25 | 'default' => $field->default, |
26 | - 'required' => (string)$field->required, |
|
26 | + 'required' => (string) $field->required, |
|
27 | 27 | 'fieldType' => [ |
28 | 28 | 'name' => $type->name |
29 | 29 | ] |
@@ -124,7 +124,7 @@ |
||
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 | } |