| @@ -55,7 +55,7 @@ | ||
| 55 | 55 | /** | 
| 56 | 56 | * 获取当前用户的未读消息数. | 
| 57 | 57 | * | 
| 58 | - * @return \Illuminate\Contracts\Routing\ResponseFactory|\Symfony\Component\HttpFoundation\Response | |
| 58 | + * @return \Symfony\Component\HttpFoundation\Response | |
| 59 | 59 | */ | 
| 60 | 60 | public function unreadMessagesCount() | 
| 61 | 61 |      { | 
| @@ -5,7 +5,6 @@ | ||
| 5 | 5 | use Dingo\Api\Exception\StoreResourceFailedException; | 
| 6 | 6 | use PHPHub\Repositories\ReplyRepositoryInterface; | 
| 7 | 7 | use PHPHub\Transformers\ReplyTransformer; | 
| 8 | -use PHPHub\User; | |
| 9 | 8 | use Illuminate\Http\Request; | 
| 10 | 9 | use Prettus\Validator\Exceptions\ValidatorException; | 
| 11 | 10 | |
| @@ -260,7 +260,7 @@ discard block | ||
| 260 | 260 | * | 
| 261 | 261 | * @param $topic_id | 
| 262 | 262 | * | 
| 263 | - * @return \Illuminate\Contracts\Routing\ResponseFactory|\Symfony\Component\HttpFoundation\Response | |
| 263 | + * @return \Symfony\Component\HttpFoundation\Response | |
| 264 | 264 | */ | 
| 265 | 265 | public function favorite($topic_id) | 
| 266 | 266 |      { | 
| @@ -280,7 +280,7 @@ discard block | ||
| 280 | 280 | * | 
| 281 | 281 | * @param $topic_id | 
| 282 | 282 | * | 
| 283 | - * @return \Illuminate\Contracts\Routing\ResponseFactory|\Symfony\Component\HttpFoundation\Response | |
| 283 | + * @return \Symfony\Component\HttpFoundation\Response | |
| 284 | 284 | */ | 
| 285 | 285 | public function unFavorite($topic_id) | 
| 286 | 286 |      { | 
| @@ -300,7 +300,7 @@ discard block | ||
| 300 | 300 | * | 
| 301 | 301 | * @param $topic_id | 
| 302 | 302 | * | 
| 303 | - * @return \Illuminate\Contracts\Routing\ResponseFactory|\Symfony\Component\HttpFoundation\Response | |
| 303 | + * @return \Symfony\Component\HttpFoundation\Response | |
| 304 | 304 | */ | 
| 305 | 305 | public function attention($topic_id) | 
| 306 | 306 |      { | 
| @@ -320,7 +320,7 @@ discard block | ||
| 320 | 320 | * | 
| 321 | 321 | * @param $topic_id | 
| 322 | 322 | * | 
| 323 | - * @return \Illuminate\Contracts\Routing\ResponseFactory|\Symfony\Component\HttpFoundation\Response | |
| 323 | + * @return \Symfony\Component\HttpFoundation\Response | |
| 324 | 324 | */ | 
| 325 | 325 | public function unAttention($topic_id) | 
| 326 | 326 |      { | 
| @@ -165,7 +165,7 @@ | ||
| 165 | 165 | * 获取 UserId. | 
| 166 | 166 | * | 
| 167 | 167 | * @param $request | 
| 168 | - * @param $verifier | |
| 168 | + * @param callable $verifier | |
| 169 | 169 | * | 
| 170 | 170 | * @return int | 
| 171 | 171 | */ | 
| @@ -65,7 +65,7 @@ | ||
| 65 | 65 | */ | 
| 66 | 66 | protected function getVerifyCredentialsCallback() | 
| 67 | 67 |      { | 
| 68 | -        if (is_null($this->callback) || ! is_callable($this->callback)) { | |
| 68 | +        if (is_null($this->callback) || !is_callable($this->callback)) { | |
| 69 | 69 |              throw new ServerErrorException('Null or non-callable callback set on Password grant'); | 
| 70 | 70 | } | 
| 71 | 71 | |
| @@ -322,7 +322,7 @@ | ||
| 322 | 322 | /** | 
| 323 | 323 | * 通过 attentions 或 favorites 查找帖子. | 
| 324 | 324 | * | 
| 325 | - * @param $table | |
| 325 | + * @param string $table | |
| 326 | 326 | * @param $user_id | 
| 327 | 327 | * @param $columns | 
| 328 | 328 | * | 
| @@ -238,7 +238,7 @@ discard block | ||
| 238 | 238 | /** | 
| 239 | 239 | * 设置这个引入项目是否是嵌套的. | 
| 240 | 240 | * | 
| 241 | - * @param $parent string 父引入项名 | |
| 241 | + * @param string $parent string 父引入项名 | |
| 242 | 242 | * | 
| 243 | 243 | * @return $this | 
| 244 | 244 | */ | 
| @@ -285,7 +285,7 @@ discard block | ||
| 285 | 285 | /** | 
| 286 | 286 | * 获取一个新的自身的实例. | 
| 287 | 287 | * | 
| 288 | - * @param $name | |
| 288 | + * @param string $name | |
| 289 | 289 | * | 
| 290 | 290 | * @return Includable | 
| 291 | 291 | */ | 
| @@ -317,7 +317,7 @@ discard block | ||
| 317 | 317 | /** | 
| 318 | 318 | * 添加一个子引入项目. | 
| 319 | 319 | * | 
| 320 | - * @param mixed $children | |
| 320 | + * @param Includable $children | |
| 321 | 321 | */ | 
| 322 | 322 | public function addChildren(Includable $children) | 
| 323 | 323 |      { | 
| @@ -36,7 +36,7 @@ discard block | ||
| 36 | 36 | */ | 
| 37 | 37 | public function getColumns() | 
| 38 | 38 |      { | 
| 39 | -        if (! $this->columns) { | |
| 39 | +        if (!$this->columns) { | |
| 40 | 40 |              throw new \Exception("You must set includable's columns"); | 
| 41 | 41 | } | 
| 42 | 42 | |
| @@ -66,7 +66,7 @@ discard block | ||
| 66 | 66 | */ | 
| 67 | 67 | public function getDefaultColumns() | 
| 68 | 68 |      { | 
| 69 | -        if (! $this->default_columns) { | |
| 69 | +        if (!$this->default_columns) { | |
| 70 | 70 |              throw new \Exception("You must set includable's default columns"); | 
| 71 | 71 | } | 
| 72 | 72 | |
| @@ -96,7 +96,7 @@ discard block | ||
| 96 | 96 | */ | 
| 97 | 97 | public function getName() | 
| 98 | 98 |      { | 
| 99 | -        if (! $this->name) { | |
| 99 | +        if (!$this->name) { | |
| 100 | 100 |              throw new \Exception("You must set includable's name"); | 
| 101 | 101 | } | 
| 102 | 102 | |
| @@ -126,7 +126,7 @@ discard block | ||
| 126 | 126 | */ | 
| 127 | 127 | public function getForeignKey() | 
| 128 | 128 |      { | 
| 129 | -        if (! $this->nested && ! $this->foreign_key && ! $this->limit) { | |
| 129 | +        if (!$this->nested && !$this->foreign_key && !$this->limit) { | |
| 130 | 130 |              throw new \Exception("You must set includable's limit or foreign key"); | 
| 131 | 131 | } | 
| 132 | 132 | |
| @@ -156,7 +156,7 @@ discard block | ||
| 156 | 156 | */ | 
| 157 | 157 | public function getLimit() | 
| 158 | 158 |      { | 
| 159 | -        if (! $this->foreign_key && ! $this->limit) { | |
| 159 | +        if (!$this->foreign_key && !$this->limit) { | |
| 160 | 160 |              throw new \Exception("You must set includable's limit or foreign key"); | 
| 161 | 161 | } | 
| 162 | 162 | |
| @@ -12,7 +12,7 @@ | ||
| 12 | 12 | */ | 
| 13 | 13 | public function boot() | 
| 14 | 14 |      { | 
| 15 | -        app()->singleton(IncludeManager::class, function ($app) { | |
| 15 | +        app()->singleton(IncludeManager::class, function($app) { | |
| 16 | 16 | return new IncludeManager(); | 
| 17 | 17 | }); | 
| 18 | 18 | } | 
| @@ -28,7 +28,7 @@ | ||
| 28 | 28 |      { | 
| 29 | 29 | parent::boot($events); | 
| 30 | 30 | |
| 31 | -        if (! \Request::isMethod('GET')) { | |
| 31 | +        if (!\Request::isMethod('GET')) { | |
| 32 | 32 | $events->subscribe(PushNotificationHandler::class); | 
| 33 | 33 | } | 
| 34 | 34 | } | 
| @@ -12,16 +12,16 @@ | ||
| 12 | 12 |  { | 
| 13 | 13 | public function boot() | 
| 14 | 14 |      { | 
| 15 | -        $this->app[DingoAuth::class]->extend('oauth', function ($app) { | |
| 15 | +        $this->app[DingoAuth::class]->extend('oauth', function($app) { | |
| 16 | 16 | $provider = new OAuth2($app['oauth2-server.authorizer']->getChecker()); | 
| 17 | 17 | |
| 18 | -            $provider->setUserResolver(function ($id) { | |
| 18 | +            $provider->setUserResolver(function($id) { | |
| 19 | 19 | Auth::loginUsingId($id); | 
| 20 | 20 | |
| 21 | 21 | return User::findOrFail($id); | 
| 22 | 22 | }); | 
| 23 | 23 | |
| 24 | -            $provider->setClientResolver(function ($id) { | |
| 24 | +            $provider->setClientResolver(function($id) { | |
| 25 | 25 | //TODO: Logic to return a client by their ID. | 
| 26 | 26 | }); | 
| 27 | 27 | |