Return a list of the sources for all of the declared rules
@return array
776130
protected function getAspectSources()
	{
		$sources = array();

		foreach ( Formula::$ruleNames as $ruleName )
		{
			$rule = $this->$ruleName;
			if ( ! isset( $rule['source'] ) ) continue;
			$sources[ $ruleName ] = $rule['source'];
		}

		return $sources;
	}
65412
public function rules(): array
    {
        $input = array_keys($this->request->all());

        return Parameter::whereIn('id', $input)
            ->get()
            ->mapWithKeys(function ($item) {
                return [$item['id'] => $item->rules];
            })->all();
    }
1074674
public static function getValidatedFields()
    {
        $fields = [];

        foreach (static::getRulesGroups() as $groupName) {
            $fields = array_merge($fields, array_keys(static::getRulesGroup($groupName)));
        }

        return array_values(array_unique($fields));
    }
1215806
public function rules(): array
    {
        $user = $this->route('ability') ?? new Ability();
        $user->updateRulesUniques();
        $rules = $user->getRules();
        $rules['roles'] = 'nullable|array';

        return $rules;
    }
127112
public function rules() : array
    {
        $referral = mb_strtolower($this->request->get('referral') ?? 'profile');

        $resolver = 'rulesFor' . ucfirst($referral);

        return $this->$resolver();
    }
476704
public static function getRules()
    {
        $instance = static::getInstance();

        $fillables = $instance->getFillables();

        $structure = $instance->getStructure();

        $rules = $instance->rules;

        if(!$rules){
            $rules = [];

            foreach($structure as $key => $column){
                $rules[$key] = '';
            }
        }

        return $rules;
    }
196092
public function rules()
    {
        if ($this->parsedRules !== null) {
            return $this->parsedRules;
        }

        $rules = $this->buildRules();

        $this->callBeforeListeners('parseRules', [&$rules]);
        $rules = $this->parseRules($rules);
        $this->callAfterListeners('parseRules', [&$rules]);

        $this->parsedRules = $rules;

        return $this->parsedRules;
    }
1052268
public function getDetailMessages()
    {
        $messages = array();
        foreach ($this->invalidRules as $field => $rules) {
            foreach ($rules as $rule) {
                $messages[$field][$rule] = $this->ruleValidators[$field][$rule]->getMessages();
            }
        }
        return $messages;
    }
727838
public function list_rules()
    {
        $result = array();
        $i      = 1;

        foreach ($this->script as $idx => $filter) {
            if (empty($filter['actions'])) {
                continue;
            }
            $fname = $filter['name'] ?: "#$i";
            $result[] = array(
                'id'    => $idx,
                'name'  => $fname,
                'class' => $filter['disabled'] ? 'disabled' : '',
            );
            $i++;
        }

        return $result;
    }
1302438
protected static function getRulesGroups()
    {
        $groups = [];

        foreach (get_class_vars(get_called_class()) as $property => $val) {
            if (preg_match('/^.*rules$/i', $property)) {
                $groups[] = $property;
            }
        }

        return $groups;
    }
1175039
protected function getRules()
    {
        if ($this->compiledRules === null) {
            $rules = array();
            foreach ($this->ruleFiles as $file) {
                $rules = array_merge(
                    $rules,
                    $this->parser->parse($file)
                );
            }

            $this->compiledRules = $this->compiler->compile($rules);
        }

        return $this->compiledRules;
    }
1217894
protected function getMessages()
    {
        $messages = [];
        foreach ($this->sourcePath as $namespace => $path) {
            $messages = array_merge($this->getMessagesFromSourcePath($path, $namespace), $messages);
        }

        return $messages;
    }
1308195
protected function getTermRules()
    {
        $rules = [];

        foreach ($this->repository as $field) {
            $rules[$field->getName()] = $field->getOption('rules');
        }

        return $rules;
    }
1266153
public function getRules()
    {
        if (!isset($this->ruleSet)) {
            $this->ruleSet = new PriorityList(RuleInterface::class);
        }
        return $this->ruleSet;
    }
72235
public function getRules()
    {
        $this->defaultParams['num_decimals']    = 2;
        $this->defaultParams['num_decimals']    = 2;
        $this->defaultParams['round_type']      = Formatter::ROUND_CLASSIC;
        $this->defaultParams['decimal_sep']     = '.';
        $this->defaultParams['thousands_sep']   = ' ';
        $this->defaultParams['format_positive'] = '%v %s';
        $this->defaultParams['format_negative'] = '-%v %s';

        return array(
            'eur' => array(
                'symbol' => '€',
                'rate'   => 1,
            ),

            'usd' => array(
                'symbol'          => '$',
                'format_positive' => '%s%v',
                'format_negative' => '-%s%v',
                'rate'            => 0.5,
            ),

            'rub' => array(
                'symbol'      => 'руб.',
                'decimal_sep' => ',',
                'rate'        => 0.02,
            ),

            'uah' => array(
                'symbol'      => 'грн.',
                'decimal_sep' => ',',
                'rate'        => 0.04,
            ),

            'byr' => array(
                'symbol'       => 'Br',
                'round_type'   => Formatter::ROUND_CEIL,
                'round_value'  => '-2',
                'num_decimals' => '0',
                'rate'         => 0.00005,
            ),

            '%'   => array(
                'symbol'          => '%',
                'format_positive' => '%v%s',
                'format_negative' => '-%v%s',
            ),
        );
    }
476291
public function getValidatorMessages()
    {
        $messages = [];
        
        foreach ($this->owner->getValidatorRules() as $rule) {
            
            if ($rule->hasMessage()) {
                $messages[$rule->getType()] = $rule->getMessage();
            }
            
        }
        
        return $messages;
    }
1160079
public function sources()
    {
        if (is_null($this->sourceRequests)) {
            $this->sourceRequests = new SourceRequests($this->client);
        }

        return $this->sourceRequests;
    }