mirror of
https://github.com/Respect/Validation.git
synced 2024-06-07 00:02:33 +02:00
Apply "Squiz.WhiteSpace.MemberVarSpacing"
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
This commit is contained in:
parent
ee1d49a2cf
commit
8e59ec5d4a
|
@ -27,7 +27,9 @@ use function is_scalar;
|
|||
abstract class AbstractRelated extends AbstractRule
|
||||
{
|
||||
public $mandatory = true;
|
||||
|
||||
public $reference = '';
|
||||
|
||||
public $validator;
|
||||
|
||||
abstract public function hasReference($input): bool;
|
||||
|
|
|
@ -26,6 +26,7 @@ use Respect\Validation\Validatable;
|
|||
abstract class AbstractRule implements Validatable
|
||||
{
|
||||
protected $name;
|
||||
|
||||
protected $template;
|
||||
|
||||
public function __invoke($input)
|
||||
|
|
|
@ -26,7 +26,9 @@ use Respect\Validation\Exceptions\ValidationException;
|
|||
class Domain extends AbstractComposite
|
||||
{
|
||||
protected $tld;
|
||||
|
||||
protected $checks = [];
|
||||
|
||||
protected $otherParts;
|
||||
|
||||
public function __construct($tldCheck = true)
|
||||
|
|
|
@ -23,7 +23,9 @@ use Respect\Validation\Validator;
|
|||
class KeyValue extends AbstractRule
|
||||
{
|
||||
public $comparedKey;
|
||||
|
||||
public $ruleName;
|
||||
|
||||
public $baseKey;
|
||||
|
||||
public function __construct($comparedKey, $ruleName, $baseKey)
|
||||
|
|
|
@ -22,6 +22,7 @@ class PostalCode extends AbstractEnvelope
|
|||
{
|
||||
public const DEFAULT_PATTERN = '/^$/';
|
||||
|
||||
// phpcs:disable Squiz.WhiteSpace.MemberVarSpacing.Incorrect
|
||||
// phpcs:disable Generic.Files.LineLength.TooLong
|
||||
/**
|
||||
* @see http://download.geonames.org/export/dump/countryInfo.txt
|
||||
|
|
|
@ -20,6 +20,7 @@ namespace Respect\Validation\Rules;
|
|||
class Sorted extends AbstractRule
|
||||
{
|
||||
public $fn = null;
|
||||
|
||||
public $ascending = true;
|
||||
|
||||
public function __construct(callable $fn = null, bool $ascending = true)
|
||||
|
|
|
@ -21,6 +21,7 @@ namespace Respect\Validation\Rules;
|
|||
class StartsWith extends AbstractRule
|
||||
{
|
||||
public $startValue;
|
||||
|
||||
public $identical;
|
||||
|
||||
public function __construct($startValue, $identical = false)
|
||||
|
|
|
@ -25,6 +25,7 @@ use Respect\Validation\Exceptions\ZendException;
|
|||
class Zend extends AbstractRule
|
||||
{
|
||||
protected $messages = [];
|
||||
|
||||
protected $zendValidator;
|
||||
|
||||
public function __construct($validator, $params = [])
|
||||
|
|
|
@ -68,6 +68,11 @@
|
|||
<property name="spacing" value="1" />
|
||||
<property name="spacingBeforeFirst" value="0" />
|
||||
<property name="spacingAfterLast" value="0" />
|
||||
</rule>
|
||||
<rule ref="Squiz.WhiteSpace.MemberVarSpacing">
|
||||
<properties>
|
||||
<property name="spacing" value="1" />
|
||||
<property name="spacingBeforeFirst" value="0" />
|
||||
</properties>
|
||||
</rule>
|
||||
</ruleset>
|
||||
|
|
|
@ -81,6 +81,7 @@ final class AttributeTest extends RuleTestCase
|
|||
{
|
||||
return new class() {
|
||||
public const PROPERTY_VALUE = 'foo';
|
||||
|
||||
private $bar = self::PROPERTY_VALUE;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue