Completed
Pull Request — master (#32)
by
unknown
07:31
created
app/Presenters/NotificationPresenter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      */
39 39
     public function typeMessage()
40 40
     {
41
-        if (! array_key_exists($this->wrappedObject->type, $this->type_messages)) {
41
+        if (!array_key_exists($this->wrappedObject->type, $this->type_messages)) {
42 42
             throw new \Exception('Type '.$this->wrappedObject->type.'not exists');
43 43
         }
44 44
 
Please login to merge, or discard this patch.
app/Console/Commands/CodeSniffer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
         $process = new Process('php '.base_path('vendor/bin/php-cs-fixer').' fix');
42 42
 
43 43
         try {
44
-            $process->run(function ($type, $buffer) {
44
+            $process->run(function($type, $buffer) {
45 45
                 if (Process::ERR === $type) {
46 46
                     $this->error($buffer);
47 47
                 } else {
Please login to merge, or discard this patch.
app/Events/ShouldNotifyTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     public function __call($method, $args)
38 38
     {
39 39
         $property = snake_case(str_replace('get', '', $method));
40
-        if (! isset($this->$property) || $this->$property === null) {
40
+        if (!isset($this->$property) || $this->$property === null) {
41 41
             throw new \Exception('请在 Event 中设置 '.$property);
42 42
         }
43 43
 
Please login to merge, or discard this patch.
app/Repositories/Eloquent/Traits/AutoWithTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             $include = $include_manager->getIncludable($include_name);
45 45
             $include->setColumns(array_get($param_columns, $include_name, []));
46 46
 
47
-            if (! $include->getForeignKey()) {
47
+            if (!$include->getForeignKey()) {
48 48
                 $this->with($include->getRelation());
49 49
             } else {
50 50
                 $this->withOnly($include->getRelation(), $include->figureOutWhichColumns(), $include->isWithTrashed());
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     {
69 69
         $method_name = camel_case('include_'.str_replace('.', '_', $name));
70 70
 
71
-        if (! method_exists($this, $method_name)) {
71
+        if (!method_exists($this, $method_name)) {
72 72
             throw new Exception("You should define $method_name in your repository");
73 73
         }
74 74
 
Please login to merge, or discard this patch.
app/Repositories/Criteria/BaseCriteria.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
         $filter = $this->request->get(config('repository.criteria.params.filter', 'filter'), null);
22 22
         $orderBy = $this->request->get(config('repository.criteria.params.orderBy', 'orderBy'), null);
23 23
         $sortedBy = $this->request->get(config('repository.criteria.params.sortedBy', 'sortedBy'), 'asc');
24
-        $sortedBy = ! empty($sortedBy) ? $sortedBy : 'asc';
24
+        $sortedBy = !empty($sortedBy) ? $sortedBy : 'asc';
25 25
 
26 26
         if ($search && is_array($fieldsSearchable) && count($fieldsSearchable)) {
27 27
             $searchFields = is_array($searchFields) || is_null($searchFields) ? $searchFields : explode(';',
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             $search = $this->parserSearchValue($search);
33 33
             $modelForceAndWhere = false;
34 34
 
35
-            $builder = $builder->where(function ($query) use (
35
+            $builder = $builder->where(function($query) use (
36 36
                 $fields,
37 37
                 $search,
38 38
                 $searchData,
@@ -52,18 +52,18 @@  discard block
 block discarded – undo
52 52
                     if (isset($searchData[$field])) {
53 53
                         $value = $condition === 'like' ? "%{$searchData[$field]}%" : $searchData[$field];
54 54
                     } else {
55
-                        if (! is_null($search)) {
55
+                        if (!is_null($search)) {
56 56
                             $value = $condition === 'like' ? "%{$search}%" : $search;
57 57
                         }
58 58
                     }
59 59
 
60 60
                     if ($isFirstField || $modelForceAndWhere) {
61
-                        if (! is_null($value)) {
61
+                        if (!is_null($value)) {
62 62
                             $query->where($field, $condition, $value);
63 63
                             $isFirstField = false;
64 64
                         }
65 65
                     } else {
66
-                        if (! is_null($value)) {
66
+                        if (!is_null($value)) {
67 67
                             $query->orWhere($field, $condition, $value);
68 68
                         }
69 69
                     }
Please login to merge, or discard this patch.
app/Http/Middleware/OAuthMiddleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     {
44 44
         $route = $this->router->getCurrentRoute();
45 45
 
46
-        if (! $this->auth->check(false)) {
46
+        if (!$this->auth->check(false)) {
47 47
             $this->auth->authenticate($route->getAuthProviders());
48 48
         }
49 49
 
Please login to merge, or discard this patch.
app/Http/api_routes.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3,21 +3,21 @@  discard block
 block discarded – undo
3 3
 /*
4 4
  * 申请 access_token 或者刷新 access_token.
5 5
  */
6
-$router->post('oauth/access_token', function () {
6
+$router->post('oauth/access_token', function() {
7 7
     return Response::json(Authorizer::issueAccessToken());
8 8
 });
9 9
 
10 10
 /*
11 11
  *  此分组下路由 需要通过 login-token 方式认证的 access token
12 12
  */
13
-$router->group(['middleware' => 'oauth2:user'], function ($router) {
13
+$router->group(['middleware' => 'oauth2:user'], function($router) {
14 14
 
15 15
     // 发布内容单独设置频率限制
16 16
     $router->group([
17 17
         'middleware' => 'api.throttle',
18 18
         'limit'      => config('api.rate_limits.publish.limits'),
19 19
         'expires'    => config('api.rate_limits.publish.expires'),
20
-    ], function ($router) {
20
+    ], function($router) {
21 21
         $router->post('topics', 'TopicsController@store');
22 22
         $router->post('replies', 'RepliesController@store');
23 23
     });
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         'middleware' => 'api.throttle',
27 27
         'limit'      => config('api.rate_limits.access.limits'),
28 28
         'expires'    => config('api.rate_limits.access.expires'),
29
-    ], function ($router) {
29
+    ], function($router) {
30 30
         // Users
31 31
         $router->get('me', 'UsersController@me');
32 32
         $router->put('users/{id}', 'UsersController@update');
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     'middleware' => ['oauth2', 'api.throttle'],
58 58
     'limit'      => config('api.rate_limits.access.limits'),
59 59
     'expires'    => config('api.rate_limits.access.expires'),
60
-], function ($router) {
60
+], function($router) {
61 61
     $router->get('topics/{id}', 'TopicsController@show');
62 62
     //Topics
63 63
     $router->get('topics', 'TopicsController@index');
Please login to merge, or discard this patch.
app/Services/PushService/JPush.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      */
39 39
     public function platform($platform)
40 40
     {
41
-        if (! in_array($platform, ['ios', 'android', 'winphone', 'all'])) {
41
+        if (!in_array($platform, ['ios', 'android', 'winphone', 'all'])) {
42 42
             throw new \InvalidArgumentException('Invalid device type: '.$platform);
43 43
         }
44 44
 
Please login to merge, or discard this patch.
app/Listeners/NotificationListener.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,12 +51,12 @@
 block discarded – undo
51 51
      */
52 52
     protected function push($user_ids, $msg, $extras = null)
53 53
     {
54
-        if (! $this->jpush) {
54
+        if (!$this->jpush) {
55 55
             $this->jpush = new Jpush();
56 56
         }
57 57
 
58 58
         $user_ids = (array) $user_ids;
59
-        $user_ids = array_map(function ($user_id) {
59
+        $user_ids = array_map(function($user_id) {
60 60
             return 'userid_'.$user_id;
61 61
         }, $user_ids);
62 62
 
Please login to merge, or discard this patch.