Completed
Push — develop ( 179c36...dbe277 )
by Francisco
02:40
created
app/Providers/AppServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      */
16 16
     public function boot()
17 17
     {
18
-        Validator::extend('student_number', function ($attribute, $value, $parameters, $validator) {
18
+        Validator::extend('student_number', function($attribute, $value, $parameters, $validator) {
19 19
             return preg_match('/^(a|pg)[0-9]+$/', $value) === 1;
20 20
         });
21 21
     }
@@ -25,11 +25,11 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function register()
27 27
     {
28
-        $this->app->singleton(ExchangeLogger::class, function ($app) {
28
+        $this->app->singleton(ExchangeLogger::class, function($app) {
29 29
             return new EloquentExchangeLogger();
30 30
         });
31 31
 
32
-        $this->app->singleton('settings', function ($app) {
32
+        $this->app->singleton('settings', function($app) {
33 33
             return Settings::firstOrNew([]);
34 34
         });
35 35
     }
Please login to merge, or discard this patch.
app/Http/Middleware/RedirectIfUnconfirmed.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function handle($request, Closure $next, $guard = null)
19 19
     {
20
-        if (! auth()->user()->verified) {
20
+        if ( ! auth()->user()->verified) {
21 21
             return response(view('auth.unconfirmed'), 403);
22 22
         }
23 23
 
Please login to merge, or discard this patch.
app/Http/Middleware/AuthorizeStudent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
      */
20 20
     public function handle($request, Closure $next)
21 21
     {
22
-        if (! auth()->check() || ! auth()->user()->isStudent()) {
22
+        if ( ! auth()->check() || ! auth()->user()->isStudent()) {
23 23
             throw new AuthorizationException('Unauthorized.');
24 24
         }
25 25
 
Please login to merge, or discard this patch.
app/Http/Middleware/AuthorizeAdministrator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
      */
20 20
     public function handle($request, Closure $next)
21 21
     {
22
-        if (! auth()->check() || ! auth()->user()->isAdmin()) {
22
+        if ( ! auth()->check() || ! auth()->user()->isAdmin()) {
23 23
             throw new AuthorizationException('Unauthorized.');
24 24
         }
25 25
 
Please login to merge, or discard this patch.
app/Http/Middleware/AuthorizeExchangeActions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      */
17 17
     public function handle($request, Closure $next)
18 18
     {
19
-        if (! app('settings')->withinExchangePeriod()) {
19
+        if ( ! app('settings')->withinExchangePeriod()) {
20 20
             flash('The exchanges period is closed. You are not allowed to perform this action.')->error();
21 21
 
22 22
             return redirect()->route('home');
Please login to merge, or discard this patch.
app/Http/Middleware/AuthorizeEnrollmentActions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      */
17 17
     public function handle($request, Closure $next)
18 18
     {
19
-        if (! app('settings')->withinEnrollmentPeriod()) {
19
+        if ( ! app('settings')->withinEnrollmentPeriod()) {
20 20
             flash('The enrollments period is closed. You are not allowed to perform this action.')->error();
21 21
 
22 22
             return redirect()->route('home');
Please login to merge, or discard this patch.
app/Http/Controllers/ExchangeController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     public function create($enrollmentId)
35 35
     {
36 36
         try {
37
-            $data = DB::transaction(function () use ($enrollmentId) {
37
+            $data = DB::transaction(function() use ($enrollmentId) {
38 38
                 $enrollment = Enrollment::findOrFail($enrollmentId);
39 39
                 $this->authorize('exchange', $enrollment);
40 40
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
                 return compact('enrollment', 'matchingEnrollments');
50 50
             });
51 51
 
52
-            $data['matchingEnrollments'] = $data['matchingEnrollments']->map(function ($item) {
52
+            $data['matchingEnrollments'] = $data['matchingEnrollments']->map(function($item) {
53 53
                 return [
54 54
                     'id' => $item->id,
55 55
                     '_toString' => $item->present()->inlineToString(),
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     public function store(CreateRequest $request)
75 75
     {
76 76
         try {
77
-            DB::transaction(function () use ($request) {
77
+            DB::transaction(function() use ($request) {
78 78
                 $this->validate($request, [
79 79
                     'from_enrollment_id' => 'exists:enrollments,id',
80 80
                     'to_enrollment_id' => 'exists:enrollments,id',
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
                 // already exists. If the inverse record is found then we will
89 89
                 // exchange and update both enrollments of this exchange.
90 90
                 $exchange = Exchange::findMatchingExchange($fromEnrollment, $toEnrollment);
91
-                if (! is_null($exchange)) {
91
+                if ( ! is_null($exchange)) {
92 92
                     return $exchange->perform();
93 93
                 }
94 94
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      */
122 122
     public function storeConfirmation(Request $request)
123 123
     {
124
-        $exchange = DB::transaction(function () use ($request) {
124
+        $exchange = DB::transaction(function() use ($request) {
125 125
             $this->validate($request, [
126 126
                 'exchange_id' => 'exists:exchanges,id',
127 127
             ]);
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     public function storeDecline(Request $request)
150 150
     {
151
-        $exchange = DB::transaction(function () use ($request) {
151
+        $exchange = DB::transaction(function() use ($request) {
152 152
             $this->validate($request, [
153 153
                 'exchange_id' => 'exists:exchanges,id',
154 154
             ]);
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
      */
178 178
     public function destroy(Request $request)
179 179
     {
180
-        DB::transaction(function () use ($request) {
180
+        DB::transaction(function() use ($request) {
181 181
             $this->validate($request, [
182 182
                 'exchange_id' => 'exists:exchanges,id',
183 183
             ]);
Please login to merge, or discard this patch.