Completed
Branch master (01e132)
by Mikołaj
02:54
created
src/Controllers/Auth/AuthController.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,9 +3,7 @@
 block discarded – undo
3 3
 namespace App\Controllers\Auth;
4 4
 
5 5
 use App\Models\User;
6
-use App\Validation\Rules\EmailAvailable as EmailAvailable;
7 6
 use App\Controllers\Controller;
8
-use App\Validation\Validator;
9 7
 
10 8
 class AuthController extends Controller
11 9
 {
Please login to merge, or discard this patch.
src/Controllers/Auth/PasswordController.php 1 patch
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -2,10 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace App\Controllers\Auth;
4 4
 
5
-use App\Models\User;
6
-use App\Validation\Rules\EmailAvailable as EmailAvailable;
7 5
 use App\Controllers\Controller;
8
-use App\Validation\Validator;
9 6
 
10 7
 class PasswordController extends Controller
11 8
 {
Please login to merge, or discard this patch.
src/Validation/Validator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
             'name',
23 23
         ];
24 24
 
25
-        foreach($fields as $field)
25
+        foreach ($fields as $field)
26 26
         {
27 27
             $this->addField($field, $request->getParam($field));
28 28
             $this->addRule($field, new Rule\Required())->setMessage('To pole nie może być puste');
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             'password',
45 45
         ];
46 46
 
47
-        foreach($fields as $field)
47
+        foreach ($fields as $field)
48 48
         {
49 49
             $this->addField($field, $request->getParam($field));
50 50
             $this->addRule($field, new Rule\Required())->setMessage('To pole nie może być puste');
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             'password2',
65 65
         ];
66 66
 
67
-        foreach($fields as $field)
67
+        foreach ($fields as $field)
68 68
         {
69 69
             $this->addField($field, $request->getParam($field));
70 70
             $this->addRule($field, new Rule\Required())->setMessage('To pole nie może być puste');
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
 {
12 12
     $settings = $c->get('settings')['twig'];
13 13
 
@@ -39,52 +39,52 @@  discard block
 block discarded – undo
39 39
 $capsule->setAsGlobal();
40 40
 $capsule->bootEloquent();
41 41
 
42
-$container['db'] = function ($c)
42
+$container['db'] = function($c)
43 43
 {
44 44
     return $capsule;
45 45
 };
46 46
 
47 47
 // Controllers
48 48
 
49
-$container['IndexController'] = function ($c)
49
+$container['IndexController'] = function($c)
50 50
 {
51 51
     return new \App\Controllers\IndexController($c);
52 52
 };
53 53
 
54
-$container['ErrorController'] = function ($c)
54
+$container['ErrorController'] = function($c)
55 55
 {
56 56
     return new \App\Controllers\ErrorController($c);
57 57
 };
58 58
 
59
-$container['AuthController'] = function ($c)
59
+$container['AuthController'] = function($c)
60 60
 {
61 61
     return new \App\Controllers\Auth\AuthController($c);
62 62
 };
63 63
 
64
-$container['PasswordController'] = function ($c)
64
+$container['PasswordController'] = function($c)
65 65
 {
66 66
     return new \App\Controllers\Auth\PasswordController($c);
67 67
 };
68 68
 
69 69
 // Addons
70 70
 
71
-$container['validator'] = function ($c)
71
+$container['validator'] = function($c)
72 72
 {
73 73
     return new \App\Validation\Validator;
74 74
 };
75 75
 
76
-$container['csrf'] = function ($c)
76
+$container['csrf'] = function($c)
77 77
 {
78 78
     $guard = new \Slim\Csrf\Guard;
79 79
     return $guard->setFailureCallable(new \App\Middleware\FormsMiddleware\CsrfErrorMiddleware($c));
80 80
 };
81 81
 
82
-$container['flash'] = function ($c)
82
+$container['flash'] = function($c)
83 83
 {
84 84
     return new \Slim\Flash\Messages;
85 85
 };
86 86
 
87
-$container['auth'] = function ($c)
87
+$container['auth'] = function($c)
88 88
 {
89 89
     return new \App\Auth\Auth;
90 90
 };
91 91
\ No newline at end of file
Please login to merge, or discard this patch.