Passed
Push — master ( 1e4022...971023 )
by Septianata
05:57
created
Category
server.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
  */
9 9
 
10 10
 $uri = urldecode(
11
-    parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
11
+    parse_url($_SERVER[ 'REQUEST_URI' ], PHP_URL_PATH)
12 12
 );
13 13
 
14 14
 // This file allows us to emulate Apache's "mod_rewrite" functionality from the
Please login to merge, or discard this patch.
app/Support/helpers.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 use Illuminate\Support\Carbon;
4 4
 
5
-if (! function_exists('terbilang')) {
5
+if (!function_exists('terbilang')) {
6 6
     /**
7 7
      * Return the given value into readable number.
8 8
      *
@@ -11,49 +11,49 @@  discard block
 block discarded – undo
11 11
      */
12 12
     function terbilang($value): string
13 13
     {
14
-        $result = value(function () use ($value) {
15
-            $angka = ['', 'satu', 'dua', 'tiga', 'empat', 'lima', 'enam', 'tujuh', 'delapan', 'sembilan', 'sepuluh', 'sebelas'];
14
+        $result = value(function() use ($value) {
15
+            $angka = [ '', 'satu', 'dua', 'tiga', 'empat', 'lima', 'enam', 'tujuh', 'delapan', 'sembilan', 'sepuluh', 'sebelas' ];
16 16
 
17 17
             $number = abs($value);
18 18
 
19 19
             switch (true) {
20 20
                 case $number < 12:
21
-                    return ' ' . $angka[$number];
21
+                    return ' '.$angka[ $number ];
22 22
 
23 23
                 case $number < 20:
24
-                    return terbilang($number - 10) . ' belas';
24
+                    return terbilang($number - 10).' belas';
25 25
 
26 26
                 case $number < 100:
27
-                    return terbilang($number / 10) . ' puluh ' . terbilang($number % 10);
27
+                    return terbilang($number / 10).' puluh '.terbilang($number % 10);
28 28
 
29 29
                 case $number < 200:
30
-                    return 'seratus ' . terbilang($number - 100);
30
+                    return 'seratus '.terbilang($number - 100);
31 31
 
32 32
                 case $number < 1000:
33
-                    return terbilang($number / 100) . ' ratus ' . terbilang($number % 100);
33
+                    return terbilang($number / 100).' ratus '.terbilang($number % 100);
34 34
 
35 35
                 case $number < 2000:
36
-                    return 'seribu ' . terbilang($number - 1000);
36
+                    return 'seribu '.terbilang($number - 1000);
37 37
 
38 38
                 case $number < 1000000:
39
-                    return terbilang($number / 1000) . ' ribu ' . terbilang($number % 1000);
39
+                    return terbilang($number / 1000).' ribu '.terbilang($number % 1000);
40 40
 
41 41
                 case $number < 1000000000:
42
-                    return terbilang($number / 1000000) . ' juta ' . terbilang($number % 1000000);
42
+                    return terbilang($number / 1000000).' juta '.terbilang($number % 1000000);
43 43
 
44 44
                 case $number < 1000000000000:
45
-                    return terbilang($number / 1000000000) . ' milyar ' . terbilang($number % 1000000000);
45
+                    return terbilang($number / 1000000000).' milyar '.terbilang($number % 1000000000);
46 46
 
47 47
                 case $number < 1000000000000000:
48
-                    return terbilang($number / 1000000000000) . ' trilyun ' . terbilang($number % 1000000000000);
48
+                    return terbilang($number / 1000000000000).' trilyun '.terbilang($number % 1000000000000);
49 49
             }
50 50
         });
51 51
 
52
-        return trim(($value < 0 ? 'minus ' : '') . $result);
52
+        return trim(($value < 0 ? 'minus ' : '').$result);
53 53
     }
54 54
 }
55 55
 
56
-if (! function_exists('greeting')) {
56
+if (!function_exists('greeting')) {
57 57
     /**
58 58
      * Return specific greeting based on the current hour.
59 59
      *
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     }
81 81
 }
82 82
 
83
-if (! function_exists('gravatar_image')) {
83
+if (!function_exists('gravatar_image')) {
84 84
     /**
85 85
      * Return avatar image url using gravatar.
86 86
      *
Please login to merge, or discard this patch.
app/Support/Model/HasAttributes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function isRelationValueDirty($relations = null): bool
27 27
     {
28
-        $attributes = array_map(function ($name) {
28
+        $attributes = array_map(function($name) {
29 29
             $relation = $this->$name();
30 30
 
31 31
             if (!$relation instanceof Relation || !method_exists($relation, 'getForeignKeyName')) {
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     protected function isCollectionValid(Collection $models, string $className, bool $throwExceptionWhenNotValid = true): bool
55 55
     {
56
-        return $models->every(function (Model $model) use ($className, $throwExceptionWhenNotValid) {
56
+        return $models->every(function(Model $model) use ($className, $throwExceptionWhenNotValid) {
57 57
             $isValid = $model instanceof $className;
58 58
 
59 59
             if (!$isValid && $throwExceptionWhenNotValid) {
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $this->configureRateLimiting();
35 35
 
36
-        $this->routes(function () {
36
+        $this->routes(function() {
37 37
             Route::prefix('api')
38 38
                 ->middleware('api')
39 39
                 ->namespace($this->namespace)
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      */
53 53
     protected function configureRateLimiting()
54 54
     {
55
-        RateLimiter::for('api', function (Request $request) {
55
+        RateLimiter::for ('api', function(Request $request) {
56 56
             return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
57 57
         });
58 58
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/PasswordResetLinkController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     public function store(Request $request)
30 30
     {
31 31
         $request->validate([
32
-            'email' => ['required', 'email'],
32
+            'email' => [ 'required', 'email' ],
33 33
         ]);
34 34
 
35 35
         // We will send the password reset link to this user. Once we have attempted
@@ -42,6 +42,6 @@  discard block
 block discarded – undo
42 42
         return $status == Password::RESET_LINK_SENT
43 43
                     ? back()->with('status', __($status))
44 44
                     : back()->withInput($request->only('email'))
45
-                            ->withErrors(['email' => __($status)]);
45
+                            ->withErrors([ 'email' => __($status) ]);
46 46
     }
47 47
 }
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/ConfirmablePasswordController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */
29 29
     public function store(Request $request)
30 30
     {
31
-        if (! Auth::guard('web')->validate([
31
+        if (!Auth::guard('web')->validate([
32 32
             'email' => $request->user()->email,
33 33
             'password' => $request->password,
34 34
         ])) {
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/NewPasswordController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public function create(Request $request)
22 22
     {
23
-        return view('auth.reset-password', ['request' => $request]);
23
+        return view('auth.reset-password', [ 'request' => $request ]);
24 24
     }
25 25
 
26 26
     /**
@@ -34,9 +34,9 @@  discard block
 block discarded – undo
34 34
     public function store(Request $request)
35 35
     {
36 36
         $request->validate([
37
-            'token' => ['required'],
38
-            'email' => ['required', 'email'],
39
-            'password' => ['required', 'confirmed', Rules\Password::defaults()],
37
+            'token' => [ 'required' ],
38
+            'email' => [ 'required', 'email' ],
39
+            'password' => [ 'required', 'confirmed', Rules\Password::defaults() ],
40 40
         ]);
41 41
 
42 42
         // Here we will attempt to reset the user's password. If it is successful we
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         // database. Otherwise we will parse the error and return the response.
45 45
         $status = Password::reset(
46 46
             $request->only('email', 'password', 'password_confirmation', 'token'),
47
-            function ($user) use ($request) {
47
+            function($user) use ($request) {
48 48
                 $user->forceFill([
49 49
                     'password' => Hash::make($request->password),
50 50
                     'remember_token' => Str::random(60),
@@ -60,6 +60,6 @@  discard block
 block discarded – undo
60 60
         return $status == Password::PASSWORD_RESET
61 61
                     ? redirect()->route('login')->with('status', __($status))
62 62
                     : back()->withInput($request->only('email'))
63
-                            ->withErrors(['email' => __($status)]);
63
+                            ->withErrors([ 'email' => __($status) ]);
64 64
     }
65 65
 }
Please login to merge, or discard this patch.
app/Http/Middleware/RedirectIfAuthenticated.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 $request, Closure $next, ...$guards)
21 21
     {
22
-        $guards = empty($guards) ? [null] : $guards;
22
+        $guards = empty($guards) ? [ null ] : $guards;
23 23
 
24 24
         foreach ($guards as $guard) {
25 25
             if (Auth::guard($guard)->check()) {
Please login to merge, or discard this patch.
app/Http/Middleware/Authenticate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
      */
12 12
     protected function redirectTo($request)
13 13
     {
14
-        if (! $request->expectsJson()) {
14
+        if (!$request->expectsJson()) {
15 15
             return route('login');
16 16
         }
17 17
     }
Please login to merge, or discard this patch.