Completed
Pull Request — master (#2)
by Mikołaj
15:25 queued 05:27
created
src/Controllers/Auth/AuthController.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace App\Controllers\Auth;
4 4
 
5
-use App\Models\User;
6 5
 use App\Controllers\Controller;
6
+use App\Models\User;
7 7
 
8 8
 class AuthController extends Controller
9 9
 {
Please login to merge, or discard this patch.
src/Validation/Rules/EmailAvailable.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace App\Validation\Rules;
4 4
 
5
-use App\Models\User;
6 5
 use Albert221\Validation\Rule\RuleInterface;
7 6
 use Albert221\Validation\Rule\RuleTrait as RuleTrait;
7
+use App\Models\User;
8 8
 
9 9
 class EmailAvailable implements RuleInterface
10 10
 {
Please login to merge, or discard this patch.
src/Validation/Rules/EmailOccupied.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace App\Validation\Rules;
4 4
 
5
-use App\Models\User;
6 5
 use Albert221\Validation\Rule\RuleInterface;
7 6
 use Albert221\Validation\Rule\RuleTrait as RuleTrait;
7
+use App\Models\User;
8 8
 
9 9
 class EmailOccupied implements RuleInterface
10 10
 {
Please login to merge, or discard this patch.
src/Validation/Rules/PasswordNotOld.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace App\Validation\Rules;
4 4
 
5
-use App\Models\User;
6 5
 use Albert221\Validation\Rule\RuleInterface;
7 6
 use Albert221\Validation\Rule\RuleTrait as RuleTrait;
7
+use App\Models\User;
8 8
 
9 9
 class PasswordNotOld implements RuleInterface
10 10
 {
Please login to merge, or discard this patch.
src/Validation/Rules/PasswordOld.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace App\Validation\Rules;
4 4
 
5
-use App\Models\User;
6 5
 use Albert221\Validation\Rule\RuleInterface;
7 6
 use Albert221\Validation\Rule\RuleTrait as RuleTrait;
7
+use App\Models\User;
8 8
 
9 9
 class PasswordOld implements RuleInterface
10 10
 {
Please login to merge, or discard this patch.
src/Validation/Rules/PasswordValid.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace App\Validation\Rules;
4 4
 
5
-use App\Models\User;
6 5
 use Albert221\Validation\Rule\RuleInterface;
7 6
 use Albert221\Validation\Rule\RuleTrait as RuleTrait;
7
+use App\Models\User;
8 8
 
9 9
 class PasswordValid implements RuleInterface
10 10
 {
Please login to merge, or discard this patch.
src/routes.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-use App\Middleware\AuthMiddleware\UserMiddleware;
4 3
 use App\Middleware\AuthMiddleware\GuestMiddleware;
4
+use App\Middleware\AuthMiddleware\UserMiddleware;
5 5
 
6 6
 // All access routes
7 7
 $app->get('/', 'IndexController:index')->setName('home');
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 $app->get('/err', 'ErrorController:index')->setName('err');
9 9
 
10 10
 // Guest access routes
11
-$app->group('', function () {
11
+$app->group('', function() {
12 12
     // Sign up
13 13
     $this->get('/auth/signup', 'AuthController:getSignUp')->setName('auth.signup');
14 14
     $this->post('/auth/signup', 'AuthController:postSignUp');
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 })->add(new GuestMiddleware($container));
20 20
 
21 21
 // User access routes
22
-$app->group('', function () {
22
+$app->group('', function() {
23 23
     // Logout
24 24
     $this->get('/auth/signout', 'AuthController:getSignOut')->setName('auth.signout');
25 25
 
Please login to merge, or discard this patch.
src/dependencies.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 $container = $app->getContainer();
8 8
 
9 9
 // Twig renderer
10
-$container['view'] = function ($c) {
10
+$container['view'] = function($c) {
11 11
     $settings = $c->get('settings')['twig'];
12 12
 
13 13
     $view = new \Slim\Views\Twig($settings['template_path'], [
@@ -38,43 +38,43 @@  discard block
 block discarded – undo
38 38
 $capsule->setAsGlobal();
39 39
 $capsule->bootEloquent();
40 40
 
41
-$container['db'] = function ($c) {
41
+$container['db'] = function($c) {
42 42
     return $capsule;
43 43
 };
44 44
 
45 45
 // Controllers
46 46
 
47
-$container['IndexController'] = function ($c) {
47
+$container['IndexController'] = function($c) {
48 48
     return new \App\Controllers\IndexController($c);
49 49
 };
50 50
 
51
-$container['ErrorController'] = function ($c) {
51
+$container['ErrorController'] = function($c) {
52 52
     return new \App\Controllers\ErrorController($c);
53 53
 };
54 54
 
55
-$container['AuthController'] = function ($c) {
55
+$container['AuthController'] = function($c) {
56 56
     return new \App\Controllers\Auth\AuthController($c);
57 57
 };
58 58
 
59
-$container['PasswordController'] = function ($c) {
59
+$container['PasswordController'] = function($c) {
60 60
     return new \App\Controllers\Auth\PasswordController($c);
61 61
 };
62 62
 
63 63
 // Addons
64 64
 
65
-$container['validator'] = function ($c) {
65
+$container['validator'] = function($c) {
66 66
     return new \App\Validation\Validator;
67 67
 };
68 68
 
69
-$container['csrf'] = function ($c) {
69
+$container['csrf'] = function($c) {
70 70
     $guard = new \Slim\Csrf\Guard;
71 71
     return $guard->setFailureCallable(new \App\Middleware\FormsMiddleware\CsrfErrorMiddleware($c));
72 72
 };
73 73
 
74
-$container['flash'] = function ($c) {
74
+$container['flash'] = function($c) {
75 75
     return new \Slim\Flash\Messages;
76 76
 };
77 77
 
78
-$container['auth'] = function ($c) {
78
+$container['auth'] = function($c) {
79 79
     return new \App\Auth\Auth;
80 80
 };
Please login to merge, or discard this patch.