@@ -91,11 +91,11 @@ |
||
91 | 91 | return [ |
92 | 92 | ['5', '7', true, false], |
93 | 93 | [[new \stdClass()], '7', true, false], |
94 | - [[1,3,5,9], '7', false, false], |
|
95 | - [[1,3,5,9], '5', false, true], |
|
96 | - [['2','4','6','8'], 6, false, true], |
|
97 | - [['abc','def','ghi','jkl'], 'mno', false, false], |
|
98 | - [['abc','def','ghi','jkl'], 'def', false, true], |
|
94 | + [[1, 3, 5, 9], '7', false, false], |
|
95 | + [[1, 3, 5, 9], '5', false, true], |
|
96 | + [['2', '4', '6', '8'], 6, false, true], |
|
97 | + [['abc', 'def', 'ghi', 'jkl'], 'mno', false, false], |
|
98 | + [['abc', 'def', 'ghi', 'jkl'], 'def', false, true], |
|
99 | 99 | ]; |
100 | 100 | } |
101 | 101 |
@@ -35,7 +35,7 @@ |
||
35 | 35 | [123, '', false, false], |
36 | 36 | ['asdf', '', false, false], |
37 | 37 | ['CallbackRulesTest::callMeStatic', null, true, false], |
38 | - ['CallbackRulesTest::callMeStatic', 1, true, true ], |
|
38 | + ['CallbackRulesTest::callMeStatic', 1, true, true], |
|
39 | 39 | [[$this, 'callMeDynamic'], null, true, false], |
40 | 40 | [[$this, 'callMeDynamic'], 1, true, true], |
41 | 41 | ]; |
@@ -20,20 +20,20 @@ |
||
20 | 20 | { |
21 | 21 | return MockFile::init('foo', 'test1.gif', 'text/plain', |
22 | 22 | realpath(implode(DIRECTORY_SEPARATOR, [__DIR__, 'data', 'tester.gif'])), |
23 | - 55, UPLOAD_ERR_OK ); |
|
23 | + 55, UPLOAD_ERR_OK); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | protected function getMockFile() |
27 | 27 | { |
28 | 28 | return MockFile::init('foo', 'text1.txt', 'text/plain', |
29 | 29 | realpath(implode(DIRECTORY_SEPARATOR, [__DIR__, 'data', 'testing.1.txt'])), |
30 | - 13, UPLOAD_ERR_OK ); |
|
30 | + 13, UPLOAD_ERR_OK); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | protected function getMockNoFile() |
34 | 34 | { |
35 | 35 | return MockFile::init('foo', 'text0.txt', 'text/plain', |
36 | - '', 26, UPLOAD_ERR_NO_FILE ); |
|
36 | + '', 26, UPLOAD_ERR_NO_FILE); |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 |
@@ -18,7 +18,7 @@ |
||
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())); |
@@ -38,7 +38,7 @@ |
||
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; |
@@ -18,7 +18,7 @@ |
||
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 | } |
@@ -17,7 +17,7 @@ |
||
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 | } |
@@ -26,7 +26,7 @@ |
||
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; |
@@ -33,15 +33,15 @@ |
||
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 | } |