@@ -72,7 +72,7 @@ |
||
72 | 72 | { |
73 | 73 | parent::boot(); |
74 | 74 | |
75 | - self::creating(function ($user) { |
|
75 | + self::creating(function($user) { |
|
76 | 76 | if (!$user->api_key) { |
77 | 77 | $user->api_key = self::generateApiKey(); |
78 | 78 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $allIssues = Issue::whereBetween('created_at', [ |
88 | 88 | $this->startDate->copy()->subDays(30)->format('Y-m-d').' 00:00:00', |
89 | 89 | $this->startDate->format('Y-m-d').' 23:59:59', |
90 | - ])->orderBy('created_at', 'desc')->get()->groupBy(function (Issue $issue) { |
|
90 | + ])->orderBy('created_at', 'desc')->get()->groupBy(function(Issue $issue) { |
|
91 | 91 | return (new Date($issue->created_at)) |
92 | 92 | ->setTimezone($this->dateTimeZone)->toDateString(); |
93 | 93 | }); |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | } |
103 | 103 | |
104 | 104 | // Sort the array so it takes into account the added days |
105 | - $allIssues = $allIssues->sortBy(function ($value, $key) { |
|
105 | + $allIssues = $allIssues->sortBy(function($value, $key) { |
|
106 | 106 | return strtotime($key); |
107 | 107 | }, SORT_REGULAR, false); |
108 | 108 | |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $allSubscribers = Subscriber::whereBetween('created_at', [ |
120 | 120 | $this->startDate->copy()->subDays(30)->format('Y-m-d').' 00:00:00', |
121 | 121 | $this->startDate->format('Y-m-d').' 23:59:59', |
122 | - ])->orderBy('created_at', 'desc')->get()->groupBy(function (Subscriber $issue) { |
|
122 | + ])->orderBy('created_at', 'desc')->get()->groupBy(function(Subscriber $issue) { |
|
123 | 123 | return (new Date($issue->created_at)) |
124 | 124 | ->setTimezone($this->dateTimeZone)->toDateString(); |
125 | 125 | }); |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | } |
135 | 135 | |
136 | 136 | // Sort the array so it takes into account the added days |
137 | - $allSubscribers = $allSubscribers->sortBy(function ($value, $key) { |
|
137 | + $allSubscribers = $allSubscribers->sortBy(function($value, $key) { |
|
138 | 138 | return strtotime($key); |
139 | 139 | }, SORT_REGULAR, false); |
140 | 140 |
@@ -69,7 +69,7 @@ |
||
69 | 69 | $tags = preg_split('/ ?, ?/', $tags); |
70 | 70 | |
71 | 71 | // For every tag, do we need to create it? |
72 | - $projectTags = array_map(function ($taggable) use ($project) { |
|
72 | + $projectTags = array_map(function($taggable) use ($project) { |
|
73 | 73 | return Tag::firstOrCreate(['name' => $taggable])->id; |
74 | 74 | }, $tags); |
75 | 75 |
@@ -29,7 +29,7 @@ |
||
29 | 29 | 'middleware' => ['app.hasSetting', 'guest'], |
30 | 30 | 'setting' => 'app_name', |
31 | 31 | 'as' => 'signup.', |
32 | - ], function ($router) { |
|
32 | + ], function($router) { |
|
33 | 33 | $router->get('signup/invite/{code}', [ |
34 | 34 | 'as' => 'invite', |
35 | 35 | 'uses' => 'SignupController@getSignup', |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | 'middleware' => ['app.hasSetting'], |
31 | 31 | 'setting' => 'app_name', |
32 | 32 | 'as' => 'dashboard.', |
33 | - ], function ($router) { |
|
33 | + ], function($router) { |
|
34 | 34 | $router->get('dashboard', [ |
35 | 35 | 'as' => 'index', |
36 | 36 | 'uses' => 'DashboardController@showDashboard', |
@@ -44,13 +44,13 @@ discard block |
||
44 | 44 | 'prefix' => 'dashboard', |
45 | 45 | 'namespace' => 'Dashboard', |
46 | 46 | 'as' => 'dashboard.', |
47 | - ], function ($router) { |
|
47 | + ], function($router) { |
|
48 | 48 | |
49 | 49 | // Projects |
50 | 50 | $router->group([ |
51 | 51 | 'as' => 'projects.', |
52 | 52 | 'prefix' => 'projects', |
53 | - ], function ($router) { |
|
53 | + ], function($router) { |
|
54 | 54 | $router->get('/', [ |
55 | 55 | 'as' => 'index', |
56 | 56 | 'uses' => 'ProjectController@index', |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $router->group([ |
81 | 81 | 'as' => 'teams.', |
82 | 82 | 'prefix' => 'teams', |
83 | - ], function ($router) { |
|
83 | + ], function($router) { |
|
84 | 84 | $router->get('/', [ |
85 | 85 | 'as' => 'index', |
86 | 86 | 'uses' => 'TeamController@showProjectTeams', |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $router->group([ |
104 | 104 | 'as' => 'activities.', |
105 | 105 | 'prefix' => 'activities', |
106 | - ], function ($router) { |
|
106 | + ], function($router) { |
|
107 | 107 | $router->get('/', [ |
108 | 108 | 'as' => 'index', |
109 | 109 | 'uses' => 'ActivityController@showActivities', |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $router->group([ |
115 | 115 | 'as' => 'milestones.', |
116 | 116 | 'prefix' => 'milestones', |
117 | - ], function ($router) { |
|
117 | + ], function($router) { |
|
118 | 118 | $router->get('/', [ |
119 | 119 | 'as' => 'index', |
120 | 120 | 'uses' => 'MilestoneController@showMilestones', |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $router->group([ |
126 | 126 | 'as' => 'merge_requests.', |
127 | 127 | 'prefix' => 'merge_requests', |
128 | - ], function ($router) { |
|
128 | + ], function($router) { |
|
129 | 129 | $router->get('/', [ |
130 | 130 | 'as' => 'index', |
131 | 131 | 'uses' => 'MergeRequestController@showMergeRequests', |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $router->group([ |
137 | 137 | 'as' => 'snippets.', |
138 | 138 | 'prefix' => 'snippets', |
139 | - ], function ($router) { |
|
139 | + ], function($router) { |
|
140 | 140 | $router->get('/', [ |
141 | 141 | 'as' => 'index', |
142 | 142 | 'uses' => 'SnippetController@showSnippets', |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | $router->group([ |
148 | 148 | 'as' => 'issues.', |
149 | 149 | 'prefix' => 'issues', |
150 | - ], function ($router) { |
|
150 | + ], function($router) { |
|
151 | 151 | $router->get('/', [ |
152 | 152 | 'as' => 'index', |
153 | 153 | 'uses' => 'IssueController@showIssues', |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | $router->group([ |
173 | 173 | 'as' => 'subscribers.', |
174 | 174 | 'prefix' => 'subscribers', |
175 | - ], function ($router) { |
|
175 | + ], function($router) { |
|
176 | 176 | $router->get('/', [ |
177 | 177 | 'as' => 'index', |
178 | 178 | 'uses' => 'SubscriberController@showSubscribers', |
@@ -189,13 +189,13 @@ discard block |
||
189 | 189 | $router->group([ |
190 | 190 | 'as' => 'group.', |
191 | 191 | 'prefix' => 'group', |
192 | - ], function ($router) { |
|
192 | + ], function($router) { |
|
193 | 193 | $router->get('/', [ |
194 | 194 | 'as' => 'index', |
195 | 195 | 'uses' => 'GroupController@showGroupView', |
196 | 196 | ]); |
197 | 197 | |
198 | - $router->group(['middleware' => 'admin'], function ($router) { |
|
198 | + $router->group(['middleware' => 'admin'], function($router) { |
|
199 | 199 | $router->get('add', [ |
200 | 200 | 'as' => 'add', |
201 | 201 | 'uses' => 'GroupController@showAddGroupMemberView', |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | $router->group([ |
217 | 217 | 'as' => 'settings.', |
218 | 218 | 'prefix' => 'settings', |
219 | - ], function ($router) { |
|
219 | + ], function($router) { |
|
220 | 220 | $router->get('general', [ |
221 | 221 | 'as' => 'general', |
222 | 222 | 'uses' => 'SettingsController@showGeneralView', |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | }); |
242 | 242 | |
243 | 243 | // User Settings |
244 | - $router->group(['prefix' => 'user'], function ($router) { |
|
244 | + $router->group(['prefix' => 'user'], function($router) { |
|
245 | 245 | $router->get('/', [ |
246 | 246 | 'as' => 'user', |
247 | 247 | 'uses' => 'UserController@showUser', |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | * Internal API. |
255 | 255 | * This should only be used for making requests within the dashboard. |
256 | 256 | */ |
257 | - $router->group(['prefix' => 'api'], function ($router) { |
|
257 | + $router->group(['prefix' => 'api'], function($router) { |
|
258 | 258 | $router->post('projects/teams/order', 'ApiController@postUpdateProjectTeamOrder'); |
259 | 259 | $router->post('projects/order', 'ApiController@postUpdateProjectOrder'); |
260 | 260 | $router->post('projects/{project}', 'ApiController@postUpdateProject'); |
@@ -29,7 +29,7 @@ |
||
29 | 29 | 'middleware' => ['app.hasSetting', 'guest'], |
30 | 30 | 'setting' => 'app_name', |
31 | 31 | 'as' => 'signup.', |
32 | - ], function ($router) { |
|
32 | + ], function($router) { |
|
33 | 33 | $router->get('signup/invite/{code}', [ |
34 | 34 | 'as' => 'invite', |
35 | 35 | 'uses' => 'SignupController@getSignup', |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | 'setting' => 'app_name', |
33 | 33 | 'prefix' => 'projects', |
34 | 34 | 'as' => 'projects.', |
35 | - ], function ($router) { |
|
35 | + ], function($router) { |
|
36 | 36 | $router->get('/', [ |
37 | 37 | 'as' => 'index', |
38 | 38 | 'uses' => 'ProjectsController@index', |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | 'middleware' => ['app.hasSetting'], |
55 | 55 | 'setting' => 'app_name', |
56 | 56 | 'as' => 'projects.', |
57 | - ], function ($router) { |
|
57 | + ], function($router) { |
|
58 | 58 | $router->get('{namespace}/{project}', [ |
59 | 59 | 'as' => 'project_show', |
60 | 60 | 'uses' => 'ProjectsController@show', |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | 'setting' => 'app_name', |
33 | 33 | 'prefix' => 'projects', |
34 | 34 | 'as' => 'projects.', |
35 | - ], function ($router) { |
|
35 | + ], function($router) { |
|
36 | 36 | $router->get('/', [ |
37 | 37 | 'as' => 'index', |
38 | 38 | 'uses' => 'ProjectsController@index', |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | 'middleware' => ['app.hasSetting'], |
55 | 55 | 'setting' => 'app_name', |
56 | 56 | 'as' => 'projects.', |
57 | - ], function ($router) { |
|
57 | + ], function($router) { |
|
58 | 58 | $router->get('{namespace}/{project}', [ |
59 | 59 | 'as' => 'project_show', |
60 | 60 | 'uses' => 'ProjectsController@show', |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $allIssues = Issue::whereBetween('created_at', [ |
62 | 62 | $startDate->copy()->subDays($daysToShow)->format('Y-m-d').' 00:00:00', |
63 | 63 | $startDate->format('Y-m-d').' 23:59:59', |
64 | - ])->orderBy('created_at', 'desc')->get()->groupBy(function (Issue $issue) use ($dateTimeZone) { |
|
64 | + ])->orderBy('created_at', 'desc')->get()->groupBy(function(Issue $issue) use ($dateTimeZone) { |
|
65 | 65 | // If it's scheduled, get the scheduled at date. |
66 | 66 | if ($issue->is_scheduled) { |
67 | 67 | return (new Date($issue->scheduled_at)) |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | } |
83 | 83 | |
84 | 84 | // Sort the array so it takes into account the added days |
85 | - $allIssues = $allIssues->sortBy(function ($value, $key) { |
|
85 | + $allIssues = $allIssues->sortBy(function($value, $key) { |
|
86 | 86 | return strtotime($key); |
87 | 87 | }, SORT_REGULAR, true)->all(); |
88 | 88 |