Overtrue\Validation\Validator::getPresentCount PHP Method

getPresentCount() protected method

Get the number of attributes in a list that are present.
protected getPresentCount ( array $attributes ) : integer
$attributes array
return integer
    protected function getPresentCount($attributes)
    {
        $count = 0;
        foreach ($attributes as $key) {
            if (array_get($this->data, $key) || array_get($this->files, $key)) {
                ++$count;
            }
        }
        return $count;
    }
Validator