@@ -11,7 +11,6 @@ |
||
11 | 11 | |
12 | 12 | namespace Gitamin\Presenters; |
13 | 13 | |
14 | -use Gitamin\Facades\Setting; |
|
15 | 14 | use Gitamin\Presenters\Traits\TimestampsTrait; |
16 | 15 | use GrahamCampbell\Markdown\Facades\Markdown; |
17 | 16 | use Jenssegers\Date\Date; |
@@ -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 | } |
@@ -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 |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * |
31 | 31 | * @param \Symfony\Component\HttpFoundation\Request $request |
32 | 32 | * |
33 | - * @return \Illuminate\Http\JsonResponse |
|
33 | + * @return \Illuminate\Http\Response |
|
34 | 34 | */ |
35 | 35 | public function getTeams(Request $request) |
36 | 36 | { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | * |
45 | 45 | * @param \Gitamin\Models\ProjectTeam $team |
46 | 46 | * |
47 | - * @return \Illuminate\Http\JsonResponse |
|
47 | + * @return \Illuminate\Http\Response |
|
48 | 48 | */ |
49 | 49 | public function getTeam(ProjectTeam $team) |
50 | 50 | { |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | /** |
55 | 55 | * Create a new project team. |
56 | 56 | * |
57 | - * @return \Illuminate\Http\JsonResponse |
|
57 | + * @return \Illuminate\Http\Response |
|
58 | 58 | */ |
59 | 59 | public function postTeams() |
60 | 60 | { |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | * |
77 | 77 | * @param \Gitamin\Models\ProjectTeam $team |
78 | 78 | * |
79 | - * @return \Illuminate\Http\JsonResponse |
|
79 | + * @return \Illuminate\Http\Response |
|
80 | 80 | */ |
81 | 81 | public function putTeam(ProjectTeam $team) |
82 | 82 | { |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | * |
100 | 100 | * @param \Gitamin\Models\ProjectTeam $team |
101 | 101 | * |
102 | - * @return \Illuminate\Http\JsonResponse |
|
102 | + * @return \Illuminate\Http\Response |
|
103 | 103 | */ |
104 | 104 | public function deleteTeam(ProjectTeam $team) |
105 | 105 | { |
@@ -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'); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | 'as' => 'activities.', |
92 | 92 | 'prefix' => 'activities', |
93 | 93 | ], function ($router) { |
94 | - $router->get('/', [ |
|
94 | + $router->get('/', [ |
|
95 | 95 | 'as' => 'index', |
96 | 96 | 'uses' => 'ActivityController@showActivities', |
97 | 97 | ]); |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | 'as' => 'milestones.', |
103 | 103 | 'prefix' => 'milestones', |
104 | 104 | ], function ($router) { |
105 | - $router->get('/', [ |
|
105 | + $router->get('/', [ |
|
106 | 106 | 'as' => 'index', |
107 | 107 | 'uses' => 'MilestoneController@showMilestones', |
108 | 108 | ]); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | 'as' => 'merge_requests.', |
114 | 114 | 'prefix' => 'merge_requests', |
115 | 115 | ], function ($router) { |
116 | - $router->get('/', [ |
|
116 | + $router->get('/', [ |
|
117 | 117 | 'as' => 'index', |
118 | 118 | 'uses' => 'MergeRequestController@showMergeRequests', |
119 | 119 | ]); |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | 'as' => 'snippets.', |
125 | 125 | 'prefix' => 'snippets', |
126 | 126 | ], function ($router) { |
127 | - $router->get('/', [ |
|
127 | + $router->get('/', [ |
|
128 | 128 | 'as' => 'index', |
129 | 129 | 'uses' => 'SnippetController@showSnippets', |
130 | 130 | ]); |
@@ -31,13 +31,13 @@ discard block |
||
31 | 31 | 'prefix' => 'dashboard', |
32 | 32 | 'namespace' => 'Dashboard', |
33 | 33 | 'as' => 'dashboard.', |
34 | - ], function ($router) { |
|
34 | + ], function($router) { |
|
35 | 35 | |
36 | 36 | // Projects |
37 | 37 | $router->group([ |
38 | 38 | 'as' => 'projects.', |
39 | 39 | 'prefix' => 'projects', |
40 | - ], function ($router) { |
|
40 | + ], function($router) { |
|
41 | 41 | $router->get('/', [ |
42 | 42 | 'as' => 'index', |
43 | 43 | 'uses' => 'ProjectsController@indexAction', |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $router->group([ |
53 | 53 | 'as' => 'groups.', |
54 | 54 | 'prefix' => 'groups', |
55 | - ], function ($router) { |
|
55 | + ], function($router) { |
|
56 | 56 | $router->get('/', [ |
57 | 57 | 'as' => 'index', |
58 | 58 | 'uses' => 'GroupsController@indexAction', |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $router->group([ |
65 | 65 | 'as' => 'moments.', |
66 | 66 | 'prefix' => 'moments', |
67 | - ], function ($router) { |
|
67 | + ], function($router) { |
|
68 | 68 | $router->get('/', [ |
69 | 69 | 'as' => 'index', |
70 | 70 | 'uses' => 'MomentsController@indexAction', |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $router->group([ |
76 | 76 | 'as' => 'milestones.', |
77 | 77 | 'prefix' => 'milestones', |
78 | - ], function ($router) { |
|
78 | + ], function($router) { |
|
79 | 79 | $router->get('/', [ |
80 | 80 | 'as' => 'index', |
81 | 81 | 'uses' => 'MilestonesController@indexAction', |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $router->group([ |
87 | 87 | 'as' => 'pull_requests.', |
88 | 88 | 'prefix' => 'pull_requests', |
89 | - ], function ($router) { |
|
89 | + ], function($router) { |
|
90 | 90 | $router->get('/', [ |
91 | 91 | 'as' => 'index', |
92 | 92 | 'uses' => 'PullRequestsController@indexAction', |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $router->group([ |
98 | 98 | 'as' => 'snippets.', |
99 | 99 | 'prefix' => 'snippets', |
100 | - ], function ($router) { |
|
100 | + ], function($router) { |
|
101 | 101 | $router->get('/', [ |
102 | 102 | 'as' => 'index', |
103 | 103 | 'uses' => 'SnippetsController@indexAction', |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $router->group([ |
109 | 109 | 'as' => 'issues.', |
110 | 110 | 'prefix' => 'issues', |
111 | - ], function ($router) { |
|
111 | + ], function($router) { |
|
112 | 112 | $router->get('/', [ |
113 | 113 | 'as' => 'index', |
114 | 114 | 'uses' => 'IssuesController@indexAction', |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $router->group([ |
120 | 120 | 'as' => 'subscribers.', |
121 | 121 | 'prefix' => 'subscribers', |
122 | - ], function ($router) { |
|
122 | + ], function($router) { |
|
123 | 123 | $router->get('/', [ |
124 | 124 | 'as' => 'index', |
125 | 125 | 'uses' => 'SubscriberController@indexAction', |
@@ -136,13 +136,13 @@ discard block |
||
136 | 136 | $router->group([ |
137 | 137 | 'as' => 'group.', |
138 | 138 | 'prefix' => 'group', |
139 | - ], function ($router) { |
|
139 | + ], function($router) { |
|
140 | 140 | $router->get('/', [ |
141 | 141 | 'as' => 'index', |
142 | 142 | 'uses' => 'GroupController@showGroupView', |
143 | 143 | ]); |
144 | 144 | |
145 | - $router->group(['middleware' => 'admin'], function ($router) { |
|
145 | + $router->group(['middleware' => 'admin'], function($router) { |
|
146 | 146 | $router->get('add', [ |
147 | 147 | 'as' => 'add', |
148 | 148 | 'uses' => 'GroupController@showAddGroupMemberView', |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | }); |
161 | 161 | |
162 | 162 | // User Settings |
163 | - $router->group(['prefix' => 'user'], function ($router) { |
|
163 | + $router->group(['prefix' => 'user'], function($router) { |
|
164 | 164 | $router->get('/', [ |
165 | 165 | 'as' => 'user', |
166 | 166 | 'uses' => 'UserController@showUser', |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | * Internal API. |
174 | 174 | * This should only be used for making requests within the dashboard. |
175 | 175 | */ |
176 | - $router->group(['prefix' => 'api'], function ($router) { |
|
176 | + $router->group(['prefix' => 'api'], function($router) { |
|
177 | 177 | $router->post('projects/order', 'ApiController@postUpdateProjectOrder'); |
178 | 178 | $router->post('projects/{project}', 'ApiController@postUpdateProject'); |
179 | 179 | }); |
@@ -29,8 +29,8 @@ |
||
29 | 29 | 'middleware' => ['app.hasSetting', 'localize'], |
30 | 30 | 'setting' => 'app_name', |
31 | 31 | 'as' => 'subscribe.', |
32 | - ], function ($router) { |
|
33 | - $router->group(['middleware' => 'app.subscribers'], function ($router) { |
|
32 | + ], function($router) { |
|
33 | + $router->group(['middleware' => 'app.subscribers'], function($router) { |
|
34 | 34 | $router->get('subscribe', [ |
35 | 35 | 'as' => 'subscribe', |
36 | 36 | 'uses' => 'SubscribeController@showSubscribe', |
@@ -40,7 +40,7 @@ |
||
40 | 40 | { |
41 | 41 | parent::boot(); |
42 | 42 | |
43 | - self::creating(function ($tag) { |
|
43 | + self::creating(function($tag) { |
|
44 | 44 | $tag->slug = Str::slug($tag->name); |
45 | 45 | }); |
46 | 46 | } |
@@ -25,11 +25,11 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function boot(Dispatcher $dispatcher) |
27 | 27 | { |
28 | - $dispatcher->mapUsing(function ($command) { |
|
28 | + $dispatcher->mapUsing(function($command) { |
|
29 | 29 | return Dispatcher::simpleMapping($command, 'Gitamin', 'Gitamin\Handlers'); |
30 | 30 | }); |
31 | 31 | |
32 | - Str::macro('canonicalize', function ($url) { |
|
32 | + Str::macro('canonicalize', function($url) { |
|
33 | 33 | return preg_replace('/([^\/])$/', '$1/', $url); |
34 | 34 | }); |
35 | 35 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | */ |
52 | 52 | protected function registerDateFactory() |
53 | 53 | { |
54 | - $this->app->singleton(DateFactory::class, function ($app) { |
|
54 | + $this->app->singleton(DateFactory::class, function($app) { |
|
55 | 55 | $appTimezone = $app->config->get('app.timezone'); |
56 | 56 | $gitamInimezone = $app->config->get('gitamin.timezone'); |
57 | 57 |