| @@ -61,7 +61,7 @@ discard block | ||
| 61 | 61 | */ | 
| 62 | 62 | public function handle() | 
| 63 | 63 |      { | 
| 64 | -        $file = preg_split(' (/|\\\\) ', (string)$this->argument('name')) ?? []; | |
| 64 | +        $file = preg_split(' (/|\\\\) ', (string) $this->argument('name')) ?? []; | |
| 65 | 65 | |
| 66 | 66 |          if (!$file) { | 
| 67 | 67 | return 'Something wrong with the inputs !'; | 
| @@ -279,9 +279,9 @@ discard block | ||
| 279 | 279 | $content = $filePath . $repoName . '.php'; | 
| 280 | 280 | } | 
| 281 | 281 | |
| 282 | -        if(is_dir($filePath) && file_exists($content)){ | |
| 282 | +        if (is_dir($filePath) && file_exists($content)) { | |
| 283 | 283 | // Ask to replace exiting file | 
| 284 | -            if (! $this->confirm("This file, {$content} already exit, do you want to replace?")) { | |
| 284 | +            if (!$this->confirm("This file, {$content} already exit, do you want to replace?")) { | |
| 285 | 285 |                  $this->line('File Not Replaced'); | 
| 286 | 286 | return false; | 
| 287 | 287 | } | 
| @@ -65,7 +65,7 @@ discard block | ||
| 65 | 65 | $this->breadcrumbs = new Collection(); | 
| 66 | 66 | |
| 67 | 67 |          $language = $request->header('Language', 'en'); | 
| 68 | -        if (! in_array($language, Config::get('app.locales', []))) { | |
| 68 | +        if (!in_array($language, Config::get('app.locales', []))) { | |
| 69 | 69 | $language = 'en'; | 
| 70 | 70 | } | 
| 71 | 71 |          $limit = $request->get('limit', 10); | 
| @@ -111,10 +111,10 @@ discard block | ||
| 111 | 111 | $this->interface = $interface; | 
| 112 | 112 | $this->isAPI = $request->expectsJson(); | 
| 113 | 113 | |
| 114 | -        if (! $this->isAPI) { | |
| 114 | +        if (!$this->isAPI) { | |
| 115 | 115 | $this->breadcrumbs = new Collection(); | 
| 116 | 116 | $this->search = new Collection(); | 
| 117 | -            View::share('pageTitle', $this->pageTitle.' | '.Config::get('app.name')); | |
| 117 | +            View::share('pageTitle', $this->pageTitle . ' | ' . Config::get('app.name')); | |
| 118 | 118 |              View::share('breadcrumbs', $this->breadcrumbs); | 
| 119 | 119 |              View::share('menu', $this->menu); | 
| 120 | 120 |              View::share('search', $this->search); | 
| @@ -133,8 +133,8 @@ discard block | ||
| 133 | 133 |      { | 
| 134 | 134 | $data = $this->interface->simplePaginate($this->limit, $this->request->all()); | 
| 135 | 135 | |
| 136 | -        if (! $this->isAPI) { | |
| 137 | -            View::share('pageTitle', 'List '.$this->pageTitle.' | '.Config::get('app.name')); | |
| 136 | +        if (!$this->isAPI) { | |
| 137 | +            View::share('pageTitle', 'List ' . $this->pageTitle . ' | ' . Config::get('app.name')); | |
| 138 | 138 |              $this->breadcrumbs->put('index', [ | 
| 139 | 139 | 'link' => $this->routeIndex, | 
| 140 | 140 | 'text' => $this->pageTitle, | 
| @@ -163,8 +163,8 @@ discard block | ||
| 163 | 163 | */ | 
| 164 | 164 | public function create() | 
| 165 | 165 |      { | 
| 166 | -        if (! $this->isAPI) { | |
| 167 | -            View::share('pageTitle', 'Create '.$this->pageTitle.' | '.Config::get('app.name')); | |
| 166 | +        if (!$this->isAPI) { | |
| 167 | +            View::share('pageTitle', 'Create ' . $this->pageTitle . ' | ' . Config::get('app.name')); | |
| 168 | 168 |              $this->breadcrumbs->put('create', [ | 
| 169 | 169 | 'link' => $this->createRoute, | 
| 170 | 170 |                  'text' => trans('repository-generator.create'), | 
| @@ -198,11 +198,11 @@ discard block | ||
| 198 | 198 | public function show($entityId) | 
| 199 | 199 |      { | 
| 200 | 200 | $entity = $this->interface->find($entityId); | 
| 201 | -        if (! $this->isAPI) { | |
| 202 | -            if (! $entity) { | |
| 201 | +        if (!$this->isAPI) { | |
| 202 | +            if (!$entity) { | |
| 203 | 203 |                  return Redirect::to($this->routeIndex)->with('warning', __('repository-generator.not_found')); | 
| 204 | 204 | } | 
| 205 | -            View::share('pageTitle', 'View '.$this->pageTitle.' | '.Config::get('app.name')); | |
| 205 | +            View::share('pageTitle', 'View ' . $this->pageTitle . ' | ' . Config::get('app.name')); | |
| 206 | 206 |              $this->breadcrumbs->put('view', [ | 
| 207 | 207 | 'link' => '', | 
| 208 | 208 |                  'text' => __('repository-generator.show'), | 
| @@ -211,7 +211,7 @@ discard block | ||
| 211 | 211 | return view($this->viewShow, $this->params) | 
| 212 | 212 |                  ->with('entity', $entity); | 
| 213 | 213 | } | 
| 214 | -        if (! $entity) { | |
| 214 | +        if (!$entity) { | |
| 215 | 215 | return response()->json(null, JsonResponse::HTTP_NOT_FOUND); | 
| 216 | 216 | } | 
| 217 | 217 | |
| @@ -231,8 +231,8 @@ discard block | ||
| 231 | 231 | public function edit($entityId) | 
| 232 | 232 |      { | 
| 233 | 233 | $entity = $this->interface->find($entityId); | 
| 234 | -        if (! $this->isAPI) { | |
| 235 | -            if (! $entity) { | |
| 234 | +        if (!$this->isAPI) { | |
| 235 | +            if (!$entity) { | |
| 236 | 236 |                  return Redirect::to($this->routeIndex)->with('warning', __('repository-generator.not_found')); | 
| 237 | 237 | } | 
| 238 | 238 |              $this->breadcrumbs->put('edit', [ | 
| @@ -315,7 +315,7 @@ discard block | ||
| 315 | 315 | */ | 
| 316 | 316 | public function makeResponse($entity, $appendEntity = false) | 
| 317 | 317 |      { | 
| 318 | -        if (! $this->isAPI) { | |
| 318 | +        if (!$this->isAPI) { | |
| 319 | 319 |              if ($entity) { | 
| 320 | 320 |                  return Redirect::to($this->routeIndex)->with('message', __('repository-generator.success')); | 
| 321 | 321 | } |