@@ -83,12 +83,12 @@ discard block |
||
| 83 | 83 | parent::init(); |
| 84 | 84 | if ($this->in === null) { |
| 85 | 85 | throw new InvalidConfigException('The `in` parameter is required.'); |
| 86 | - } elseif (! is_array($this->in) && count(preg_split('/\s*,\s*/', $this->in, -1, PREG_SPLIT_NO_EMPTY)) <= 1) { |
|
| 86 | + } elseif (!is_array($this->in) && count(preg_split('/\s*,\s*/', $this->in, -1, PREG_SPLIT_NO_EMPTY)) <= 1) { |
|
| 87 | 87 | throw new InvalidConfigException('The `in` parameter must have at least 2 attributes.'); |
| 88 | 88 | } |
| 89 | 89 | if ($this->message === null) { |
| 90 | 90 | $this->message = 'You must fill at least {min} of the attributes {attributes}.'; |
| 91 | - if($this->max > 0) { |
|
| 91 | + if ($this->max > 0) { |
|
| 92 | 92 | $this->message .= ' And at most {max} attribute(s).'; |
| 93 | 93 | } |
| 94 | 94 | } |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | foreach ($attributes as $attributeName) { |
| 106 | 106 | $value = $model->$attributeName; |
| 107 | - $attributesListLabels[] = '"' . $model->getAttributeLabel($attributeName). '"'; |
|
| 107 | + $attributesListLabels[] = '"' . $model->getAttributeLabel($attributeName) . '"'; |
|
| 108 | 108 | $chosen += !empty($value) ? 1 : 0; |
| 109 | 109 | } |
| 110 | 110 | |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | public function clientValidateAttribute($model, $attribute, $view) |
| 130 | 130 | { |
| 131 | 131 | $attributes = is_array($this->in) ? $this->in : preg_split('/\s*,\s*/', $this->in, -1, PREG_SPLIT_NO_EMPTY); |
| 132 | - $attributes = array_map('strtolower',$attributes); // yii lowercases attributes |
|
| 132 | + $attributes = array_map('strtolower', $attributes); // yii lowercases attributes |
|
| 133 | 133 | $attributesJson = json_encode($attributes); |
| 134 | 134 | |
| 135 | 135 | $attributesLabels = []; |