@@ -68,9 +68,9 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | public function issuesHasUsers() |
| 70 | 70 | { |
| 71 | - $users = $this->issues->map(function ($issue) { |
|
| 71 | + $users = $this->issues->map(function($issue) { |
|
| 72 | 72 | return $issue->users; |
| 73 | - })->reject(function ($value) { |
|
| 73 | + })->reject(function($value) { |
|
| 74 | 74 | return $value == null; |
| 75 | 75 | })->flatten(1)->unique('id')->splice(0, 3); |
| 76 | 76 | |
@@ -106,11 +106,11 @@ discard block |
||
| 106 | 106 | |
| 107 | 107 | public function pullrequests() |
| 108 | 108 | { |
| 109 | - $prs = $this->branches->map(function ($branch) { |
|
| 109 | + $prs = $this->branches->map(function($branch) { |
|
| 110 | 110 | if ($branch->pullrequests->count()) { |
| 111 | 111 | return $branch->pullrequests; |
| 112 | 112 | } |
| 113 | - })->reject(function ($value) { |
|
| 113 | + })->reject(function($value) { |
|
| 114 | 114 | return $value == null; |
| 115 | 115 | }); |
| 116 | 116 | |
@@ -135,9 +135,9 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | public function totalAdditions() |
| 137 | 137 | { |
| 138 | - $additions = $this->branches->map(function ($branch) { |
|
| 138 | + $additions = $this->branches->map(function($branch) { |
|
| 139 | 139 | return $branch->commits; |
| 140 | - })->flatten(1)->map(function ($commit) { |
|
| 140 | + })->flatten(1)->map(function($commit) { |
|
| 141 | 141 | return $commit->files; |
| 142 | 142 | })->flatten(1)->sum('additions'); |
| 143 | 143 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | public function totalPullRequests() |
| 148 | 148 | { |
| 149 | - $prs = $this->branches->map(function ($branch) { |
|
| 149 | + $prs = $this->branches->map(function($branch) { |
|
| 150 | 150 | return $branch->pullrequests()->count(); |
| 151 | 151 | }); |
| 152 | 152 | |
@@ -239,9 +239,9 @@ discard block |
||
| 239 | 239 | public function activities() |
| 240 | 240 | { |
| 241 | 241 | $activities = $this->issues() |
| 242 | - ->with('statuses')->get()->map(function ($issue) { |
|
| 242 | + ->with('statuses')->get()->map(function($issue) { |
|
| 243 | 243 | return $issue->statuses; |
| 244 | - })->flatten(1)->map(function ($statuses) { |
|
| 244 | + })->flatten(1)->map(function($statuses) { |
|
| 245 | 245 | return $statuses; |
| 246 | 246 | })->sortByDesc('created_at'); |
| 247 | 247 | |
@@ -252,9 +252,9 @@ discard block |
||
| 252 | 252 | |
| 253 | 253 | public function issueTypes() |
| 254 | 254 | { |
| 255 | - $types = $this->issues->map(function ($issue) { |
|
| 255 | + $types = $this->issues->map(function($issue) { |
|
| 256 | 256 | return $issue->type; |
| 257 | - })->groupBy('slug')->map(function ($type) { |
|
| 257 | + })->groupBy('slug')->map(function($type) { |
|
| 258 | 258 | return [ |
| 259 | 259 | 'sprint' => $this->slug, |
| 260 | 260 | 'slug' => $type->first()->slug, |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | |
| 269 | 269 | public function issueStatus() |
| 270 | 270 | { |
| 271 | - $status = $this->issues->map(function ($issue) { |
|
| 271 | + $status = $this->issues->map(function($issue) { |
|
| 272 | 272 | return $issue->status; |
| 273 | 273 | })->groupBy('slug')->all(); |
| 274 | 274 | |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | public function totalLines() |
| 76 | 76 | { |
| 77 | - $lines = $this->files->map(function ($file) { |
|
| 77 | + $lines = $this->files->map(function($file) { |
|
| 78 | 78 | return count(preg_split('/\R/', $file->raw)); |
| 79 | 79 | }); |
| 80 | 80 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | public function totalAdditions() |
| 85 | 85 | { |
| 86 | - $additions = $this->files->map(function ($file) { |
|
| 86 | + $additions = $this->files->map(function($file) { |
|
| 87 | 87 | return $file->additions; |
| 88 | 88 | }); |
| 89 | 89 | |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | public function totalChanges() |
| 94 | 94 | { |
| 95 | - $changes = $this->files->map(function ($file) { |
|
| 95 | + $changes = $this->files->map(function($file) { |
|
| 96 | 96 | return $file->changes; |
| 97 | 97 | }); |
| 98 | 98 | |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | public function totalDeletions() |
| 103 | 103 | { |
| 104 | - $deletions = $this->files->map(function ($file) { |
|
| 104 | + $deletions = $this->files->map(function($file) { |
|
| 105 | 105 | return $file->deletions; |
| 106 | 106 | }); |
| 107 | 107 | |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | public function totalPHPCS($type = 'ERROR') |
| 112 | 112 | { |
| 113 | - $errors = $this->files->map(function ($file) use ($type) { |
|
| 113 | + $errors = $this->files->map(function($file) use ($type) { |
|
| 114 | 114 | return $file->filePhpcs()->where('type', '=', $type)->groupBy('type')->count(); |
| 115 | 115 | }); |
| 116 | 116 | |
@@ -93,9 +93,9 @@ discard block |
||
| 93 | 93 | public function activities() |
| 94 | 94 | { |
| 95 | 95 | $activities = $this->issues() |
| 96 | - ->with('statuses')->get()->map(function ($issue) { |
|
| 96 | + ->with('statuses')->get()->map(function($issue) { |
|
| 97 | 97 | return $issue->statuses; |
| 98 | - })->flatten(1)->map(function ($statuses) { |
|
| 98 | + })->flatten(1)->map(function($statuses) { |
|
| 99 | 99 | return $statuses; |
| 100 | 100 | })->sortByDesc('created_at'); |
| 101 | 101 | |
@@ -106,9 +106,9 @@ discard block |
||
| 106 | 106 | |
| 107 | 107 | public function issuesHasUsers($total = 3) |
| 108 | 108 | { |
| 109 | - $users = $this->issues->map(function ($issue) { |
|
| 109 | + $users = $this->issues->map(function($issue) { |
|
| 110 | 110 | return $issue->users; |
| 111 | - })->reject(function ($value) { |
|
| 111 | + })->reject(function($value) { |
|
| 112 | 112 | return $value == null; |
| 113 | 113 | })->flatten(1)->unique('id')->splice(0, $total); |
| 114 | 114 | |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | |
| 118 | 118 | public function issueStatus() |
| 119 | 119 | { |
| 120 | - $status = $this->issues->map(function ($issue) { |
|
| 120 | + $status = $this->issues->map(function($issue) { |
|
| 121 | 121 | return $issue->status; |
| 122 | 122 | })->groupBy('slug')->all(); |
| 123 | 123 | |
@@ -102,14 +102,14 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | public function labels($feature) |
| 104 | 104 | { |
| 105 | - return $this->{$feature}->map(function ($obj) { |
|
| 105 | + return $this->{$feature}->map(function($obj) { |
|
| 106 | 106 | return $obj->labels; |
| 107 | 107 | })->flatten(1)->unique('id'); |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | public function productBacklogs($product_backlog_id = null) |
| 111 | 111 | { |
| 112 | - return $this->organizations->map(function ($organization) use ($product_backlog_id) { |
|
| 112 | + return $this->organizations->map(function($organization) use ($product_backlog_id) { |
|
| 113 | 113 | $obj = $organization->productBacklog() |
| 114 | 114 | ->with('sprints') |
| 115 | 115 | ->with('favorite') |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | |
| 155 | 155 | public function team() |
| 156 | 156 | { |
| 157 | - return $this->organizations->map(function ($obj) { |
|
| 157 | + return $this->organizations->map(function($obj) { |
|
| 158 | 158 | return $obj->users; |
| 159 | 159 | })->flatten(1)->unique('id'); |
| 160 | 160 | //->where('id', '!=', Auth::user()->id); |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | |
| 163 | 163 | public function activities() |
| 164 | 164 | { |
| 165 | - return $this->team()->map(function ($obj) { |
|
| 165 | + return $this->team()->map(function($obj) { |
|
| 166 | 166 | return $obj->statuses; |
| 167 | 167 | })->flatten(1)->sortByDesc('id')->take(6); |
| 168 | 168 | } |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | /* |
| 23 | 23 | * Authenticate the user's personal channel... |
| 24 | 24 | */ |
| 25 | - Broadcast::channel('App.User.*', function ($user, $userId) { |
|
| 25 | + Broadcast::channel('App.User.*', function($user, $userId) { |
|
| 26 | 26 | return (int) $user->id === (int) $userId; |
| 27 | 27 | }); |
| 28 | 28 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | Route::group([ |
| 50 | 50 | 'middleware' => 'web', |
| 51 | 51 | 'namespace' => $this->namespace, |
| 52 | - ], function ($router) { |
|
| 52 | + ], function($router) { |
|
| 53 | 53 | require base_path('routes/web.php'); |
| 54 | 54 | }); |
| 55 | 55 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | 'middleware' => 'api', |
| 66 | 66 | 'namespace' => $this->namespace, |
| 67 | 67 | 'prefix' => 'api', |
| 68 | - ], function ($router) { |
|
| 68 | + ], function($router) { |
|
| 69 | 69 | require base_path('routes/api.php'); |
| 70 | 70 | }); |
| 71 | 71 | } |
@@ -13,6 +13,6 @@ |
||
| 13 | 13 | | |
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | -Route::get('/user', function (Request $request) { |
|
| 16 | +Route::get('/user', function(Request $request) { |
|
| 17 | 17 | return $request->user(); |
| 18 | 18 | })->middleware('auth:api'); |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | | to using a Closure or controller method. Build something great! |
| 11 | 11 | | |
| 12 | 12 | */ |
| 13 | -Route::get('/', function () { |
|
| 13 | +Route::get('/', function() { |
|
| 14 | 14 | return redirect()->route('auth.login'); |
| 15 | 15 | })->name('home'); |
| 16 | 16 | |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | Route::get('/profile/{username}', 'UserController@show')->name('user.profile'); |
| 19 | 19 | |
| 20 | 20 | Route::get('/logout', 'Auth\AuthController@logout')->name('auth.logout'); |
| 21 | -Route::group(['prefix' => 'auth', 'middleware' => ['guest']], function () { |
|
| 21 | +Route::group(['prefix' => 'auth', 'middleware' => ['guest']], function() { |
|
| 22 | 22 | Route::get('/register', 'Auth\AuthController@register')->name('auth.register'); |
| 23 | 23 | Route::get('/login', 'Auth\AuthController@login')->name('auth.login'); |
| 24 | 24 | Route::get('/dologin', 'Auth\AuthController@dologin')->name('auth.dologin'); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | Route::get('/github/callback', 'Auth\AuthController@handleProviderCallback'); |
| 27 | 27 | }); |
| 28 | 28 | |
| 29 | -Route::group(['prefix' => 'product-backlogs'], function () { |
|
| 29 | +Route::group(['prefix' => 'product-backlogs'], function() { |
|
| 30 | 30 | Route::get('/list/{mode?}', 'ProductBacklogController@index')->name('product_backlogs.index'); |
| 31 | 31 | Route::get('/show/{slug}', 'ProductBacklogController@show')->name('product_backlogs.show'); |
| 32 | 32 | Route::get('/create', 'ProductBacklogController@create')->name('product_backlogs.create'); |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | Route::post('/update/{slug}', 'ProductBacklogController@update')->name('product_backlogs.update'); |
| 36 | 36 | }); |
| 37 | 37 | |
| 38 | -Route::group(['prefix' => 'sprints', 'middleware' => ['sprint.expired', 'global.activities']], function () { |
|
| 38 | +Route::group(['prefix' => 'sprints', 'middleware' => ['sprint.expired', 'global.activities']], function() { |
|
| 39 | 39 | Route::get('/planning/{slug}/issues', 'IssueController@index')->name('issues.index'); |
| 40 | 40 | Route::get('/list/{mode?}/{slug_product_backlog?}', 'SprintController@index')->name('sprints.index'); |
| 41 | 41 | Route::get('/show/{slug}', 'SprintController@show')->name('sprints.show'); |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | Route::delete('/destroy', 'SprintController@destroy')->name('sprints.delete'); |
| 47 | 47 | }); |
| 48 | 48 | |
| 49 | -Route::group(['prefix' => 'user-stories'], function () { |
|
| 49 | +Route::group(['prefix' => 'user-stories'], function() { |
|
| 50 | 50 | Route::get('/list/{mode?}/{slug_product_backlog?}', 'SprintController@index')->name('user_stories.index'); |
| 51 | 51 | Route::get('/show/{slug}', 'UserStoryController@show')->name('user_stories.show'); |
| 52 | 52 | Route::get('/create/{slug_product_backlog?}', 'UserStoryController@create')->name('user_stories.create'); |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | Route::post('/update/{slug}', 'UserStoryController@update')->name('user_stories.update'); |
| 56 | 56 | }); |
| 57 | 57 | |
| 58 | -Route::group(['prefix' => 'issues', 'middleware' => ['issue']], function () { |
|
| 58 | +Route::group(['prefix' => 'issues', 'middleware' => ['issue']], function() { |
|
| 59 | 59 | Route::get('/show/{slug}', 'IssueController@show')->name('issues.show'); |
| 60 | 60 | Route::get('/create/{slug_sprint?}/{slug_user_story?}', 'IssueController@create')->name('issues.create'); |
| 61 | 61 | Route::post('/store', 'IssueController@store')->name('issues.store'); |
@@ -65,47 +65,47 @@ discard block |
||
| 65 | 65 | Route::get('/status-update/{slug}/{status}', 'IssueController@statusUpdate')->name('issues.status.update'); |
| 66 | 66 | }); |
| 67 | 67 | |
| 68 | -Route::group(['prefix' => 'user-issue'], function () { |
|
| 68 | +Route::group(['prefix' => 'user-issue'], function() { |
|
| 69 | 69 | Route::get('/list/{username}/{slug_type?}/{mode?}', 'UserIssueController@index')->name('user_issue.index'); |
| 70 | 70 | Route::post('/update/{slug}', 'UserIssueController@update')->name('user_issue.update'); |
| 71 | 71 | }); |
| 72 | 72 | |
| 73 | -Route::group(['prefix' => 'issue-types'], function () { |
|
| 73 | +Route::group(['prefix' => 'issue-types'], function() { |
|
| 74 | 74 | Route::get('/sprint/{slug_sprint}/{slug_type?}', 'IssueTypeController@index')->name('issue_types.index'); |
| 75 | 75 | }); |
| 76 | 76 | |
| 77 | -Route::group(['prefix' => 'commits'], function () { |
|
| 77 | +Route::group(['prefix' => 'commits'], function() { |
|
| 78 | 78 | Route::get('/show/{sha}', 'CommitController@show')->name('commits.show'); |
| 79 | 79 | }); |
| 80 | 80 | |
| 81 | -Route::group(['prefix' => 'notes'], function () { |
|
| 81 | +Route::group(['prefix' => 'notes'], function() { |
|
| 82 | 82 | Route::get('/--------', 'NoteController@store')->name('notes.show'); |
| 83 | 83 | Route::post('/store', 'NoteController@store')->name('notes.store'); |
| 84 | 84 | Route::get('/update/{slug}', 'NoteController@update')->name('notes.update'); |
| 85 | 85 | Route::get('/destroy/{id}', 'NoteController@destroy')->name('notes.destroy'); |
| 86 | 86 | }); |
| 87 | 87 | |
| 88 | -Route::group(['prefix' => 'comments'], function () { |
|
| 88 | +Route::group(['prefix' => 'comments'], function() { |
|
| 89 | 89 | Route::get('/--------', 'CommentController@store')->name('comments.show'); |
| 90 | 90 | Route::post('/store', 'CommentController@store')->name('comments.store'); |
| 91 | 91 | Route::get('/destroy/{id}', 'CommentController@destroy')->name('comments.destroy'); |
| 92 | 92 | }); |
| 93 | 93 | |
| 94 | -Route::group(['prefix' => 'labels'], function () { |
|
| 94 | +Route::group(['prefix' => 'labels'], function() { |
|
| 95 | 95 | Route::get('/{model}/{slug_label?}', 'LabelController@index')->name('labels.index'); |
| 96 | 96 | Route::post('/store', 'LabelController@store')->name('labels.store'); |
| 97 | 97 | }); |
| 98 | 98 | |
| 99 | -Route::group(['prefix' => 'favorites'], function () { |
|
| 99 | +Route::group(['prefix' => 'favorites'], function() { |
|
| 100 | 100 | Route::get('/store/{type}/{id}', 'FavoriteController@store')->name('favorites.store'); |
| 101 | 101 | Route::get('/destroy/{type}/{id}', 'FavoriteController@destroy')->name('favorites.destroy'); |
| 102 | 102 | }); |
| 103 | 103 | |
| 104 | -Route::group(['prefix' => 'attachments'], function () { |
|
| 104 | +Route::group(['prefix' => 'attachments'], function() { |
|
| 105 | 105 | Route::get('/--------', 'AttachmentController@store')->name('attachments.show'); |
| 106 | 106 | Route::post('/store', 'AttachmentController@store')->name('attachments.store'); |
| 107 | 107 | }); |
| 108 | 108 | |
| 109 | -Route::group(['prefix' => 'teams'], function () { |
|
| 109 | +Route::group(['prefix' => 'teams'], function() { |
|
| 110 | 110 | Route::get('/members', 'TeamController@index')->name('team.index'); |
| 111 | 111 | }); |
@@ -13,6 +13,6 @@ |
||
| 13 | 13 | | |
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | -Artisan::command('inspire', function () { |
|
| 16 | +Artisan::command('inspire', function() { |
|
| 17 | 17 | $this->comment(Inspiring::quote()); |
| 18 | 18 | })->describe('Display an inspiring quote'); |