@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | */ |
16 | 16 | public function storeAsJson() |
17 | 17 | { |
18 | - $this->mutateValue(function ($value) { |
|
18 | + $this->mutateValue(function($value) { |
|
19 | 19 | return json_encode($value); |
20 | 20 | }); |
21 | 21 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | */ |
30 | 30 | public function storeAsComaSeparatedValue() |
31 | 31 | { |
32 | - $this->mutateValue(function ($value) { |
|
32 | + $this->mutateValue(function($value) { |
|
33 | 33 | return implode(',', $value); |
34 | 34 | }); |
35 | 35 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $name = $this->getName(); |
47 | 47 | $value = $request->input($name, ''); |
48 | 48 | |
49 | - if (! empty($value)) { |
|
49 | + if (!empty($value)) { |
|
50 | 50 | $value = explode(',', $value); |
51 | 51 | } else { |
52 | 52 | $value = []; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | */ |
32 | 32 | public function getDefaultFrom() |
33 | 33 | { |
34 | - if (! $this->defaultFrom) { |
|
34 | + if (!$this->defaultFrom) { |
|
35 | 35 | $this->defaultFrom = Carbon::now(); |
36 | 36 | } |
37 | 37 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function getDefaultTo() |
59 | 59 | { |
60 | - if (! $this->defaultTo) { |
|
60 | + if (!$this->defaultTo) { |
|
61 | 61 | $this->defaultTo = Carbon::now(); |
62 | 62 | } |
63 | 63 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | */ |
86 | 86 | public function setModelAttribute($value) |
87 | 87 | { |
88 | - $value = ! empty($value) ? array_map(function ($date) { |
|
88 | + $value = !empty($value) ? array_map(function($date) { |
|
89 | 89 | return Carbon::createFromFormat($this->getPickerFormat(), $date); |
90 | 90 | }, explode('::', $value)) : null; |
91 | 91 |
@@ -14,7 +14,7 @@ |
||
14 | 14 | { |
15 | 15 | $routeName = 'admin.form.element.dependent-select'; |
16 | 16 | |
17 | - if (! $router->has($routeName)) { |
|
17 | + if (!$router->has($routeName)) { |
|
18 | 18 | $router->post('{adminModel}/dependent-select/{field}/{id?}', [ |
19 | 19 | 'as' => $routeName, |
20 | 20 | 'uses' => 'SleepingOwl\Admin\Http\Controllers\FormElementController@dependentSelect', |
@@ -66,9 +66,9 @@ discard block |
||
66 | 66 | * |
67 | 67 | * @param $root |
68 | 68 | * @param $parentId |
69 | - * @param $left |
|
69 | + * @param integer $left |
|
70 | 70 | * |
71 | - * @return mixed |
|
71 | + * @return integer |
|
72 | 72 | */ |
73 | 73 | protected function recursiveReorder($root, $parentId, $left) |
74 | 74 | { |
@@ -88,8 +88,8 @@ discard block |
||
88 | 88 | * |
89 | 89 | * @param $id |
90 | 90 | * @param $parentId |
91 | - * @param $left |
|
92 | - * @param $right |
|
91 | + * @param integer $left |
|
92 | + * @param integer $right |
|
93 | 93 | */ |
94 | 94 | protected function move($id, $parentId, $left, $right) |
95 | 95 | { |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | { |
28 | 28 | $routeName = 'admin.form.element.'.static::$route; |
29 | 29 | |
30 | - if (! $router->has($routeName)) { |
|
30 | + if (!$router->has($routeName)) { |
|
31 | 31 | $router->post('{adminModel}/'.static::$route.'/{field}/{id?}', [ |
32 | 32 | 'as' => $routeName, |
33 | 33 | 'uses' => 'SleepingOwl\Admin\Http\Controllers\UploadController@fromField', |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | */ |
128 | 128 | public function getUploadPath(UploadedFile $file) |
129 | 129 | { |
130 | - if (! is_callable($this->uploadPath)) { |
|
130 | + if (!is_callable($this->uploadPath)) { |
|
131 | 131 | return $this->defaultUploadPath($file); |
132 | 132 | } |
133 | 133 | |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | */ |
154 | 154 | public function getUploadFileName(UploadedFile $file) |
155 | 155 | { |
156 | - if (! is_callable($this->uploadFileName)) { |
|
156 | + if (!is_callable($this->uploadFileName)) { |
|
157 | 157 | return $this->defaultUploadFilename($file); |
158 | 158 | } |
159 | 159 |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public function setClass($class) |
58 | 58 | { |
59 | - if (! class_exists($class)) { |
|
59 | + if (!class_exists($class)) { |
|
60 | 60 | throw new RepositoryException("Class {$class} not found."); |
61 | 61 | } |
62 | 62 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | */ |
104 | 104 | public function with($with) |
105 | 105 | { |
106 | - if (! is_array($with)) { |
|
106 | + if (!is_array($with)) { |
|
107 | 107 | $with = func_get_args(); |
108 | 108 | } |
109 | 109 |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function __construct($treeType = null) |
42 | 42 | { |
43 | - if (! is_null($treeType)) { |
|
43 | + if (!is_null($treeType)) { |
|
44 | 44 | $this->setTreeType($treeType); |
45 | 45 | } |
46 | 46 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | { |
55 | 55 | $this->treeType = new $treeType($this); |
56 | 56 | |
57 | - if (! ($this->treeType instanceof TreeTypeInterface)) { |
|
57 | + if (!($this->treeType instanceof TreeTypeInterface)) { |
|
58 | 58 | throw new DisplayTreeException('Tree type class must be instanced of [SleepingOwl\Admin\Contracts\Display\Tree\TreeTypeInterface]'); |
59 | 59 | } |
60 | 60 | } |
@@ -76,7 +76,7 @@ |
||
76 | 76 | /** |
77 | 77 | * Load Relations by this->name. |
78 | 78 | * @param Builder $query |
79 | - * @param $direction |
|
79 | + * @param string $direction |
|
80 | 80 | */ |
81 | 81 | protected function loadRelationOrder(Builder $query, $direction) |
82 | 82 | { |
@@ -107,7 +107,7 @@ |
||
107 | 107 | } |
108 | 108 | |
109 | 109 | /** |
110 | - * @return mixed |
|
110 | + * @return Badge|null |
|
111 | 111 | */ |
112 | 112 | public function getBadge() |
113 | 113 | { |
@@ -75,15 +75,15 @@ |
||
75 | 75 | { |
76 | 76 | $this->content = $content; |
77 | 77 | |
78 | - if (! is_null($label)) { |
|
78 | + if (!is_null($label)) { |
|
79 | 79 | $this->setLabel($label); |
80 | 80 | } |
81 | 81 | |
82 | - if (! is_null($icon)) { |
|
82 | + if (!is_null($icon)) { |
|
83 | 83 | $this->setIcon($icon); |
84 | 84 | } |
85 | 85 | |
86 | - if (! is_null($badge)) { |
|
86 | + if (!is_null($badge)) { |
|
87 | 87 | $this->setBadge($badge); |
88 | 88 | } |
89 | 89 |