Skip to content

Commit d43633f

Browse files
committed
refactoring
1 parent e9d6592 commit d43633f

35 files changed

+119
-139
lines changed

Diff for: app/Classes/Github.php

+2-8
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,8 @@
88

99
namespace GitScrum\Classes;
1010

11-
use Auth;
12-
use GitScrum\Models\Branch;
13-
use GitScrum\Models\Commit;
14-
use GitScrum\Models\User;
15-
use GitScrum\Models\Issue;
16-
use GitScrum\Models\Organization;
17-
use GitScrum\Models\ProductBacklog;
18-
use Carbon\Carbon;
11+
use {Auth,Carbon};
12+
use GitScrum\Models\{Branch,User,Issue,Organization,ProductBacklog};
1913
use GitScrum\Contracts\ProviderInterface;
2014

2115
class Github implements ProviderInterface

Diff for: app/Classes/Gitlab.php

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
<?php
2+
/**
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
4+
*
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
7+
*/
28

39
namespace GitScrum\Classes;
410

5-
use Auth;
6-
use GitScrum\Models\User;
7-
use GitScrum\Models\Issue;
8-
use GitScrum\Models\Organization;
9-
use GitScrum\Models\ProductBacklog;
10-
use GitScrum\Models\Branch;
11-
use Carbon\Carbon;
11+
use {Auth, Carbon};
12+
use GitScrum\Models\{User,Issue,Organization,ProductBacklog,Branch};
1213
use GitScrum\Contracts\ProviderInterface;
1314

1415
class Gitlab implements ProviderInterface

Diff for: app/Classes/Helper.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
<?php
2+
/**
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
4+
*
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
7+
*/
28

39
namespace GitScrum\Classes;
410

511
use Illuminate\Pagination\LengthAwarePaginator;
612
use GitScrum\Models\IssueType;
713
use GitScrum\Models\ConfigIssueEffort;
8-
use Carbon\Carbon;
9-
use Auth;
14+
use {Auth,Carbon};
1015

1116
class Helper
1217
{

Diff for: app/Http/Controllers/AttachmentController.php

+6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
<?php
2+
/**
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
4+
*
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
7+
*/
28

39
namespace GitScrum\Http\Controllers;
410

Diff for: app/Http/Controllers/BranchController.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
/**
3-
* GitScrum v0.1.
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
44
*
5-
* @author Renato Marinho <[email protected]>
6-
* @license http://opensource.org/licenses/GPL-3.0 GPLv3
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
77
*/
88

99
namespace GitScrum\Http\Controllers;

Diff for: app/Http/Controllers/CommentController.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
/**
3-
* GitScrum v0.1.
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
44
*
5-
* @author Renato Marinho <[email protected]>
6-
* @license http://opensource.org/licenses/GPL-3.0 GPLv3
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
77
*/
88

99
namespace GitScrum\Http\Controllers;

Diff for: app/Http/Controllers/CommitController.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
/**
3-
* GitScrum v0.1.
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
44
*
5-
* @author Renato Marinho <[email protected]>
6-
* @license http://opensource.org/licenses/GPL-3.0 GPLv3
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
77
*/
88

99
namespace GitScrum\Http\Controllers;

Diff for: app/Http/Controllers/ConfigStatusController.php

+6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
<?php
2+
/**
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
4+
*
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
7+
*/
28

39
namespace GitScrum\Http\Controllers;
410

Diff for: app/Http/Controllers/Controller.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
/**
3-
* GitScrum v0.1.
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
44
*
5-
* @author Renato Marinho <[email protected]>
6-
* @license http://opensource.org/licenses/GPL-3.0 GPLv3
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
77
*/
88

99
namespace GitScrum\Http\Controllers;

Diff for: app/Http/Controllers/FavoriteController.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
/**
3-
* GitScrum v0.1.
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
44
*
5-
* @author Renato Marinho <[email protected]>
6-
* @license http://opensource.org/licenses/GPL-3.0 GPLv3
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
77
*/
88

99
namespace GitScrum\Http\Controllers;

Diff for: app/Http/Controllers/IssueController.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
/**
3-
* GitScrum v0.1.
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
44
*
5-
* @author Renato Marinho <[email protected]>
6-
* @license http://opensource.org/licenses/GPL-3.0 GPLv3
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
77
*/
88

99
namespace GitScrum\Http\Controllers;
@@ -82,7 +82,6 @@ public function create($scope, $slug, $parent_id = null)
8282
->with('organization', $organization)
8383
->with('parent_id', $parent_id)
8484
->with('action', 'Create');
85-
8685
}
8786

8887
public function store(IssueRequest $request)

Diff for: app/Http/Controllers/IssueTypeController.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
/**
3-
* GitScrum v0.1.
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
44
*
5-
* @author Renato Marinho <[email protected]>
6-
* @license http://opensource.org/licenses/GPL-3.0 GPLv3
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
77
*/
88

99
namespace GitScrum\Http\Controllers;

Diff for: app/Http/Controllers/LabelController.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
/**
3-
* GitScrum v0.1.
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
44
*
5-
* @author Renato Marinho <[email protected]>
6-
* @license http://opensource.org/licenses/GPL-3.0 GPLv3
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
77
*/
88

99
namespace GitScrum\Http\Controllers;

