@@ -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 | |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | $tags = preg_split('/ ?, ?/', $tags); |
| 170 | 170 | |
| 171 | 171 | // For every tag, do we need to create it? |
| 172 | - $projectTags = array_map(function ($taggable) use ($project) { |
|
| 172 | + $projectTags = array_map(function($taggable) use ($project) { |
|
| 173 | 173 | return Tag::firstOrCreate(['name' => $taggable])->id; |
| 174 | 174 | }, $tags); |
| 175 | 175 | |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | $tags = preg_split('/ ?, ?/', $tags); |
| 218 | 218 | |
| 219 | 219 | // For every tag, do we need to create it? |
| 220 | - $projectTags = array_map(function ($taggable) use ($project) { |
|
| 220 | + $projectTags = array_map(function($taggable) use ($project) { |
|
| 221 | 221 | return Tag::firstOrCreate(['name' => $taggable])->id; |
| 222 | 222 | }, $tags); |
| 223 | 223 | |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | $tags = preg_split('/ ?, ?/', $tags); |
| 208 | 208 | |
| 209 | 209 | // For every tag, do we need to create it? |
| 210 | - $projectTags = array_map(function ($taggable) use ($project) { |
|
| 210 | + $projectTags = array_map(function($taggable) use ($project) { |
|
| 211 | 211 | return Tag::firstOrCreate(['name' => $taggable])->id; |
| 212 | 212 | }, $tags); |
| 213 | 213 | |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | $tags = preg_split('/ ?, ?/', $tags); |
| 256 | 256 | |
| 257 | 257 | // For every tag, do we need to create it? |
| 258 | - $projectTags = array_map(function ($taggable) use ($project) { |
|
| 258 | + $projectTags = array_map(function($taggable) use ($project) { |
|
| 259 | 259 | return Tag::firstOrCreate(['name' => $taggable])->id; |
| 260 | 260 | }, $tags); |
| 261 | 261 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $allIssues = Issue::where('visible', '>=', $issueVisiblity)->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('scheduled_at', 'desc')->orderBy('created_at', 'desc')->get()->groupBy(function (Issue $issue) use ($dateTimeZone) { |
|
| 64 | + ])->orderBy('scheduled_at', 'desc')->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 | |
@@ -153,7 +153,7 @@ |
||
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | $allRepositories = array_unique($allRepositories, SORT_REGULAR); |
| 156 | - uksort($allRepositories, function ($k1, $k2) { |
|
| 156 | + uksort($allRepositories, function($k1, $k2) { |
|
| 157 | 157 | return strtolower($k2) < strtolower($k1); |
| 158 | 158 | }); |
| 159 | 159 | |
@@ -38,13 +38,13 @@ |
||
| 38 | 38 | $feed->setDateFormat('datetime'); |
| 39 | 39 | |
| 40 | 40 | if ($group->exists) { |
| 41 | - $group->projects->map(function ($project) use ($feed) { |
|
| 42 | - $project->issues()->visible()->orderBy('created_at', 'desc')->get()->map(function ($issue) use ($feed) { |
|
| 41 | + $group->projects->map(function($project) use ($feed) { |
|
| 42 | + $project->issues()->visible()->orderBy('created_at', 'desc')->get()->map(function($issue) use ($feed) { |
|
| 43 | 43 | $this->feedAddItem($feed, $issue); |
| 44 | 44 | }); |
| 45 | 45 | }); |
| 46 | 46 | } else { |
| 47 | - Issue::visible()->orderBy('created_at', 'desc')->get()->map(function ($issue) use ($feed) { |
|
| 47 | + Issue::visible()->orderBy('created_at', 'desc')->get()->map(function($issue) use ($feed) { |
|
| 48 | 48 | $this->feedAddItem($feed, $issue); |
| 49 | 49 | }); |
| 50 | 50 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | 'namespace' => 'Api', |
| 30 | 30 | 'prefix' => 'api/v1', |
| 31 | 31 | 'middleware' => ['accept:application/json', 'timezone', 'auth.api.optional'], |
| 32 | - ], function ($router) { |
|
| 32 | + ], function($router) { |
|
| 33 | 33 | // General |
| 34 | 34 | $router->get('ping', 'GeneralController@ping'); |
| 35 | 35 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | $router->get('issues/{issue}', 'IssueController@getIssue'); |
| 45 | 45 | |
| 46 | 46 | // Authorization Required |
| 47 | - $router->group(['middleware' => 'auth.api'], function ($router) { |
|
| 47 | + $router->group(['middleware' => 'auth.api'], function($router) { |
|
| 48 | 48 | $router->get('subscribers', 'SubscriberController@getSubscribers'); |
| 49 | 49 | |
| 50 | 50 | $router->post('projects', 'ProjectController@postProjects'); |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | 'middleware' => 'app.hasSetting', |
| 31 | 31 | 'prefix' => 'auth', |
| 32 | 32 | 'setting' => 'app_name', |
| 33 | - ], function ($router) { |
|
| 33 | + ], function($router) { |
|
| 34 | 34 | $router->get('login', [ |
| 35 | 35 | 'middleware' => 'guest', |
| 36 | 36 | 'as' => 'login', |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | 'prefix' => 'dashboard', |
| 31 | 31 | 'namespace' => 'Dashboard', |
| 32 | 32 | 'as' => 'dashboard.', |
| 33 | - ], function ($router) { |
|
| 33 | + ], function($router) { |
|
| 34 | 34 | // Dashboard |
| 35 | 35 | $router->get('/', [ |
| 36 | 36 | 'as' => 'index', |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $router->group([ |
| 42 | 42 | 'as' => 'projects.', |
| 43 | 43 | 'prefix' => 'projects', |
| 44 | - ], function ($router) { |
|
| 44 | + ], function($router) { |
|
| 45 | 45 | $router->get('/', [ |
| 46 | 46 | 'as' => 'index', |
| 47 | 47 | 'uses' => 'ProjectController@showProjects', |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $router->group([ |
| 68 | 68 | 'as' => 'teams.', |
| 69 | 69 | 'prefix' => 'teams', |
| 70 | - ], function ($router) { |
|
| 70 | + ], function($router) { |
|
| 71 | 71 | $router->get('/', [ |
| 72 | 72 | 'as' => 'index', |
| 73 | 73 | 'uses' => 'TeamController@showProjectTeams', |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | $router->group([ |
| 91 | 91 | 'as' => 'activities.', |
| 92 | 92 | 'prefix' => 'activities', |
| 93 | - ], function ($router) { |
|
| 93 | + ], function($router) { |
|
| 94 | 94 | $router->get('/', [ |
| 95 | 95 | 'as' => 'index', |
| 96 | 96 | 'uses' => 'ActivityController@showActivities', |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $router->group([ |
| 102 | 102 | 'as' => 'milestones.', |
| 103 | 103 | 'prefix' => 'milestones', |
| 104 | - ], function ($router) { |
|
| 104 | + ], function($router) { |
|
| 105 | 105 | $router->get('/', [ |
| 106 | 106 | 'as' => 'index', |
| 107 | 107 | 'uses' => 'MilestoneController@showMilestones', |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | $router->group([ |
| 113 | 113 | 'as' => 'merge_requests.', |
| 114 | 114 | 'prefix' => 'merge_requests', |
| 115 | - ], function ($router) { |
|
| 115 | + ], function($router) { |
|
| 116 | 116 | $router->get('/', [ |
| 117 | 117 | 'as' => 'index', |
| 118 | 118 | 'uses' => 'MergeRequestController@showMergeRequests', |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $router->group([ |
| 124 | 124 | 'as' => 'snippets.', |
| 125 | 125 | 'prefix' => 'snippets', |
| 126 | - ], function ($router) { |
|
| 126 | + ], function($router) { |
|
| 127 | 127 | $router->get('/', [ |
| 128 | 128 | 'as' => 'index', |
| 129 | 129 | 'uses' => 'SnippetController@showSnippets', |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | $router->group([ |
| 135 | 135 | 'as' => 'issues.', |
| 136 | 136 | 'prefix' => 'issues', |
| 137 | - ], function ($router) { |
|
| 137 | + ], function($router) { |
|
| 138 | 138 | $router->get('/', [ |
| 139 | 139 | 'as' => 'index', |
| 140 | 140 | 'uses' => 'IssueController@showIssues', |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | $router->group([ |
| 160 | 160 | 'as' => 'subscribers.', |
| 161 | 161 | 'prefix' => 'subscribers', |
| 162 | - ], function ($router) { |
|
| 162 | + ], function($router) { |
|
| 163 | 163 | $router->get('/', [ |
| 164 | 164 | 'as' => 'index', |
| 165 | 165 | 'uses' => 'SubscriberController@showSubscribers', |
@@ -176,13 +176,13 @@ discard block |
||
| 176 | 176 | $router->group([ |
| 177 | 177 | 'as' => 'group.', |
| 178 | 178 | 'prefix' => 'group', |
| 179 | - ], function ($router) { |
|
| 179 | + ], function($router) { |
|
| 180 | 180 | $router->get('/', [ |
| 181 | 181 | 'as' => 'index', |
| 182 | 182 | 'uses' => 'GroupController@showGroupView', |
| 183 | 183 | ]); |
| 184 | 184 | |
| 185 | - $router->group(['middleware' => 'admin'], function ($router) { |
|
| 185 | + $router->group(['middleware' => 'admin'], function($router) { |
|
| 186 | 186 | $router->get('add', [ |
| 187 | 187 | 'as' => 'add', |
| 188 | 188 | 'uses' => 'GroupController@showAddGroupMemberView', |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | $router->group([ |
| 204 | 204 | 'as' => 'settings.', |
| 205 | 205 | 'prefix' => 'settings', |
| 206 | - ], function ($router) { |
|
| 206 | + ], function($router) { |
|
| 207 | 207 | $router->get('general', [ |
| 208 | 208 | 'as' => 'general', |
| 209 | 209 | 'uses' => 'SettingsController@showGeneralView', |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | }); |
| 229 | 229 | |
| 230 | 230 | // User Settings |
| 231 | - $router->group(['prefix' => 'user'], function ($router) { |
|
| 231 | + $router->group(['prefix' => 'user'], function($router) { |
|
| 232 | 232 | $router->get('/', [ |
| 233 | 233 | 'as' => 'user', |
| 234 | 234 | 'uses' => 'UserController@showUser', |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | * Internal API. |
| 242 | 242 | * This should only be used for making requests within the dashboard. |
| 243 | 243 | */ |
| 244 | - $router->group(['prefix' => 'api'], function ($router) { |
|
| 244 | + $router->group(['prefix' => 'api'], function($router) { |
|
| 245 | 245 | $router->post('projects/teams/order', 'ApiController@postUpdateProjectTeamOrder'); |
| 246 | 246 | $router->post('projects/order', 'ApiController@postUpdateProjectOrder'); |
| 247 | 247 | $router->post('projects/{project}', 'ApiController@postUpdateProject'); |