Completed
Pull Request — master (#36)
by Phecho
03:41
created
app/Http/Routes/GroupsRoutes.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,12 +52,12 @@
 block discarded – undo
52 52
             'setting'    => 'app_name',
53 53
             'as'         => 'groups.',
54 54
         ], function ($router) {
55
-           $router->get('{namespace}', [
55
+            $router->get('{namespace}', [
56 56
                 'as'   => 'group_show',
57 57
                 'uses' => 'GroupsController@show',
58 58
             ])->where('namespace', '[a-zA-z.0-9_\-]+');
59 59
 
60
-           $router->get('{namespace}/edit', [
60
+            $router->get('{namespace}/edit', [
61 61
                 'as'   => 'group_edit',
62 62
                 'uses' => 'GroupsController@edit',
63 63
             ])->where('namespace', '[a-zA-z.0-9_\-]+');
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             'setting'    => 'app_name',
33 33
             'prefix'     => 'projects',
34 34
             'as'         => 'projects.',
35
-        ], function ($router) {
35
+        ], function($router) {
36 36
             $router->get('/', [
37 37
                 'as'   => 'index',
38 38
                 'uses' => 'ProjectsController@index',
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             'middleware' => ['app.hasSetting'],
55 55
             'setting'    => 'app_name',
56 56
             'as'         => 'projects.',
57
-        ], function ($router) {
57
+        ], function($router) {
58 58
            $router->get('{namespace}/{project}', [
59 59
                 'as'   => 'project_show',
60 60
                 'uses' => 'ProjectsController@show',
Please login to merge, or discard this patch.
app/Http/Routes/ProjectsRoutes.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,12 +55,12 @@
 block discarded – undo
55 55
             'setting'    => 'app_name',
56 56
             'as'         => 'projects.',
57 57
         ], function ($router) {
58
-           $router->get('{namespace}/{project}', [
58
+            $router->get('{namespace}/{project}', [
59 59
                 'as'   => 'project_show',
60 60
                 'uses' => 'ProjectsController@show',
61 61
             ])->where('namespace', '[a-zA-z.0-9_\-]+')->where('project', '[a-zA-z.0-9_\-]+');
62 62
 
63
-           $router->get('{namespace}/{project}/edit', [
63
+            $router->get('{namespace}/{project}/edit', [
64 64
                 'as'   => 'project_edit',
65 65
                 'uses' => 'ProjectsController@edit',
66 66
             ])->where('namespace', '[a-zA-z.0-9_\-]+')->where('project', '[a-zA-z.0-9_\-]+');
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             'setting'    => 'app_name',
33 33
             'prefix'     => 'projects',
34 34
             'as'         => 'projects.',
35
-        ], function ($router) {
35
+        ], function($router) {
36 36
             $router->get('/', [
37 37
                 'as'   => 'index',
38 38
                 'uses' => 'ProjectsController@index',
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             'middleware' => ['app.hasSetting'],
55 55
             'setting'    => 'app_name',
56 56
             'as'         => 'projects.',
57
-        ], function ($router) {
57
+        ], function($router) {
58 58
            $router->get('{namespace}/{project}', [
59 59
                 'as'   => 'project_show',
60 60
                 'uses' => 'ProjectsController@show',
Please login to merge, or discard this patch.
app/Http/Controllers/ExploreController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $allIssues = Issue::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('created_at', 'desc')->get()->groupBy(function (Issue $issue) use ($dateTimeZone) {
64
+        ])->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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Http/Controllers/Projects/IssuesController.php 3 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,6 @@
 block discarded – undo
78 78
     /**
79 79
      * Display the specified resource.
80 80
      *
81
-     * @param  int  $id
82 81
      * @return \Illuminate\Http\Response
83 82
      */
84 83
     public function show($namespace, $project, Issue $issue)
Please login to merge, or discard this patch.
Unused Use Statements   -7 removed lines patch added patch discarded remove patch
@@ -3,19 +3,12 @@
 block discarded – undo
3 3
 namespace Gitamin\Http\Controllers\Projects;
4 4
 
5 5
 use Illuminate\Http\Request;
6
-use Illuminate\Foundation\Bus\DispatchesJobs;
7 6
 use Illuminate\Support\Facades\Redirect;
8 7
 use Illuminate\Support\Facades\Auth;
9 8
 use Illuminate\Support\Facades\View;
10 9
 use Gitamin\Http\Controllers\Controller;
11 10
 use GrahamCampbell\Binput\Facades\Binput;
12 11
 use Gitamin\Commands\Issue\AddIssueCommand;
13
-use Gitamin\Commands\Issue\RemoveIssueCommand;
14
-use Gitamin\Commands\Issue\UpdateIssueCommand;
15
-use Gitamin\Models\Project;
16
-use Gitamin\Models\ProjectNamespace;
17
-use Gitamin\Models\Group;
18
-use Gitamin\Models\Tag;
19 12
 use Gitamin\Models\Issue;
20 13
 
21 14
 class IssuesController extends Controller
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
         $project = $this->getProject($namespace, $project_path);
60 60
         $issueData = Binput::get('issue');
61 61
 
62
-         try {
62
+            try {
63 63
             $issueData['author_id'] = Auth::user()->id;
64 64
             $issueData['project_id'] = $project->id;
65 65
             $issue = $this->dispatchFromArray(AddIssueCommand::class, $issueData);
Please login to merge, or discard this patch.
app/Models/Issue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
     {
126 126
         $statuses = trans('gitamin.issues.status');
127 127
 
128
-        return $statuses[rand(0,2)];
128
+        return $statuses[rand(0, 2)];
129 129
         //return $statuses[$this->state];
130 130
     }
131 131
 
Please login to merge, or discard this patch.
app/Http/Controllers/FeedController.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -22,17 +22,17 @@
 block discarded – undo
22 22
 class FeedController extends Controller
23 23
 {
24 24
     /**
25
-    * Feed facade.
26
-    *
27
-    * @var Roumen\Feed\Facades\Feed
28
-    */
25
+     * Feed facade.
26
+     *
27
+     * @var Roumen\Feed\Facades\Feed
28
+     */
29 29
     private $feed;
30 30
 
31 31
     /**
32
-    * Create a new feed controller instance.
33
-    *
34
-    * @return void
35
-    */
32
+     * Create a new feed controller instance.
33
+     *
34
+     * @return void
35
+     */
36 36
     public function __construct()
37 37
     {
38 38
         $this->feed = Feed::make();
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -76,16 +76,16 @@
 block discarded – undo
76 76
      *
77 77
      * @return \Illuminate\Http\Response
78 78
      */
79
-    private function feedAction(ProjectNamespace &$namespace, $isRss)
79
+    private function feedAction(ProjectNamespace & $namespace, $isRss)
80 80
     {
81 81
         if ($namespace->exists) {
82
-            $namespace->projects->map(function ($project) {
83
-                $project->issues()->visible()->orderBy('created_at', 'desc')->get()->map(function ($issue) use ($isRss) {
82
+            $namespace->projects->map(function($project) {
83
+                $project->issues()->visible()->orderBy('created_at', 'desc')->get()->map(function($issue) use ($isRss) {
84 84
                     $this->feedAddItem($issue, $isRss);
85 85
                 });
86 86
             });
87 87
         } else {
88
-            Issue::visible()->orderBy('created_at', 'desc')->get()->map(function ($issue) use ($isRss) {
88
+            Issue::visible()->orderBy('created_at', 'desc')->get()->map(function($issue) use ($isRss) {
89 89
                 $this->feedAddItem($issue, $isRss);
90 90
             });
91 91
         }
Please login to merge, or discard this patch.
app/Http/Controllers/GroupsController.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -84,11 +84,11 @@
 block discarded – undo
84 84
             ->withSubMenu($this->subMenu);
85 85
     }
86 86
 
87
-     /**
88
-     * Shows the group view.
89
-     *
90
-     * @return \Illuminate\View\View
91
-     */
87
+        /**
88
+         * Shows the group view.
89
+         *
90
+         * @return \Illuminate\View\View
91
+         */
92 92
     public function show($namespace)
93 93
     {
94 94
         $group = Group::where('path', '=', $namespace)->first();
Please login to merge, or discard this patch.
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -141,7 +141,6 @@  discard block
 block discarded – undo
141 141
     /**
142 142
      * Shows the edit project namespace view.
143 143
      *
144
-     * @param \Gitamin\Models\ProjectNamespace $namespace
145 144
      *
146 145
      * @return \Illuminate\View\View
147 146
      */
@@ -157,7 +156,6 @@  discard block
 block discarded – undo
157 156
     /**
158 157
      * Updates a project namespace.
159 158
      *
160
-     * @param \Gitamin\Models\ProjectNamespace $namespace
161 159
      *
162 160
      * @return \Illuminate\Http\RedirectResponse
163 161
      */
Please login to merge, or discard this patch.
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -13,18 +13,14 @@
 block discarded – undo
13 13
 
14 14
 use AltThree\Validator\ValidationException;
15 15
 use Gitamin\Commands\Owner\AddOwnerCommand;
16
-use Gitamin\Commands\Owner\RemoveOwnerCommand;
17 16
 use Gitamin\Commands\Owner\UpdateOwnerCommand;
18
-use Gitamin\Models\Project;
19 17
 use Gitamin\Models\Owner;
20 18
 use Gitamin\Models\Group;
21
-use Gitamin\Models\Tag;
22 19
 use Gitamin\Http\Controllers\Controller;
23 20
 use GrahamCampbell\Binput\Facades\Binput;
24 21
 use Illuminate\Support\Facades\Redirect;
25 22
 use Illuminate\Support\Facades\Auth;
26 23
 use Illuminate\Support\Facades\View;
27
-use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
28 24
 use Illuminate\Database\QueryException;
29 25
 
30 26
 class GroupsController extends Controller
Please login to merge, or discard this patch.
app/Http/Controllers/Dashboard/GroupsController.php 1 patch
Unused Use Statements   -13 removed lines patch added patch discarded remove patch
@@ -11,22 +11,9 @@
 block discarded – undo
11 11
 
12 12
 namespace Gitamin\Http\Controllers\Dashboard;
13 13
 
14
-use AltThree\Validator\ValidationException;
15
-use Gitamin\Commands\Project\AddProjectCommand;
16
-use Gitamin\Commands\Project\RemoveProjectCommand;
17
-use Gitamin\Commands\Project\UpdateProjectCommand;
18
-use Gitamin\Commands\Owner\AddOwnerCommand;
19
-use Gitamin\Commands\Owner\RemoveOwnerCommand;
20
-use Gitamin\Commands\Owner\UpdateOwnerCommand;
21 14
 use Gitamin\Http\Controllers\Controller;
22
-use Gitamin\Models\Project;
23 15
 use Gitamin\Models\Group;
24
-use Gitamin\Models\Tag;
25
-use GrahamCampbell\Binput\Facades\Binput;
26
-use Illuminate\Foundation\Bus\DispatchesJobs;
27
-use Illuminate\Support\Facades\Redirect;
28 16
 use Illuminate\Support\Facades\View;
29
-use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
30 17
 
31 18
 class GroupsController extends Controller
32 19
 {
Please login to merge, or discard this patch.
app/Http/Controllers/Projects/TreeController.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,6 @@
 block discarded – undo
3 3
 namespace Gitamin\Http\Controllers\Projects;
4 4
 
5 5
 use Illuminate\Http\Request;
6
-
7
-use Gitamin\Http\Requests;
8 6
 use Gitamin\Http\Controllers\Controller;
9 7
 
10 8
 class ProjectController extends Controller
Please login to merge, or discard this patch.