@@ -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 | |
@@ -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 | } |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * |
| 53 | 53 | * @param \Illuminate\Http\Request $request |
| 54 | 54 | * |
| 55 | - * @return \Illuminate\Http\Response |
|
| 55 | + * @return \Illuminate\Http\RedirectResponse |
|
| 56 | 56 | */ |
| 57 | 57 | public function store(Request $request) |
| 58 | 58 | { |
@@ -65,7 +65,6 @@ discard block |
||
| 65 | 65 | /** |
| 66 | 66 | * Display the specified resource. |
| 67 | 67 | * |
| 68 | - * @param int $id |
|
| 69 | 68 | * |
| 70 | 69 | * @return \Illuminate\Http\Response |
| 71 | 70 | */ |
@@ -82,7 +81,6 @@ discard block |
||
| 82 | 81 | /** |
| 83 | 82 | * Show the form for editing the specified resource. |
| 84 | 83 | * |
| 85 | - * @param int $id |
|
| 86 | 84 | * |
| 87 | 85 | * @return \Illuminate\Http\Response |
| 88 | 86 | */ |
@@ -105,9 +103,8 @@ discard block |
||
| 105 | 103 | * Update the specified resource in storage. |
| 106 | 104 | * |
| 107 | 105 | * @param \Illuminate\Http\Request $request |
| 108 | - * @param int $id |
|
| 109 | 106 | * |
| 110 | - * @return \Illuminate\Http\Response |
|
| 107 | + * @return \Illuminate\Http\RedirectResponse |
|
| 111 | 108 | */ |
| 112 | 109 | public function update(Request $request, $slug) |
| 113 | 110 | { |