Completed
Push — master ( 231533...5f2fb4 )
by onixsib
02:09
created
IPv6Validator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
 		// filter_var suxx
32 32
 		if (!preg_match('/^(((?=(?>.*?(::))(?!.+\3)))\3?|([\dA-F]{1,4}(\3|:(?!$)|$)|\2))(?4){5}((?4){2}|((2[0-4]|1\d|[1-9])?\d|25[0-5])(\.(?7)){3})\z/i', $string)) {
33
-			$this->addError($model, $attribute, Yii::t('yii', 'This in not valid IPv6 address {sample}', ['sample' => '::1']));
33
+			$this->addError($model, $attribute, Yii::t('yii', 'This in not valid IPv6 address {sample}', [ 'sample' => '::1' ]));
34 34
 		}
35 35
 	}
36 36
 }
Please login to merge, or discard this patch.
NetAddressValidator.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -17,15 +17,15 @@
 block discarded – undo
17 17
  */
18 18
 class NetAddressValidator extends Validator {
19 19
 	/**
20
-     * @inheritdoc
21
-     */
22
-    public function init()
23
-    {
24
-        parent::init();
25
-        if ($this->message === null) {
26
-            $this->message = Yii::t('yii', "{attribute} is invalid.");
27
-        }
28
-    }
20
+	 * @inheritdoc
21
+	 */
22
+	public function init()
23
+	{
24
+		parent::init();
25
+		if ($this->message === null) {
26
+			$this->message = Yii::t('yii', "{attribute} is invalid.");
27
+		}
28
+	}
29 29
 
30 30
 	public function validateAttribute($model, $attribute) {
31 31
 		$string = $model->{$attribute};
Please login to merge, or discard this patch.
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@
 block discarded – undo
32 32
 
33 33
 
34 34
 // filter_var suxx
35
-		if (!
36
-			(
35
+		if (!(
37 36
 				(preg_match('/^((2[0-4]|1\d|[1-9])?\d|25[0-5])(\.(?1)){3}\z/', $string) && 
38 37
 				(preg_match('/^(((?=(?>.*?(::))(?!.+\3)))\3?|([\dA-F]{1,4}(\3|:(?!$)|$)|\2))(?4){5}((?4){2}|((2[0-4]|1\d|[1-9])?\d|25[0-5])(\.(?7)){3})\z/i', $string) && 
39 38
 				(preg_match('/^([0-9a-F]{1,2}[\.:-]){5}([0-9a-F]{1,2})$/', $string) 
Please login to merge, or discard this patch.
MACValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
 		// filter_var suxx
32 32
 		if (!preg_match('/^([0-9a-F]{1,2}[\.:-]){5}([0-9a-F]{1,2})$/', $string)) {
33
-			$this->addError($model, $attribute, Yii::t('yii', 'This in not valid MAC address {sample}', ['sample' => '00:00:00:00:00:01']));
33
+			$this->addError($model, $attribute, Yii::t('yii', 'This in not valid MAC address {sample}', [ 'sample' => '00:00:00:00:00:01' ]));
34 34
 			return false;
35 35
 		}
36 36
 	}
Please login to merge, or discard this patch.
IPv4Validator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
 		// filter_var suxx
32 32
 		if (!preg_match('/^((2[0-4]|1\d|[1-9])?\d|25[0-5])(\.(?1)){3}\z/', $string)) {
33
-			$this->addError($model, $attribute, Yii::t('yii', 'This in not valid IPv4 address {sample}', ['sample' => '127.0.0.1']));
33
+			$this->addError($model, $attribute, Yii::t('yii', 'This in not valid IPv4 address {sample}', [ 'sample' => '127.0.0.1' ]));
34 34
 			return false;
35 35
 		}
36 36
 	}
Please login to merge, or discard this patch.