@@ -12,7 +12,6 @@ |
||
12 | 12 | namespace Gitamin\Http\Controllers; |
13 | 13 | |
14 | 14 | use Gitamin\Facades\Setting; |
15 | -use Gitamin\Models\Project; |
|
16 | 15 | use Gitter\Client; |
17 | 16 | use Illuminate\Routing\Controller; |
18 | 17 | use Illuminate\Support\Facades\View; |
@@ -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 |
@@ -29,7 +29,7 @@ |
||
29 | 29 | { |
30 | 30 | $enabledLangs = Config::get('langs'); |
31 | 31 | |
32 | - $langs = array_map(function ($lang) use ($enabledLangs) { |
|
32 | + $langs = array_map(function($lang) use ($enabledLangs) { |
|
33 | 33 | $locale = basename($lang); |
34 | 34 | |
35 | 35 | return [$locale => $enabledLangs[$locale]]; |
@@ -54,7 +54,7 @@ |
||
54 | 54 | 'team_id' => $command->team_id, |
55 | 55 | ]; |
56 | 56 | |
57 | - return array_filter($params, function ($val) { |
|
57 | + return array_filter($params, function($val) { |
|
58 | 58 | return $val !== null; |
59 | 59 | }); |
60 | 60 | } |
@@ -30,7 +30,7 @@ |
||
30 | 30 | event(new ProjectTeamWasRemovedEvent($team)); |
31 | 31 | |
32 | 32 | // Remove the team id from all project. |
33 | - $team->projects->map(function ($project) { |
|
33 | + $team->projects->map(function($project) { |
|
34 | 34 | $project->update(['team_id' => 0]); |
35 | 35 | }); |
36 | 36 |
@@ -81,7 +81,7 @@ |
||
81 | 81 | $this->mailer->queue([ |
82 | 82 | 'html' => 'emails.issues.new-html', |
83 | 83 | 'text' => 'emails.issues.new-text', |
84 | - ], $mail, function (Message $message) use ($mail) { |
|
84 | + ], $mail, function(Message $message) use ($mail) { |
|
85 | 85 | $message->to($mail['email'])->subject($mail['subject']); |
86 | 86 | }); |
87 | 87 | } |
@@ -54,7 +54,7 @@ |
||
54 | 54 | $this->mailer->queue([ |
55 | 55 | 'html' => 'emails.users.invite-html', |
56 | 56 | 'text' => 'emails.users.invite-text', |
57 | - ], $mail, function (Message $message) use ($mail) { |
|
57 | + ], $mail, function(Message $message) use ($mail) { |
|
58 | 58 | $message->to($mail['email'])->subject($mail['subject']); |
59 | 59 | }); |
60 | 60 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $tags = preg_split('/ ?, ?/', Binput::get('tags')); |
85 | 85 | |
86 | 86 | // For every tag, do we need to create it? |
87 | - $projectTags = array_map(function ($taggable) use ($project) { |
|
87 | + $projectTags = array_map(function($taggable) use ($project) { |
|
88 | 88 | return Tag::firstOrCreate([ |
89 | 89 | 'name' => $taggable, |
90 | 90 | ])->id; |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $tags = preg_split('/ ?, ?/', Binput::get('tags')); |
125 | 125 | |
126 | 126 | // For every tag, do we need to create it? |
127 | - $projectTags = array_map(function ($taggable) use ($project) { |
|
127 | + $projectTags = array_map(function($taggable) use ($project) { |
|
128 | 128 | return Tag::firstOrCreate(['name' => $taggable])->id; |
129 | 129 | }, $tags); |
130 | 130 |
@@ -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 |
@@ -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 |