@@ -18,22 +18,22 @@ |
||
18 | 18 | public function dimensions(array $dimensions) |
19 | 19 | { |
20 | 20 | $dimensions = collect($dimensions) |
21 | - ->map(function ($key, $value) { |
|
21 | + ->map(function($key, $value) { |
|
22 | 22 | return "$key=$value"; |
23 | 23 | }) |
24 | 24 | ->implode(',', ''); |
25 | 25 | |
26 | - return $this->rule('mimes:' . $dimensions); |
|
26 | + return $this->rule('mimes:'.$dimensions); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | public function mimes(string ...$extensions) |
30 | 30 | { |
31 | - return $this->rule('mimes:' . implode(',', $extensions)); |
|
31 | + return $this->rule('mimes:'.implode(',', $extensions)); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | public function mimeTypes(string ...$types) |
35 | 35 | { |
36 | - return $this->rule('mimetypes:' . implode(',', $types)); |
|
36 | + return $this->rule('mimetypes:'.implode(',', $types)); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | public function size(int $size) |
@@ -32,33 +32,33 @@ |
||
32 | 32 | |
33 | 33 | public function requiredIfField(string $field, ...$values) |
34 | 34 | { |
35 | - return $this->rule("required_if:$field, " . implode(',', $values)); |
|
35 | + return $this->rule("required_if:$field, ".implode(',', $values)); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | public function requiredUnlessField(string $field, ...$values) |
39 | 39 | { |
40 | - return $this->rule("required_unless:$field," . implode(',', $values)); |
|
40 | + return $this->rule("required_unless:$field,".implode(',', $values)); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | |
44 | 44 | public function requiredWith(string ...$fields) |
45 | 45 | { |
46 | - return $this->rule("required_with:" . implode(',', $fields)); |
|
46 | + return $this->rule("required_with:".implode(',', $fields)); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | public function requiredWithAll(string ...$fields) |
50 | 50 | { |
51 | - return $this->rule("required_with_all:" . implode(',', $fields)); |
|
51 | + return $this->rule("required_with_all:".implode(',', $fields)); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | public function requiredWithout(string ...$fields) |
55 | 55 | { |
56 | - return $this->rule("required_without:" . implode(',', $fields)); |
|
56 | + return $this->rule("required_without:".implode(',', $fields)); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | public function requiredWithoutAll(string ...$fields) |
60 | 60 | { |
61 | - return $this->rule("required_without_all:" . implode(',', $fields)); |
|
61 | + return $this->rule("required_without_all:".implode(',', $fields)); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | public function distinct() |
@@ -28,22 +28,22 @@ |
||
28 | 28 | |
29 | 29 | public function startsWith(string ...$values) |
30 | 30 | { |
31 | - return $this->rule('starts_with:' . implode(',', $values)); |
|
31 | + return $this->rule('starts_with:'.implode(',', $values)); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | public function endsWith(string ...$values) |
35 | 35 | { |
36 | - return $this->rule('ends_with:' . implode(',', $values)); |
|
36 | + return $this->rule('ends_with:'.implode(',', $values)); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | public function in(string ...$values) |
40 | 40 | { |
41 | - return $this->rule('in:' . implode(',', $values)); |
|
41 | + return $this->rule('in:'.implode(',', $values)); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | public function notIn(string ...$values) |
45 | 45 | { |
46 | - return $this->rule('not_in:' . implode(',', $values)); |
|
46 | + return $this->rule('not_in:'.implode(',', $values)); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | public function notRegex(string $regex) |
@@ -78,8 +78,9 @@ |
||
78 | 78 | |
79 | 79 | public function password(?string $guard = null) |
80 | 80 | { |
81 | - if ($guard === null) |
|
82 | - return $this->rule('guard'); |
|
81 | + if ($guard === null) { |
|
82 | + return $this->rule('guard'); |
|
83 | + } |
|
83 | 84 | return $this->rule("guard:$guard"); |
84 | 85 | } |
85 | 86 |