@@ -84,7 +84,7 @@ |
||
| 84 | 84 | * |
| 85 | 85 | * @param \Exception $e The exception to convert. |
| 86 | 86 | * |
| 87 | - * @return mixed |
|
| 87 | + * @return \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\Response |
|
| 88 | 88 | */ |
| 89 | 89 | protected function convertExceptionToResponse(Exception $e) |
| 90 | 90 | { |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | * @param \Exception $exception |
| 32 | 32 | * @return void |
| 33 | 33 | */ |
| 34 | - public function report(Exception $exception) |
|
| 34 | + public function report (Exception $exception) |
|
| 35 | 35 | { |
| 36 | 36 | parent::report($exception); |
| 37 | 37 | } |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | * @param \Exception $exception |
| 44 | 44 | * @return \Illuminate\Http\Response |
| 45 | 45 | */ |
| 46 | - public function render($request, Exception $exception) |
|
| 46 | + public function render ($request, Exception $exception) |
|
| 47 | 47 | { |
| 48 | 48 | if ($exception instanceof \Ultraware\Roles\Exceptions\RoleDeniedException || |
| 49 | 49 | $exception instanceof \Ultraware\Roles\Exceptions\PermissionDeniedException || |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | * |
| 71 | 71 | * @return \Illuminate\Http\Response |
| 72 | 72 | */ |
| 73 | - protected function unauthenticated($request, AuthenticationException $exception) |
|
| 73 | + protected function unauthenticated ($request, AuthenticationException $exception) |
|
| 74 | 74 | { |
| 75 | 75 | if ($request->expectsJson()) { |
| 76 | 76 | return response()->json(['error' => 'Unauthenticated.'], 401); |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | * |
| 87 | 87 | * @return mixed |
| 88 | 88 | */ |
| 89 | - protected function convertExceptionToResponse(Exception $e) |
|
| 89 | + protected function convertExceptionToResponse (Exception $e) |
|
| 90 | 90 | { |
| 91 | 91 | if (config('app.debug')) { |
| 92 | 92 | $whoops = new \Whoops\Run; |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | * |
| 12 | 12 | * @return string |
| 13 | 13 | */ |
| 14 | - public function getPath(Media $media) : string |
|
| 14 | + public function getPath (Media $media) : string |
|
| 15 | 15 | { |
| 16 | 16 | return $media->collection_name . '/' . $media->id . '/'; |
| 17 | 17 | } |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | * |
| 22 | 22 | * @return string |
| 23 | 23 | */ |
| 24 | - public function getPathForConversions(Media $media) : string |
|
| 24 | + public function getPathForConversions (Media $media) : string |
|
| 25 | 25 | { |
| 26 | 26 | return $this->getPath($media) . 'conversions/'; |
| 27 | 27 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | * |
| 24 | 24 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
| 25 | 25 | */ |
| 26 | - public function user() |
|
| 26 | + public function user () |
|
| 27 | 27 | { |
| 28 | 28 | return $this->belongsTo('Xetaravel\Models\User'); |
| 29 | 29 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | * |
| 18 | 18 | * @return void |
| 19 | 19 | */ |
| 20 | - protected static function boot() |
|
| 20 | + protected static function boot () |
|
| 21 | 21 | { |
| 22 | 22 | parent::boot(); |
| 23 | 23 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | * |
| 40 | 40 | * @return array |
| 41 | 41 | */ |
| 42 | - public function countCaches(): array |
|
| 42 | + public function countCaches (): array |
|
| 43 | 43 | { |
| 44 | 44 | return [ |
| 45 | 45 | User::class, |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * |
| 53 | 53 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
| 54 | 54 | */ |
| 55 | - public function category() |
|
| 55 | + public function category () |
|
| 56 | 56 | { |
| 57 | 57 | return $this->belongsTo('Xetaravel\Models\Category'); |
| 58 | 58 | } |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | * |
| 63 | 63 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
| 64 | 64 | */ |
| 65 | - public function user() |
|
| 65 | + public function user () |
|
| 66 | 66 | { |
| 67 | 67 | return $this->belongsTo('Xetaravel\Models\User'); |
| 68 | 68 | } |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | * |
| 73 | 73 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
| 74 | 74 | */ |
| 75 | - public function comments() |
|
| 75 | + public function comments () |
|
| 76 | 76 | { |
| 77 | 77 | return $this->hasMany('Xetaravel\Models\Comment'); |
| 78 | 78 | } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | * |
| 26 | 26 | * @return array |
| 27 | 27 | */ |
| 28 | - public function countCaches(): array |
|
| 28 | + public function countCaches (): array |
|
| 29 | 29 | { |
| 30 | 30 | return [ |
| 31 | 31 | User::class, |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | * |
| 39 | 39 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
| 40 | 40 | */ |
| 41 | - public function user() |
|
| 41 | + public function user () |
|
| 42 | 42 | { |
| 43 | 43 | return $this->belongsTo('Xetaravel\Models\User'); |
| 44 | 44 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | * |
| 49 | 49 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
| 50 | 50 | */ |
| 51 | - public function article() |
|
| 51 | + public function article () |
|
| 52 | 52 | { |
| 53 | 53 | return $this->belongsTo('Xetaravel\Models\Article'); |
| 54 | 54 | } |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | * |
| 97 | 97 | * @return string |
| 98 | 98 | */ |
| 99 | - public function slugStrategy(): string |
|
| 99 | + public function slugStrategy (): string |
|
| 100 | 100 | { |
| 101 | 101 | return 'username'; |
| 102 | 102 | } |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | * |
| 107 | 107 | * @return void |
| 108 | 108 | */ |
| 109 | - public function registerMediaConversions() |
|
| 109 | + public function registerMediaConversions () |
|
| 110 | 110 | { |
| 111 | 111 | $this->addMediaConversion('thumbnail.small') |
| 112 | 112 | ->width(100) |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | * |
| 133 | 133 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
| 134 | 134 | */ |
| 135 | - public function comments() |
|
| 135 | + public function comments () |
|
| 136 | 136 | { |
| 137 | 137 | return $this->hasMany('Xetaravel\Models\Comment'); |
| 138 | 138 | } |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | * |
| 143 | 143 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
| 144 | 144 | */ |
| 145 | - public function articles() |
|
| 145 | + public function articles () |
|
| 146 | 146 | { |
| 147 | 147 | return $this->hasMany('Xetaravel\Models\Article'); |
| 148 | 148 | } |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | * |
| 153 | 153 | * @return \Illuminate\Database\Eloquent\Relations\HasOne |
| 154 | 154 | */ |
| 155 | - public function account() |
|
| 155 | + public function account () |
|
| 156 | 156 | { |
| 157 | 157 | return $this->hasOne('Xetaravel\Models\Account'); |
| 158 | 158 | } |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | * |
| 163 | 163 | * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany |
| 164 | 164 | */ |
| 165 | - public function roles() |
|
| 165 | + public function roles () |
|
| 166 | 166 | { |
| 167 | 167 | return $this->belongsToMany('Ultraware\Roles\Models\Role'); |
| 168 | 168 | } |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | * |
| 11 | 11 | * @return string |
| 12 | 12 | */ |
| 13 | - public function getAvatarSmallAttribute(): string |
|
| 13 | + public function getAvatarSmallAttribute (): string |
|
| 14 | 14 | { |
| 15 | 15 | return $this->getMedia('avatar')[0]->getUrl('thumbnail.small'); |
| 16 | 16 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | * |
| 21 | 21 | * @return string |
| 22 | 22 | */ |
| 23 | - public function getAvatarMediumAttribute(): string |
|
| 23 | + public function getAvatarMediumAttribute (): string |
|
| 24 | 24 | { |
| 25 | 25 | return $this->getMedia('avatar')[0]->getUrl('thumbnail.medium'); |
| 26 | 26 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | * |
| 31 | 31 | * @return string |
| 32 | 32 | */ |
| 33 | - public function getAvatarBigAttribute(): string |
|
| 33 | + public function getAvatarBigAttribute (): string |
|
| 34 | 34 | { |
| 35 | 35 | return $this->getMedia('avatar')[0]->getUrl('thumbnail.big'); |
| 36 | 36 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | * |
| 41 | 41 | * @return string |
| 42 | 42 | */ |
| 43 | - public function getProfileBackgroundAttribute(): string |
|
| 43 | + public function getProfileBackgroundAttribute (): string |
|
| 44 | 44 | { |
| 45 | 45 | return UserUtility::getProfileBackground(); |
| 46 | 46 | } |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | * |
| 13 | 13 | * @return string |
| 14 | 14 | */ |
| 15 | - public function slugStrategy(): string |
|
| 15 | + public function slugStrategy (): string |
|
| 16 | 16 | { |
| 17 | 17 | return 'title'; |
| 18 | 18 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | /** |
| 21 | 21 | * Get the articles for the category. |
| 22 | 22 | */ |
| 23 | - public function articles() |
|
| 23 | + public function articles () |
|
| 24 | 24 | { |
| 25 | 25 | return $this->hasMany('Xetaravel\Models\Article'); |
| 26 | 26 | } |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | * |
| 14 | 14 | * @return \Illuminate\Validation\Validator |
| 15 | 15 | */ |
| 16 | - public static function update(array $data): Validator |
|
| 16 | + public static function update (array $data): Validator |
|
| 17 | 17 | { |
| 18 | 18 | $rules = [ |
| 19 | 19 | 'first_name' => 'max:100', |