for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Install GitHub App
<?php
/*
* This file is part of Respect/Validation.
*
* (c) Alexandre Gomes Gaigalas <[email protected]>
* For the full copyright and license information, please view the "LICENSE.md"
* file that was distributed with this source code.
*/
namespace Respect\Validation\Rules;
/**
* Abstract class to handle nested rules.
abstract class AbstractNested implements RuleInterface
{
* @var RuleInterface[]
private $rules = [];
* @param RuleInterface ...$rules
public function __construct()
// HHVM has no support for variadics
$this->addRules(func_get_args());
}
* @return RuleInterface[]
public function getRules()
return $this->rules;
* @param RuleInterface $rule
public function addRule(RuleInterface $rule)
$this->rules[] = $rule;
* @param RuleInterface[] $rules
public function addRules(array $rules)
foreach ($rules as $key => $spec) {
$this->addRule($spec);
return $this;