Diff for: app/Http/Controllers/NoteController.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
/**
3-
* GitScrum v0.1.
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
44
*
5-
* @author Renato Marinho <[email protected]>
6-
* @license http://opensource.org/licenses/GPL-3.0 GPLv3
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
77
*/
88

99
namespace GitScrum\Http\Controllers;

Diff for: app/Http/Controllers/ProductBacklogController.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
/**
3-
* GitScrum v0.1.
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
44
*
5-
* @author Renato Marinho <[email protected]>
6-
* @license http://opensource.org/licenses/GPL-3.0 GPLv3
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
77
*/
88

99
namespace GitScrum\Http\Controllers;

Diff for: app/Http/Controllers/PullRequestController.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
/**
3-
* GitScrum v0.1.
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
44
*
5-
* @author Renato Marinho <[email protected]>
6-
* @license http://opensource.org/licenses/GPL-3.0 GPLv3
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
77
*/
88

99
namespace GitScrum\Http\Controllers;

Diff for: app/Http/Controllers/RepositoriesController.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
/**
3-
* GitScrum v0.1.
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
44
*
5-
* @author Renato Marinho <[email protected]>
6-
* @license http://opensource.org/licenses/GPL-3.0 GPLv3
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
77
*/
88

99
namespace GitScrum\Http\Controllers;

Diff for: app/Http/Controllers/SprintController.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
/**
3-
* GitScrum v0.1.
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
44
*
5-
* @author Renato Marinho <[email protected]>
6-
* @license http://opensource.org/licenses/GPL-3.0 GPLv3
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
77
*/
88

99
namespace GitScrum\Http\Controllers;

Diff for: app/Http/Controllers/TeamController.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
/**
3-
* GitScrum v0.1.
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
44
*
5-
* @author Renato Marinho <[email protected]>
6-
* @license http://opensource.org/licenses/GPL-3.0 GPLv3
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
77
*/
88

99
namespace GitScrum\Http\Controllers;

Diff for: app/Http/Controllers/UserController.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
/**
3-
* GitScrum v0.1.
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
44
*
5-
* @author Renato Marinho <[email protected]>
6-
* @license http://opensource.org/licenses/GPL-3.0 GPLv3
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
77
*/
88

99
namespace GitScrum\Http\Controllers;

Diff for: app/Http/Controllers/UserIssueController.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
/**
3-
* GitScrum v0.1.
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
44
*
5-
* @author Renato Marinho <[email protected]>
6-
* @license http://opensource.org/licenses/GPL-3.0 GPLv3
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
77
*/
88

99
namespace GitScrum\Http\Controllers;

Diff for: app/Http/Controllers/UserStoryController.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
/**
3-
* GitScrum v0.1.
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
44
*
5-
* @author Renato Marinho <[email protected]>
6-
* @license http://opensource.org/licenses/GPL-3.0 GPLv3
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
77
*/
88

99
namespace GitScrum\Http\Controllers;

Diff for: app/Http/Controllers/WizardController.php

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
<?php
2+
/**
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
4+
*
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
7+
*/
28

39
namespace GitScrum\Http\Controllers;
410

5-
use Illuminate\Http\Request;
611
use GitScrum\Models\ProductBacklog;
7-
use Auth;
12+
use {Request,Session,Auth};
813

914
class WizardController extends Controller
1015
{
@@ -13,7 +18,7 @@ public function step1()
1318
$repositories = (object) app(Auth::user()->provider)->readRepositories();
1419
$currentRepositories = ProductBacklog::all();
1520

16-
\Session::put('Repositories', $repositories);
21+
Session::put('Repositories', $repositories);
1722

1823
return view('wizard.step1')
1924
->with('repositories', $repositories)
@@ -23,7 +28,7 @@ public function step1()
2328

2429
public function step2(Request $request)
2530
{
26-
$repositories = \Session::get('Repositories')->whereIn('provider_id', $request->repos);
31+
$repositories = Session::get('Repositories')->whereIn('provider_id', $request->repos);
2732
foreach ($repositories as $repository) {
2833
app(Auth::user()->provider)->readCollaborators($repository->organization_title, $repository->title, $repository->provider_id);
2934
$product_backlog = ProductBacklog::where('provider_id', $repository->provider_id)->first();

Diff for: app/Http/Kernel.php

-2
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,9 @@ class Kernel extends HttpKernel
3030
*/
3131
protected $middlewareGroups = [
3232
'web' => [
33-
\GitScrum\Http\Middleware\EncryptCookies::class,
3433
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
3534
\Illuminate\Session\Middleware\StartSession::class,
3635
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
37-
\GitScrum\Http\Middleware\VerifyCsrfToken::class,
3836
\Illuminate\Routing\Middleware\SubstituteBindings::class,
3937
],
4038

Diff for: app/Http/Middleware/EncryptCookies.php

-23
This file was deleted.

Diff for: app/Http/Middleware/GlobalActivities.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
/**
3-
* GitScrum v0.1.
3+
* Laravel GitScrum <https://github.com/renatomarinho/laravel-gitscrum>
44
*
5-
* @author Renato Marinho <[email protected]>
6-
* @license http://opensource.org/licenses/GPL-3.0 GPLv3
5+
* The MIT License (MIT)
6+
* Copyright (c) 2017 Renato Marinho <[email protected]>
77
*/
88

99
namespace GitScrum\Http\Middleware;

0 commit comments

Comments
 (0)