| @@ -65,8 +65,8 @@ | ||
| 65 | 65 | // prevent duplicated execution | 
| 66 | 66 |          if (null === $this->query && $this->model) { | 
| 67 | 67 | $this->initQuery() | 
| 68 | - ->applyFilters() | |
| 69 | - ->applySorting(); | |
| 68 | + ->applyFilters() | |
| 69 | + ->applySorting(); | |
| 70 | 70 | |
| 71 | 71 | $this->query = $this->assembler()->getQuery(); | 
| 72 | 72 | } | 
| @@ -17,13 +17,13 @@ | ||
| 17 | 17 | |
| 18 | 18 | $total = $this->createModel()->count(); | 
| 19 | 19 | $signedLastWeek = $this->createModel() | 
| 20 | -                                 ->where('created_at', '>=', $weekAgo)->count(); | |
| 20 | +                                    ->where('created_at', '>=', $weekAgo)->count(); | |
| 21 | 21 | $signedLastMonth = $this->createModel() | 
| 22 | -                                 ->where('created_at', '>=', $monthAgo)->count(); | |
| 22 | +                                    ->where('created_at', '>=', $monthAgo)->count(); | |
| 23 | 23 | $signedStatistics = $this->createModel() | 
| 24 | -                                 ->where('created_at', '>=', $monthAgo) | |
| 25 | -                                 ->select([DB::raw('COUNT(id) AS cnt'), DB::raw('DATE(created_at) as dt')]) | |
| 26 | -                                 ->groupBy('dt')->pluck('cnt', 'dt'); | |
| 24 | +                                    ->where('created_at', '>=', $monthAgo) | |
| 25 | +                                    ->select([DB::raw('COUNT(id) AS cnt'), DB::raw('DATE(created_at) as dt')]) | |
| 26 | +                                    ->groupBy('dt')->pluck('cnt', 'dt'); | |
| 27 | 27 | |
| 28 | 28 |          return view(app('scaffold.template')->dashboard('members'), [ | 
| 29 | 29 | 'total' => $total, | 
| @@ -66,7 +66,7 @@ discard block | ||
| 66 | 66 |          $this->app->singleton('scaffold.config', function ($app) { | 
| 67 | 67 | $config = $app['config']['administrator']; | 
| 68 | 68 | |
| 69 | - return new Config((array)$config); | |
| 69 | + return new Config((array) $config); | |
| 70 | 70 | }); | 
| 71 | 71 | } | 
| 72 | 72 | |
| @@ -98,7 +98,7 @@ discard block | ||
| 98 | 98 | */ | 
| 99 | 99 | public function setReadonly(array $readonly = []): self | 
| 100 | 100 |                  { | 
| 101 | - $this->readonly = (array)$readonly; | |
| 101 | + $this->readonly = (array) $readonly; | |
| 102 | 102 | |
| 103 | 103 | return $this; | 
| 104 | 104 | } | 
| @@ -116,7 +116,7 @@ discard block | ||
| 116 | 116 | $locale = $locale->id(); | 
| 117 | 117 | } | 
| 118 | 118 | |
| 119 | - return \in_array((int)$locale, $this->readonly, true); | |
| 119 | + return \in_array((int) $locale, $this->readonly, true); | |
| 120 | 120 | } | 
| 121 | 121 | }; | 
| 122 | 122 | |
| @@ -64,13 +64,13 @@ discard block | ||
| 64 | 64 | ); | 
| 65 | 65 | |
| 66 | 66 |          if ($this->translator()->has($key = $this->translationKey())) { | 
| 67 | - $this->setTitle((string)$this->translator()->trans($key)); | |
| 67 | + $this->setTitle((string) $this->translator()->trans($key)); | |
| 68 | 68 |          } else { | 
| 69 | 69 | $this->setTitle(Architect::humanize($title)); | 
| 70 | 70 | } | 
| 71 | 71 | |
| 72 | 72 |          if ($this->translator()->has($key = $this->descriptionKey())) { | 
| 73 | - $this->setDescription((string)$this->translator()->trans($key)); | |
| 73 | + $this->setDescription((string) $this->translator()->trans($key)); | |
| 74 | 74 | } | 
| 75 | 75 | } | 
| 76 | 76 | |
| @@ -312,7 +312,7 @@ discard block | ||
| 312 | 312 | */ | 
| 313 | 313 | public function isVisibleOnPage(string $page): bool | 
| 314 | 314 |      { | 
| 315 | - return (bool)$this->visibility[$page] ?? false; | |
| 315 | + return (bool) $this->visibility[$page] ?? false; | |
| 316 | 316 | } | 
| 317 | 317 | |
| 318 | 318 | /** | 
| @@ -322,7 +322,7 @@ discard block | ||
| 322 | 322 | */ | 
| 323 | 323 | public function hideOnPages($pages): self | 
| 324 | 324 |      { | 
| 325 | - return $this->setPagesVisibility((array)$pages, false); | |
| 325 | + return $this->setPagesVisibility((array) $pages, false); | |
| 326 | 326 | } | 
| 327 | 327 | |
| 328 | 328 | /** | 
| @@ -332,7 +332,7 @@ discard block | ||
| 332 | 332 | */ | 
| 333 | 333 | public function showOnPages($pages): self | 
| 334 | 334 |      { | 
| 335 | - return $this->setPagesVisibility((array)$pages, true); | |
| 335 | + return $this->setPagesVisibility((array) $pages, true); | |
| 336 | 336 | } | 
| 337 | 337 | |
| 338 | 338 | /** | 
| @@ -192,7 +192,7 @@ | ||
| 192 | 192 | |
| 193 | 193 | $instance = $eloquent | 
| 194 | 194 |                  ->when($searchByKey, function ($query) use ($searchableKey, $term) { | 
| 195 | - return $query->where($searchableKey, (int)$term); | |
| 195 | + return $query->where($searchableKey, (int) $term); | |
| 196 | 196 | }) | 
| 197 | 197 |                  ->when(!$searchByKey, function ($query) use ($searchableKey, $term) { | 
| 198 | 198 |                      return $query->orWhere($searchableKey, 'LIKE', "%{$term}%"); |