@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | * |
| 45 | 45 | * @param \Illuminate\Http\Request $request |
| 46 | 46 | * |
| 47 | - * @return \Illuminate\Http\Response |
|
| 47 | + * @return \Illuminate\Http\RedirectResponse |
|
| 48 | 48 | */ |
| 49 | 49 | public function postLogin(Request $request) |
| 50 | 50 | { |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | /** |
| 88 | 88 | * Log the user out of the application. |
| 89 | 89 | * |
| 90 | - * @return \Illuminate\Http\Response |
|
| 90 | + * @return \Illuminate\Http\RedirectResponse |
|
| 91 | 91 | */ |
| 92 | 92 | public function getLogout() |
| 93 | 93 | { |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | * |
| 69 | 69 | * @param Request $request |
| 70 | 70 | * |
| 71 | - * @return Response |
|
| 71 | + * @return \Illuminate\Http\RedirectResponse|null |
|
| 72 | 72 | */ |
| 73 | 73 | public function postEmail(Request $request) |
| 74 | 74 | { |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | * |
| 134 | 134 | * @param Request $request |
| 135 | 135 | * |
| 136 | - * @return Response |
|
| 136 | + * @return \Illuminate\Http\RedirectResponse |
|
| 137 | 137 | */ |
| 138 | 138 | public function postReset(Request $request) |
| 139 | 139 | { |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | { |
| 75 | 75 | $this->validate($request, ['email' => 'required']); |
| 76 | 76 | |
| 77 | - $response = $this->passwords->sendResetLink($request->only('email'), function ($message) { |
|
| 77 | + $response = $this->passwords->sendResetLink($request->only('email'), function($message) { |
|
| 78 | 78 | $message->subject($this->getEmailSubject()); |
| 79 | 79 | }); |
| 80 | 80 | |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | 'email', 'password', 'password_confirmation', 'token' |
| 148 | 148 | ); |
| 149 | 149 | |
| 150 | - $response = $this->passwords->reset($credentials, function ($user, $password) { |
|
| 150 | + $response = $this->passwords->reset($credentials, function($user, $password) { |
|
| 151 | 151 | $user->password = $password; |
| 152 | 152 | |
| 153 | 153 | $user->save(); |
@@ -60,6 +60,10 @@ discard block |
||
| 60 | 60 | ]); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | + /** |
|
| 64 | + * @param string $fieldName |
|
| 65 | + * @param string $locale |
|
| 66 | + */ |
|
| 63 | 67 | public function getTranslatedFieldName($fieldName, $locale) |
| 64 | 68 | { |
| 65 | 69 | if ($locale == '') { |
@@ -85,6 +89,9 @@ discard block |
||
| 85 | 89 | return Form::getValueAttribute($locale == '' ? $propertyName : Form::getTranslatedFieldName($propertyName, $locale), $value); |
| 86 | 90 | } |
| 87 | 91 | |
| 92 | + /** |
|
| 93 | + * @param string $type |
|
| 94 | + */ |
|
| 88 | 95 | public function tags($subject, $type = null) |
| 89 | 96 | { |
| 90 | 97 | $allTags = app()->make(TagRepository::class)->getAllWithType($type)->lists('name', 'name'); |
@@ -97,6 +104,9 @@ discard block |
||
| 97 | 104 | ); |
| 98 | 105 | } |
| 99 | 106 | |
| 107 | + /** |
|
| 108 | + * @param string $type |
|
| 109 | + */ |
|
| 100 | 110 | public function category($subject, $type = null) |
| 101 | 111 | { |
| 102 | 112 | $allCategories = app()->make(TagRepository::class)->getAllWithType($type)->lists('name', 'name')->toArray(); |
@@ -118,6 +128,10 @@ discard block |
||
| 118 | 128 | return Form::select('locale', $list, $current, ['data-select' => 'select']); |
| 119 | 129 | } |
| 120 | 130 | |
| 131 | + /** |
|
| 132 | + * @param string $collection |
|
| 133 | + * @param string $type |
|
| 134 | + */ |
|
| 121 | 135 | public function media($subject, $collection, $type, $associated = []) |
| 122 | 136 | { |
| 123 | 137 | $initialMedia = htmlspecialchars(fractal() |
@@ -131,7 +131,7 @@ |
||
| 131 | 131 | $associated['locales'] = config('app.locales'); |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | - $associatedData = collect($associated)->map(function ($data, $key) { |
|
| 134 | + $associatedData = collect($associated)->map(function($data, $key) { |
|
| 135 | 135 | $json = htmlspecialchars(json_encode($data)); |
| 136 | 136 | |
| 137 | 137 | return "data-{$key}=\"{$json}\""; |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use App\Models\Enums\TagType; |
| 6 | 6 | use App\Models\Tag; |
| 7 | 7 | use App\Models\Transformers\MediaTransformer; |
| 8 | -use App\Repositories\TagRepository; |
|
| 9 | 8 | use Carbon\Carbon; |
| 10 | 9 | use Illuminate\Html\FormBuilder as BaseFormBuilder; |
| 11 | 10 | use HTML; |
@@ -42,8 +42,7 @@ |
||
| 42 | 42 | public function fire() |
| 43 | 43 | { |
| 44 | 44 | $queue = ($this->argument('queue')) ? |
| 45 | - $this->argument('queue') : |
|
| 46 | - config('queue.connections.beanstalkd.queue'); |
|
| 45 | + $this->argument('queue') : config('queue.connections.beanstalkd.queue'); |
|
| 47 | 46 | |
| 48 | 47 | $this->info(sprintf('Clearing queue: %s', $queue)); |
| 49 | 48 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | public function handle() |
| 32 | 32 | { |
| 33 | - array_map(function ($draftableModelClass) { |
|
| 33 | + array_map(function($draftableModelClass) { |
|
| 34 | 34 | $this->deleteOldDraftsForModelClass($draftableModelClass); |
| 35 | 35 | }, $this->getAllDraftableModelClassNames()); |
| 36 | 36 | |
@@ -39,14 +39,14 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | private function getAllDraftableModelClassNames() |
| 41 | 41 | { |
| 42 | - return array_filter($this->getAllModelClassNames(), function ($modelClass) { |
|
| 42 | + return array_filter($this->getAllModelClassNames(), function($modelClass) { |
|
| 43 | 43 | return (in_array(Draftable::class, class_uses($modelClass))); |
| 44 | 44 | }); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | private function getAllModelClassNames() |
| 48 | 48 | { |
| 49 | - return array_map(function ($path) { |
|
| 49 | + return array_map(function($path) { |
|
| 50 | 50 | $modelPath = str_replace(base_path().'/', '', $path); |
| 51 | 51 | $modelClass = '\\'.ucfirst(str_replace(['/', '.php'], ['\\', ''], $modelPath)); |
| 52 | 52 | |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | Route::post('auth/login', 'AuthController@postLogin'); |
| 5 | 5 | Route::get('auth/logout', ['uses' => 'AuthController@getLogout', 'as' => 'logout']); |
| 6 | 6 | |
| 7 | -Route::get('auth', function () { |
|
| 7 | +Route::get('auth', function() { |
|
| 8 | 8 | return redirect('/nl/auth/login'); |
| 9 | 9 | }); |
| 10 | 10 | |
@@ -13,12 +13,12 @@ discard block |
||
| 13 | 13 | Route::get('password/reset/{token}', 'PasswordController@getReset'); |
| 14 | 14 | Route::post('password/reset/{token}', 'PasswordController@postReset'); |
| 15 | 15 | |
| 16 | -Route::get('password', function () { |
|
| 16 | +Route::get('password', function() { |
|
| 17 | 17 | return redirect()->action('PasswordController@getEmail'); |
| 18 | 18 | }); |
| 19 | 19 | |
| 20 | 20 | Route::pattern('registrationRole', '(member)'); |
| 21 | -Route::group(['prefix' => 'register'], function () { |
|
| 21 | +Route::group(['prefix' => 'register'], function() { |
|
| 22 | 22 | Route::get('{registrationRole}', 'RegistrationController@showRegistrationForm'); |
| 23 | 23 | Route::post('{registrationRole}', 'RegistrationController@saveUser'); |
| 24 | 24 | }); |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | |
| 12 | 12 | public static function allAsRegex() |
| 13 | 13 | { |
| 14 | - return collect(self::values())->map(function ($role) { |
|
| 14 | + return collect(self::values())->map(function($role) { |
|
| 15 | 15 | return "({$role})"; |
| 16 | 16 | })->implode('|'); |
| 17 | 17 | } |
@@ -11,13 +11,13 @@ |
||
| 11 | 11 | |
| 12 | 12 | public static function downloadAll() |
| 13 | 13 | { |
| 14 | - Excel::create('Responses '.date('Y-m-d'), function ($excel) { |
|
| 14 | + Excel::create('Responses '.date('Y-m-d'), function($excel) { |
|
| 15 | 15 | |
| 16 | - $excel->sheet('Responses', function ($sheet) { |
|
| 16 | + $excel->sheet('Responses', function($sheet) { |
|
| 17 | 17 | |
| 18 | 18 | $sheet->freezeFirstRow(); |
| 19 | 19 | |
| 20 | - $sheet->cells('A1:Z1', function ($cells) { |
|
| 20 | + $sheet->cells('A1:Z1', function($cells) { |
|
| 21 | 21 | $cells->setFontWeight('bold'); |
| 22 | 22 | $cells->setBorder('node', 'none', 'solid', 'none'); |
| 23 | 23 | }); |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | foreach ($email as $singleEmailAddress) { |
| 38 | - $this->mail->queue($view, $data, function ($message) use ($singleEmailAddress, $subject) { |
|
| 38 | + $this->mail->queue($view, $data, function($message) use ($singleEmailAddress, $subject) { |
|
| 39 | 39 | $message->to($singleEmailAddress)->subject($subject); |
| 40 | 40 | }); |
| 41 | 41 | } |