Passed
Push — master ( 8948f6...fcfe9e )
by Petr
02:59
created
php-src/Rules/UrlExists.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     public function validate(IValidate $entry): void
19 19
     {
20 20
         $headers = @get_headers(strval($entry->getValue()));
21
-        if (!empty($headers) && (false !== mb_strpos($headers[0], '200') )) {
21
+        if (!empty($headers) && (false !== mb_strpos($headers[0], '200'))) {
22 22
             return;
23 23
         }
24 24
         throw new RuleException(sprintf($this->errorText, $entry->getKey()));
Please login to merge, or discard this patch.
php-src/Rules/TCheckRules.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         if (!is_object($singleRule)) {
39 39
             throw new RuleException('Input is not an object.');
40 40
         }
41
-        if (! ( ($singleRule instanceof ARule) || ($singleRule instanceof File\AFileRule) ) ) {
41
+        if (!(($singleRule instanceof ARule) || ($singleRule instanceof File\AFileRule))) {
42 42
             throw new RuleException(sprintf('Input %s is not instance of ARule or AFileRule.', get_class($singleRule)));
43 43
         }
44 44
         return $singleRule;
Please login to merge, or discard this patch.
php-src/Rules/Safe/HashedPassEquals.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 {
19 19
     public function validate(IValidate $entry): void
20 20
     {
21
-        if (!password_verify( strval($entry->getValue()), strval($this->againstValue) )) {
21
+        if (!password_verify(strval($entry->getValue()), strval($this->againstValue))) {
22 22
             throw new RuleException($this->errorText);
23 23
         }
24 24
     }
Please login to merge, or discard this patch.
php-src/Rules/Safe/HashedFuncEquals.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 {
18 18
     public function validate(IValidate $entry): void
19 19
     {
20
-        if (!hash_equals( strval($this->againstValue), strval($entry->getValue()) )) {
20
+        if (!hash_equals(strval($this->againstValue), strval($entry->getValue()))) {
21 21
             throw new RuleException($this->errorText);
22 22
         }
23 23
     }
Please login to merge, or discard this patch.
php-src/Rules/TCheckEntry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
         if (!is_object($againstValue)) {
27 27
             throw new RuleException('Input is not an object.');
28 28
         }
29
-        if (! ($againstValue instanceof IValidate) ) {
29
+        if (!($againstValue instanceof IValidate)) {
30 30
             throw new RuleException(sprintf('Input %s is not instance of IValidate.', get_class($againstValue)));
31 31
         }
32 32
         return $againstValue;
Please login to merge, or discard this patch.
php-src/Rules/File/FileMaxSize.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,15 +33,15 @@
 block discarded – undo
33 33
         $posM = stripos($string, 'm');
34 34
         $posG = stripos($string, 'g');
35 35
         if (false !== $posK) {
36
-            list($value, ) = (array) explode(strval(substr($string, $posK, 1)), $string);
36
+            list($value,) = (array) explode(strval(substr($string, $posK, 1)), $string);
37 37
             $value = floatval($value);
38 38
             $size = intval($value * 1024);
39 39
         } elseif (false !== $posM) {
40
-            list($value, ) = (array) explode(strval(substr($string, $posM, 1)), $string);
40
+            list($value,) = (array) explode(strval(substr($string, $posM, 1)), $string);
41 41
             $value = floatval($value);
42 42
             $size = intval($value * 1024 * 1024);
43 43
         } elseif (false !== $posG) {
44
-            list($value, ) = (array) explode(strval(substr($string, $posG, 1)), $string);
44
+            list($value,) = (array) explode(strval(substr($string, $posG, 1)), $string);
45 45
             $value = floatval($value);
46 46
             $size = intval($value * 1024 * 1024 * 1024);
47 47
         }
Please login to merge, or discard this patch.
php-src/Rules/File/FileMimeEquals.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     public function validate(IValidateFile $entry): void
22 22
     {
23 23
         $filename = $entry->getTempName();
24
-        $finfo =  new finfo(FILEINFO_MIME_TYPE);
24
+        $finfo = new finfo(FILEINFO_MIME_TYPE);
25 25
         if (!empty($filename) && ($finfo->file($filename) == $this->againstValue)) {
26 26
             return;
27 27
         }
Please login to merge, or discard this patch.
php-src/Rules/External/IsPostCode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     public function validate(IValidate $entry): void
38 38
     {
39 39
         if (!isset(static::$codes[$this->againstValue])) {
40
-            throw new RuleException(sprintf('Unknown preset ISO key for country %s', $this->againstValue) );
40
+            throw new RuleException(sprintf('Unknown preset ISO key for country %s', $this->againstValue));
41 41
         }
42 42
         $rule = static::$codes[$this->againstValue];
43 43
         if (empty($rule['Regex']) && empty($entry->getValue())) {
Please login to merge, or discard this patch.
php-src/Rules/Factory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@
 block discarded – undo
52 52
 //        IRules::IS_POST_CODE           => External\IsPostCode::class,  // too many formats for simple check, use regex
53 53
 //        IRules::IS_TELEPHONE           => External\IsPhone::class,  // too many formats for simple check, use regex
54 54
 //        IRules::IS_EU_VAT              => External\IsEuVat::class,  // too many formats, needs some library for checking
55
-        IRules::IS_DATE                => External\IsDate::class,  // too many formats, needs some library for checking
56
-        IRules::IS_DATE_REGEX          => External\IsDateRegex::class,  // too many formats, needs some library for checking
55
+        IRules::IS_DATE                => External\IsDate::class, // too many formats, needs some library for checking
56
+        IRules::IS_DATE_REGEX          => External\IsDateRegex::class, // too many formats, needs some library for checking
57 57
         IRules::SAFE_EQUALS_BASIC      => Safe\HashedBasicEquals::class,
58 58
         IRules::SAFE_EQUALS_FUNC       => Safe\HashedFuncEquals::class,
59 59
         IRules::SAFE_EQUALS_PASS       => Safe\HashedPassEquals::class,
Please login to merge, or discard this patch.