@@ -519,16 +519,16 @@ discard block |
||
| 519 | 519 | public function scopeSearch($query, $searchQuery) |
| 520 | 520 | { |
| 521 | 521 | |
| 522 | - return $query->where(function ($query) use ($searchQuery) { |
|
| 522 | + return $query->where(function($query) use ($searchQuery) { |
|
| 523 | 523 | $columns = $this->getAllColumnsNames(); |
| 524 | 524 | |
| 525 | 525 | foreach ($columns as $column) { |
| 526 | - $column = $this->isReserved($column) ? '"' . $column . '"' : $column; |
|
| 526 | + $column = $this->isReserved($column) ? '"'.$column.'"' : $column; |
|
| 527 | 527 | |
| 528 | 528 | if ((DB::connection()->getDriverName()) == 'oracle') { |
| 529 | - $query->orWhereRaw('LOWER(' . $column . ') like ?', ['%' . strtolower($searchQuery) . '%']); |
|
| 529 | + $query->orWhereRaw('LOWER('.$column.') like ?', ['%'.strtolower($searchQuery).'%']); |
|
| 530 | 530 | } else { |
| 531 | - $query->orwhere($column, 'like', '%' . $searchQuery . '%'); |
|
| 531 | + $query->orwhere($column, 'like', '%'.$searchQuery.'%'); |
|
| 532 | 532 | } |
| 533 | 533 | |
| 534 | 534 | } |
@@ -539,13 +539,13 @@ discard block |
||
| 539 | 539 | { |
| 540 | 540 | switch (DB::connection()->getDriverName()) { |
| 541 | 541 | case 'pgsql': |
| 542 | - $query = "SELECT column_name FROM information_schema.columns WHERE table_name = '" . $this->getTable() . "'"; |
|
| 542 | + $query = "SELECT column_name FROM information_schema.columns WHERE table_name = '".$this->getTable()."'"; |
|
| 543 | 543 | $column_name = 'column_name'; |
| 544 | 544 | $reverse = true; |
| 545 | 545 | break; |
| 546 | 546 | |
| 547 | 547 | case 'mysql': |
| 548 | - $query = 'SHOW COLUMNS FROM ' . $this->getTable(); |
|
| 548 | + $query = 'SHOW COLUMNS FROM '.$this->getTable(); |
|
| 549 | 549 | $column_name = 'Field'; |
| 550 | 550 | $reverse = false; |
| 551 | 551 | break; |
@@ -554,17 +554,17 @@ discard block |
||
| 554 | 554 | $parts = explode('.', $this->getTable()); |
| 555 | 555 | $num = (count($parts) - 1); |
| 556 | 556 | $table = $parts[$num]; |
| 557 | - $query = "SELECT column_name FROM " . DB::connection()->getConfig('database') . ".INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = N'" . $table . "'"; |
|
| 557 | + $query = "SELECT column_name FROM ".DB::connection()->getConfig('database').".INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = N'".$table."'"; |
|
| 558 | 558 | $column_name = 'column_name'; |
| 559 | 559 | $reverse = false; |
| 560 | 560 | break; |
| 561 | 561 | case 'oracle': |
| 562 | - $query = 'SELECT COLUMN_NAME from ALL_TAB_COLUMNS WHERE TABLE_NAME=\'' . strtoupper($this->getTable()) . '\' AND DATA_TYPE <> \'CLOB\' AND DATA_TYPE <> \'NUMBER\' AND DATA_TYPE <> \'TIMESTAMP\''; |
|
| 562 | + $query = 'SELECT COLUMN_NAME from ALL_TAB_COLUMNS WHERE TABLE_NAME=\''.strtoupper($this->getTable()).'\' AND DATA_TYPE <> \'CLOB\' AND DATA_TYPE <> \'NUMBER\' AND DATA_TYPE <> \'TIMESTAMP\''; |
|
| 563 | 563 | $column_name = 'column_name'; |
| 564 | 564 | $reverse = false; |
| 565 | 565 | break; |
| 566 | 566 | default: |
| 567 | - $error = 'Database driver not supported: ' . DB::connection()->getConfig('driver'); |
|
| 567 | + $error = 'Database driver not supported: '.DB::connection()->getConfig('driver'); |
|
| 568 | 568 | throw new Exception($error); |
| 569 | 569 | } |
| 570 | 570 | |
@@ -583,12 +583,12 @@ discard block |
||
| 583 | 583 | |
| 584 | 584 | public function scopeBetweenCreate($query, $start, $end) |
| 585 | 585 | { |
| 586 | - return $query->whereBetween($this->getTable() . '.created_at', [$start, $end]); |
|
| 586 | + return $query->whereBetween($this->getTable().'.created_at', [$start, $end]); |
|
| 587 | 587 | } |
| 588 | 588 | |
| 589 | 589 | public function scopeBetweenUpdate($query, $start, $end) |
| 590 | 590 | { |
| 591 | - return $query->whereBetween($this->getTable() . '.updated_at', [$start, $end]); |
|
| 591 | + return $query->whereBetween($this->getTable().'.updated_at', [$start, $end]); |
|
| 592 | 592 | } |
| 593 | 593 | |
| 594 | 594 | |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | { |
| 21 | 21 | foreach ($this->events as $name => $event) |
| 22 | 22 | { |
| 23 | - Event::listen($name, get_class($this) . '@' . $event['action'], $event['priority']); |
|
| 23 | + Event::listen($name, get_class($this).'@'.$event['action'], $event['priority']); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | } |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | |
| 62 | 62 | foreach ($dataActions as $action) |
| 63 | 63 | { |
| 64 | - $dataResult[$action] = trans('expendable::mail.' . $action); |
|
| 64 | + $dataResult[$action] = trans('expendable::mail.'.$action); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | return self::getLabel($dataResult, $id); |
@@ -227,6 +227,6 @@ |
||
| 227 | 227 | */ |
| 228 | 228 | protected function getStub() |
| 229 | 229 | { |
| 230 | - return __DIR__ . '/Lib/stubs/' . $this->getTemplate() . '.stub'; |
|
| 230 | + return __DIR__.'/Lib/stubs/'.$this->getTemplate().'.stub'; |
|
| 231 | 231 | } |
| 232 | 232 | } |
| 233 | 233 | \ No newline at end of file |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | $model = last($model); |
| 9 | 9 | $model = preg_replace('/\.php/i', '', $model); |
| 10 | 10 | |
| 11 | - return '\\' . $model; |
|
| 11 | + return '\\'.$model; |
|
| 12 | 12 | |
| 13 | 13 | } |
| 14 | 14 | |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | { |
| 21 | 21 | $state = preg_replace('/Contracts/i', 'States', $state); |
| 22 | 22 | $state = preg_replace('/Contract/i', 'Trait', $state); |
| 23 | - $result .= 'use ' . $state . ';' . "\n"; |
|
| 23 | + $result .= 'use '.$state.';'."\n"; |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | return $result; |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | public function getImplementation($states) |
| 31 | 31 | { |
| 32 | - $result = 'implements ' . join(', ', $states); |
|
| 32 | + $result = 'implements '.join(', ', $states); |
|
| 33 | 33 | |
| 34 | 34 | return $result; |
| 35 | 35 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | public function getIndex() |
| 30 | 30 | { |
| 31 | - return redirect()->to(action('\\' . get_class($this) . '@getEdit')); |
|
| 31 | + return redirect()->to(action('\\'.get_class($this).'@getEdit')); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | |
@@ -70,9 +70,9 @@ discard block |
||
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | $libelle = $request->get('libelle'); |
| 73 | - $libelle_form = $libelle . 'Form'; |
|
| 74 | - $libelle_datatable = $libelle . 'Datatable'; |
|
| 75 | - $libelle_controller = $libelle . 'Controller'; |
|
| 73 | + $libelle_form = $libelle.'Form'; |
|
| 74 | + $libelle_datatable = $libelle.'Datatable'; |
|
| 75 | + $libelle_controller = $libelle.'Controller'; |
|
| 76 | 76 | $model = $request->get('models'); |
| 77 | 77 | $states = $request->get('state'); |
| 78 | 78 | |
@@ -82,14 +82,14 @@ discard block |
||
| 82 | 82 | { |
| 83 | 83 | $this->artisan->call('datatable:make', [ |
| 84 | 84 | '--fields' => $request->get('colon_datatable'), |
| 85 | - 'name' => 'Datatables/' . $libelle_datatable |
|
| 85 | + 'name' => 'Datatables/'.$libelle_datatable |
|
| 86 | 86 | ]); |
| 87 | 87 | } else if (strpos($state, 'FormStateContract') !== false) |
| 88 | 88 | { |
| 89 | 89 | |
| 90 | 90 | $this->artisan->call('form:make', [ |
| 91 | 91 | '--fields' => $request->get('fields_form'), |
| 92 | - 'name' => 'Forms/' . $libelle_form |
|
| 92 | + 'name' => 'Forms/'.$libelle_form |
|
| 93 | 93 | ]); |
| 94 | 94 | } |
| 95 | 95 | } |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | '--model' => $model, |
| 100 | 100 | '--datatable' => $libelle_datatable, |
| 101 | 101 | '--form' => $libelle_form, |
| 102 | - 'name' => 'Http/Controllers/Admin/' . $libelle_controller |
|
| 102 | + 'name' => 'Http/Controllers/Admin/'.$libelle_controller |
|
| 103 | 103 | ]); |
| 104 | 104 | |
| 105 | 105 | return redirect()->back()->with(Message::MESSAGE, [trans('expendable::success.generated')]); |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | { |
| 29 | 29 | parent::__construct($layoutManager); |
| 30 | 30 | |
| 31 | - $this->auth = $auth; |
|
| 31 | + $this->auth = $auth; |
|
| 32 | 32 | |
| 33 | 33 | } |
| 34 | 34 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | public function getLoginRedirect() |
| 40 | 40 | { |
| 41 | - return redirect()->action('\\' . self::class . '@getIndex'); |
|
| 41 | + return redirect()->action('\\'.self::class.'@getIndex'); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | public function getIndex() |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | |
| 212 | 212 | $broker = $this->getBroker(); |
| 213 | 213 | |
| 214 | - $response = \Password::broker($broker)->reset($credentials, function ($user, $password) { |
|
| 214 | + $response = \Password::broker($broker)->reset($credentials, function($user, $password) { |
|
| 215 | 215 | $user->password = bcrypt($password); |
| 216 | 216 | $user->save(); |
| 217 | 217 | |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | return redirect()->back()->with('error', trans($response)); |
| 233 | 233 | |
| 234 | 234 | case \Password::PASSWORD_RESET: |
| 235 | - return redirect()->to(action('\\' . get_class($this) . '@getIndex')); |
|
| 235 | + return redirect()->to(action('\\'.get_class($this).'@getIndex')); |
|
| 236 | 236 | } |
| 237 | 237 | |
| 238 | 238 | } |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | public function getIndex() |
| 28 | 28 | { |
| 29 | - return redirect()->to(action('\\' . get_class($this) . '@getEdit')); |
|
| 29 | + return redirect()->to(action('\\'.get_class($this).'@getEdit')); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | // ------------------------------------------------------------------------------------------------ |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | |
| 61 | - return redirect()->to(action('\\' . get_class($this) . '@getIndex')); |
|
| 61 | + return redirect()->to(action('\\'.get_class($this).'@getIndex')); |
|
| 62 | 62 | |
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | \ No newline at end of file |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | |
| 19 | 19 | |
| 20 | 20 | $this->layoutManager->add([ |
| 21 | - 'class_layout'=>$class . '-full-page', |
|
| 21 | + 'class_layout'=>$class.'-full-page', |
|
| 22 | 22 | 'content'=>$content, |
| 23 | 23 | ]); |
| 24 | 24 | |