@@ -46,7 +46,7 @@ |
||
46 | 46 | */ |
47 | 47 | public function register(): void |
48 | 48 | { |
49 | - \Validator::extend($this->getValidationRule(), function ($attribute, $value, $parameters, $validator) { |
|
49 | + \Validator::extend($this->getValidationRule(), function($attribute, $value, $parameters, $validator) { |
|
50 | 50 | return $this->rule($attribute, $value, $parameters, $validator); |
51 | 51 | }); |
52 | 52 | \Validator::replacer($this->getValidationRule(), 'ValidationMessages@message'); |
@@ -37,10 +37,10 @@ discard block |
||
37 | 37 | public function boot() |
38 | 38 | { |
39 | 39 | $this->publishes([ |
40 | - __DIR__.'/lang/validation/'.App::getLocale().'.php' => resource_path('lang/validation/'.App::getLocale().'.php'), |
|
40 | + __DIR__ . '/lang/validation/' . App::getLocale() . '.php' => resource_path('lang/validation/' . App::getLocale() . '.php'), |
|
41 | 41 | ]); |
42 | 42 | |
43 | - foreach (glob(__DIR__.'/Rules/*.php') as $file) { |
|
43 | + foreach (glob(__DIR__ . '/Rules/*.php') as $file) { |
|
44 | 44 | require_once $file; |
45 | 45 | |
46 | 46 | // get the file name of the current file without the extension |
@@ -48,8 +48,8 @@ discard block |
||
48 | 48 | $class = basename($file, '.php'); |
49 | 49 | |
50 | 50 | $Rule = 'Iamfarhad\Validation\Rules'; |
51 | - if (class_exists($Rule.'\\'.$class)) { |
|
52 | - $reflectionClass = new \ReflectionClass($Rule.'\\'.$class); |
|
51 | + if (class_exists($Rule . '\\' . $class)) { |
|
52 | + $reflectionClass = new \ReflectionClass($Rule . '\\' . $class); |
|
53 | 53 | if (!$reflectionClass->implementsInterface(ValidationRuleInterface::class)) { |
54 | 54 | throw new \Exception('this extenstion is not instance of ValidationRuleInterface'); |
55 | 55 | } |
@@ -16,9 +16,9 @@ |
||
16 | 16 | } |
17 | 17 | $sub = 0; |
18 | 18 | if (strlen($value) == 8) { |
19 | - $value = '00'.$value; |
|
19 | + $value = '00' . $value; |
|
20 | 20 | } elseif (strlen($value) == 9) { |
21 | - $value = '0'.$value; |
|
21 | + $value = '0' . $value; |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | for ($i = 0; $i <= 8; $i++) { |
@@ -25,7 +25,7 @@ |
||
25 | 25 | foreach (range(10, 35) as $tempvalue) { |
26 | 26 | $ibanReplaceValues[] = strval($tempvalue); |
27 | 27 | } |
28 | - $tmpIBAN = substr($value, 4).substr($value, 0, 4); |
|
28 | + $tmpIBAN = substr($value, 4) . substr($value, 0, 4); |
|
29 | 29 | $tmpIBAN = str_replace($ibanReplaceChars, $ibanReplaceValues, $tmpIBAN); |
30 | 30 | $tmpValue = intval(substr($tmpIBAN, 0, 1)); |
31 | 31 | for ($i = 1; $i < strlen($tmpIBAN); $i++) { |
@@ -19,12 +19,12 @@ |
||
19 | 19 | |
20 | 20 | public function __construct() |
21 | 21 | { |
22 | - $app_lang = resource_path('lang/validation/'.App::getLocale().'.php'); |
|
22 | + $app_lang = resource_path('lang/validation/' . App::getLocale() . '.php'); |
|
23 | 23 | |
24 | 24 | if (!file_exists($app_lang)) { |
25 | 25 | $this->lang = include $app_lang; |
26 | 26 | } else { |
27 | - $this->lang = include __DIR__.'/lang/validation/'.App::getLocale().'.php'; |
|
27 | + $this->lang = include __DIR__ . '/lang/validation/' . App::getLocale() . '.php'; |
|
28 | 28 | } |
29 | 29 | } |
30 | 30 |