Completed
Pull Request — master (#106)
by Phecho
05:57
created
app/Http/Routes/DefaultRoutes.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
             'middleware' => ['app.hasSetting', 'auth'],
31 31
             'setting'    => 'app_name',
32 32
             'as'         => 'dashboard.'
33
-        ], function ($router) {
33
+        ], function($router) {
34 34
             $router->get('/', [
35 35
                 'as'   => 'index',
36 36
                 'uses' => 'DashboardController@indexAction',
37 37
             ]);
38 38
         });
39 39
         //Install Area
40
-        $router->group(['middleware' => ['app.isInstalled', 'localize']], function ($router) {
40
+        $router->group(['middleware' => ['app.isInstalled', 'localize']], function($router) {
41 41
             $router->controller('install', 'InstallController');
42 42
         });
43 43
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
             'middleware' => ['app.hasSetting', 'guest'],
47 47
             'setting'    => 'app_name',
48 48
             'as'         => 'signup.',
49
-        ], function ($router) {
49
+        ], function($router) {
50 50
             $router->get('signup', [
51 51
                 'as'         => 'signup',
52 52
                 'uses'       => 'SignupController@getSignup',
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
             'setting'    => 'app_name',
71 71
             'prefix'     => 'explore',
72 72
             'as'         => 'explore.',
73
-        ], function ($router) {
73
+        ], function($router) {
74 74
             $router->get('/', [
75 75
                 'as'   => 'index',
76 76
                 'uses' => 'ExploreController@indexAction',
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $router->group([
91 91
             'middleware' => 'app.hasSetting',
92 92
             'setting'    => 'app_name',
93
-        ], function ($router) {
93
+        ], function($router) {
94 94
             $router->get('/atom/{namespace?}', [
95 95
                 'as'   => 'feed.atom',
96 96
                 'uses' => 'FeedController@atomAction',
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             'middleware' => ['app.hasSetting'],
107 107
             'setting'    => 'app_name',
108 108
             'as'         => 'profile.',
109
-        ], function ($router) {
109
+        ], function($router) {
110 110
             $router->get('profile', [
111 111
                 'as'   => 'index',
112 112
                 'uses' => 'ProfilesController@indexAction',
Please login to merge, or discard this patch.
app/Http/Controllers/Projects/CommentsController.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -13,12 +13,10 @@
 block discarded – undo
13 13
 
14 14
 use Gitamin\Commands\Comment\AddCommentCommand;
15 15
 use Gitamin\Http\Controllers\Controller;
16
-use Gitamin\Models\Comment;
17 16
 use Gitamin\Models\Project;
18 17
 use GrahamCampbell\Binput\Facades\Binput;
19 18
 use Illuminate\Support\Facades\Auth;
20 19
 use Illuminate\Support\Facades\Redirect;
21
-use Illuminate\Support\Facades\View;
22 20
 
23 21
 class CommentsController extends Controller
24 22
 {
Please login to merge, or discard this patch.
app/Http/Routes/AdminRoutes.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
             'prefix'     => 'admin',
32 32
             'namespace'  => 'Admin',
33 33
             'as'         => 'admin.',
34
-        ], function ($router) {
34
+        ], function($router) {
35 35
             $router->get('/', [
36 36
                 'as'   => 'index',
37 37
                 'uses' => 'DashboardController@indexAction',
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
             $router->group([
42 42
                 'as'     => 'settings.',
43 43
                 'prefix' => 'settings',
44
-            ], function ($router) {
44
+            ], function($router) {
45 45
                 $router->get('general', [
46 46
                     'as'   => 'general',
47 47
                     'uses' => 'SettingsController@showGeneralView',
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
                 'uses' => 'DashboardController@indexAction',
38 38
             ]);
39 39
 
40
-             // Settings
40
+                // Settings
41 41
             $router->group([
42 42
                 'as'     => 'settings.',
43 43
                 'prefix' => 'settings',
Please login to merge, or discard this patch.
app/Config/Repository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,12 +50,12 @@
 block discarded – undo
50 50
     public function get($name, $default = null)
51 51
     {
52 52
         // if we've not loaded the settings, load them now
53
-        if (! $this->settings) {
53
+        if (!$this->settings) {
54 54
             $this->settings = $this->model->all()->lists('value', 'name');
55 55
         }
56 56
 
57 57
         // if the setting exists and is not blank, return it
58
-        if (! empty($this->settings[$name])) {
58
+        if (!empty($this->settings[$name])) {
59 59
             return $this->settings[$name];
60 60
         }
61 61
 
Please login to merge, or discard this patch.
app/Console/Commands/DemoSeederCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
      */
50 50
     public function fire()
51 51
     {
52
-        if (! $this->confirmToProceed()) {
52
+        if (!$this->confirmToProceed()) {
53 53
             return;
54 54
         }
55 55
 
Please login to merge, or discard this patch.
app/Exceptions/Displayers/RedirectDisplayer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
     {
74 74
         $redirect = $transformed instanceof HttpExceptionInterface && $transformed->getStatusCode() === 401;
75 75
 
76
-        return $redirect && ! $this->request->is('api*');
76
+        return $redirect && !$this->request->is('api*');
77 77
     }
78 78
 
79 79
     /**
Please login to merge, or discard this patch.
app/Exceptions/Filters/ApiFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
     {
48 48
         if ($this->request->is('api*')) {
49 49
             foreach ($displayers as $index => $displayer) {
50
-                if (! str_contains($displayer->contentType(), 'application/')) {
50
+                if (!str_contains($displayer->contentType(), 'application/')) {
51 51
                     unset($displayers[$index]);
52 52
                 }
53 53
             }
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/SettingsController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -178,11 +178,11 @@
 block discarded – undo
178 178
                 return Redirect::to($redirectUrl)->withErrors(trans('admin.settings.general.too-big', ['size' => $maxSize]));
179 179
             }
180 180
 
181
-            if (! $file->isValid() || $file->getError()) {
181
+            if (!$file->isValid() || $file->getError()) {
182 182
                 return Redirect::to($redirectUrl)->withErrors($file->getErrorMessage());
183 183
             }
184 184
 
185
-            if (! starts_with($file->getMimeType(), 'image/')) {
185
+            if (!starts_with($file->getMimeType(), 'image/')) {
186 186
                 return Redirect::to($redirectUrl)->withErrors(trans('admin.settings.general.images-only'));
187 187
             }
188 188
 
Please login to merge, or discard this patch.
app/Http/Controllers/DashboardController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $allIssues = Issue::whereBetween('created_at', [
83 83
             $this->startDate->copy()->subDays(30)->format('Y-m-d').' 00:00:00',
84 84
             $this->startDate->format('Y-m-d').' 23:59:59',
85
-        ])->orderBy('created_at', 'desc')->get()->groupBy(function (Issue $issue) {
85
+        ])->orderBy('created_at', 'desc')->get()->groupBy(function(Issue $issue) {
86 86
             return (new Date($issue->created_at))
87 87
                 ->setTimezone($this->dateTimeZone)->toDateString();
88 88
         });
@@ -91,13 +91,13 @@  discard block
 block discarded – undo
91 91
         foreach (range(0, 30) as $i) {
92 92
             $date = (new Date($this->startDate))->setTimezone($this->dateTimeZone)->subDays($i);
93 93
 
94
-            if (! isset($allIssues[$date->toDateString()])) {
94
+            if (!isset($allIssues[$date->toDateString()])) {
95 95
                 $allIssues[$date->toDateString()] = [];
96 96
             }
97 97
         }
98 98
 
99 99
         // Sort the array so it takes into account the added days
100
-        $allIssues = $allIssues->sortBy(function ($value, $key) {
100
+        $allIssues = $allIssues->sortBy(function($value, $key) {
101 101
             return strtotime($key);
102 102
         }, SORT_REGULAR, false);
103 103
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         $allSubscribers = Subscriber::whereBetween('created_at', [
115 115
             $this->startDate->copy()->subDays(30)->format('Y-m-d').' 00:00:00',
116 116
             $this->startDate->format('Y-m-d').' 23:59:59',
117
-        ])->orderBy('created_at', 'desc')->get()->groupBy(function (Subscriber $issue) {
117
+        ])->orderBy('created_at', 'desc')->get()->groupBy(function(Subscriber $issue) {
118 118
             return (new Date($issue->created_at))
119 119
                 ->setTimezone($this->dateTimeZone)->toDateString();
120 120
         });
@@ -123,13 +123,13 @@  discard block
 block discarded – undo
123 123
         foreach (range(0, 30) as $i) {
124 124
             $date = (new Date($this->startDate))->setTimezone($this->dateTimeZone)->subDays($i);
125 125
 
126
-            if (! isset($allSubscribers[$date->toDateString()])) {
126
+            if (!isset($allSubscribers[$date->toDateString()])) {
127 127
                 $allSubscribers[$date->toDateString()] = [];
128 128
             }
129 129
         }
130 130
 
131 131
         // Sort the array so it takes into account the added days
132
-        $allSubscribers = $allSubscribers->sortBy(function ($value, $key) {
132
+        $allSubscribers = $allSubscribers->sortBy(function($value, $key) {
133 133
             return strtotime($key);
134 134
         }, SORT_REGULAR, false);
135 135
 
Please login to merge, or discard this patch.