@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | $param = $request->getParam($key); |
66 | 66 | try { |
67 | 67 | $validator->assert($param); |
68 | - } catch(NestedValidationException $exception) { |
|
69 | - if($this->translator){ |
|
68 | + } catch (NestedValidationException $exception) { |
|
69 | + if ($this->translator) { |
|
70 | 70 | $exception->setParam('translator', $this->translator); |
71 | 71 | } |
72 | 72 | $this->errors[$key] = $exception->getMessages(); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | * Check if there are any errors. |
81 | 81 | * @return boolean |
82 | 82 | */ |
83 | - public function hasErrors(){ |
|
83 | + public function hasErrors() { |
|
84 | 84 | return !empty($this->errors); |
85 | 85 | } |
86 | 86 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | * Get errors. |
89 | 89 | * @return array The errors array. |
90 | 90 | */ |
91 | - public function getErrors(){ |
|
91 | + public function getErrors() { |
|
92 | 92 | return $this->errors; |
93 | 93 | } |
94 | 94 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | * Get validators. |
97 | 97 | * @return array The validators array. |
98 | 98 | */ |
99 | - public function getValidators(){ |
|
99 | + public function getValidators() { |
|
100 | 100 | return $this->validators; |
101 | 101 | } |
102 | 102 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | * Set validators. |
105 | 105 | * @param array $validators The validators array. |
106 | 106 | */ |
107 | - public function setValidators($validators){ |
|
107 | + public function setValidators($validators) { |
|
108 | 108 | $this->validators = $validators; |
109 | 109 | } |
110 | 110 | |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | * Get translator. |
113 | 113 | * @return callable The translator. |
114 | 114 | */ |
115 | - public function getTranslator(){ |
|
115 | + public function getTranslator() { |
|
116 | 116 | return $this->translator; |
117 | 117 | } |
118 | 118 | |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | * Set translator. |
121 | 121 | * @param callable $translator The translator. |
122 | 122 | */ |
123 | - public function setTranslator($translator){ |
|
123 | + public function setTranslator($translator) { |
|
124 | 124 | $this->translator = $translator; |
125 | 125 | } |
126 | 126 | } |