@@ -87,11 +87,11 @@ discard block |
||
87 | 87 | |
88 | 88 | |
89 | 89 | // Does the property exist on this object? |
90 | - if (! property_exists($this, $property)) { |
|
90 | + if (!property_exists($this, $property)) { |
|
91 | 91 | return; |
92 | 92 | } |
93 | 93 | |
94 | - $this->{$property} = $params[0] ?? null; |
|
94 | + $this->{$property} = $params[ 0 ] ?? null; |
|
95 | 95 | |
96 | 96 | return $this; |
97 | 97 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | { |
141 | 141 | $otp = OtpModel::where('identifier', $identifier)->first(); |
142 | 142 | |
143 | - if (! $otp) { |
|
143 | + if (!$otp) { |
|
144 | 144 | return (object) [ |
145 | 145 | 'status' => false, |
146 | 146 | 'message' => 'Otp does not exists, Please generate new Otp', |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | { |
181 | 181 | $otp = OtpModel::where('identifier', $identifier)->first(); |
182 | 182 | |
183 | - if (! $otp) { |
|
183 | + if (!$otp) { |
|
184 | 184 | return (object) [ |
185 | 185 | 'status' => false, |
186 | 186 | 'message' => 'Otp does not exists, Please generate new Otp', |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | $length = strlen($characters); |
211 | 211 | $pin = ''; |
212 | 212 | for ($i = 0; $i < $this->length; $i++) { |
213 | - $pin .= $characters[rand(0, $length - 1)]; |
|
213 | + $pin .= $characters[ rand(0, $length - 1) ]; |
|
214 | 214 | } |
215 | 215 | |
216 | 216 | return $pin; |
@@ -16,8 +16,8 @@ |
||
16 | 16 | * @return void |
17 | 17 | */ |
18 | 18 | |
19 | - public const DB = __DIR__.'/../database/migrations'; |
|
20 | - public const CONFIG = __DIR__.'/../config/otp-generator.php'; |
|
19 | + public const DB = __DIR__.'/../database/migrations'; |
|
20 | + public const CONFIG = __DIR__.'/../config/otp-generator.php'; |
|
21 | 21 | |
22 | 22 | public function boot() |
23 | 23 | { |
@@ -16,8 +16,8 @@ |
||
16 | 16 | * @return void |
17 | 17 | */ |
18 | 18 | |
19 | - public const DB = __DIR__.'/../database/migrations'; |
|
20 | - public const CONFIG = __DIR__.'/../config/otp-generator.php'; |
|
19 | + public const DB = __DIR__ . '/../database/migrations'; |
|
20 | + public const CONFIG = __DIR__ . '/../config/otp-generator.php'; |
|
21 | 21 | |
22 | 22 | public function boot() |
23 | 23 | { |
@@ -29,10 +29,10 @@ discard block |
||
29 | 29 | public function handle() |
30 | 30 | { |
31 | 31 | $this->comment('Publishing Otp Generator Service Provider...'); |
32 | - $this->callSilent('vendor:publish', ['--tag' => 'otp-provider']); |
|
32 | + $this->callSilent('vendor:publish', [ '--tag' => 'otp-provider' ]); |
|
33 | 33 | |
34 | 34 | $this->comment('Publishing Otp Generator Configuration...'); |
35 | - $this->callSilent('vendor:publish', ['--tag' => 'otp-config']); |
|
35 | + $this->callSilent('vendor:publish', [ '--tag' => 'otp-config' ]); |
|
36 | 36 | |
37 | 37 | $this->registerTelescopeServiceProvider(); |
38 | 38 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | $appConfig = file_get_contents(config_path('app.php')); |
52 | 52 | |
53 | - if (Str::contains($appConfig, $namespace.'\\Providers\\OtpGeneratorServiceProvider::class')) { |
|
53 | + if (Str::contains($appConfig, $namespace . '\\Providers\\OtpGeneratorServiceProvider::class')) { |
|
54 | 54 | return; |
55 | 55 | } |
56 | 56 | |
@@ -60,11 +60,11 @@ discard block |
||
60 | 60 | "\n" => substr_count($appConfig, "\n"), |
61 | 61 | ]; |
62 | 62 | |
63 | - $eol = array_keys($lineEndingCount, max($lineEndingCount))[0]; |
|
63 | + $eol = array_keys($lineEndingCount, max($lineEndingCount))[ 0 ]; |
|
64 | 64 | |
65 | 65 | file_put_contents(config_path('app.php'), str_replace( |
66 | - "{$namespace}\\Providers\RouteServiceProvider::class,".$eol, |
|
67 | - "{$namespace}\\Providers\RouteServiceProvider::class,".$eol." {$namespace}\Providers\OtpGeneratorServiceProvider::class,".$eol, |
|
66 | + "{$namespace}\\Providers\RouteServiceProvider::class," . $eol, |
|
67 | + "{$namespace}\\Providers\RouteServiceProvider::class," . $eol . " {$namespace}\Providers\OtpGeneratorServiceProvider::class," . $eol, |
|
68 | 68 | $appConfig |
69 | 69 | )); |
70 | 70 |
@@ -29,6 +29,6 @@ |
||
29 | 29 | */ |
30 | 30 | public function handle(PrunableRepository $repository) |
31 | 31 | { |
32 | - $this->info($repository->prune(now()->subMinutes($this->option('minutes'))).' entries pruned.'); |
|
32 | + $this->info($repository->prune(now()->subMinutes($this->option('minutes'))) . ' entries pruned.'); |
|
33 | 33 | } |
34 | 34 | } |
35 | 35 | \ No newline at end of file |