PHP 8.3.31
Preview: In.php Size: 1.20 KB
/home/getspomw/royalsquad.us/vendor/laravel/framework/src/Illuminate/Validation/Rules/In.php

<?php

namespace Illuminate\Validation\Rules;

use Illuminate\Contracts\Support\Arrayable;
use Stringable;

use function Illuminate\Support\enum_value;

class In implements Stringable
{
    /**
     * The name of the rule.
     *
     * @var string
     */
    protected $rule = 'in';

    /**
     * The accepted values.
     *
     * @var array
     */
    protected $values;

    /**
     * Create a new in rule instance.
     *
     * @param  \Illuminate\Contracts\Support\Arrayable|\BackedEnum|\UnitEnum|array|string  $values
     * @return void
     */
    public function __construct($values)
    {
        if ($values instanceof Arrayable) {
            $values = $values->toArray();
        }

        $this->values = is_array($values) ? $values : func_get_args();
    }

    /**
     * Convert the rule to a validation string.
     *
     * @return string
     *
     * @see \Illuminate\Validation\ValidationRuleParser::parseParameters
     */
    public function __toString()
    {
        $values = array_map(function ($value) {
            $value = enum_value($value);

            return '"'.str_replace('"', '""', $value).'"';
        }, $this->values);

        return $this->rule.':'.implode(',', $values);
    }
}

Directory Contents

Dirs: 0 × Files: 17

Name Size Perms Modified Actions
986 B lrw-rw-rw- 2025-09-17 06:52:58
Edit Download
1.80 KB lrw-rw-rw- 2025-09-17 06:52:58
Edit Download
5.37 KB lrw-rw-rw- 2025-09-17 06:52:58
Edit Download
3.24 KB lrw-rw-rw- 2025-09-17 06:52:58
Edit Download
3.17 KB lrw-rw-rw- 2025-09-17 06:52:58
Edit Download
6.59 KB lrw-rw-rw- 2025-09-17 06:52:58
Edit Download
3.43 KB lrw-rw-rw- 2025-09-17 06:52:58
Edit Download
1.06 KB lrw-rw-rw- 2025-09-17 06:52:58
Edit Download
476 B lrw-rw-rw- 2025-09-17 06:52:58
Edit Download
9.25 KB lrw-rw-rw- 2025-09-17 06:52:58
Edit Download
508 B lrw-rw-rw- 2025-09-17 06:52:58
Edit Download
1.20 KB lrw-rw-rw- 2025-09-17 06:52:58
Edit Download
1.14 KB lrw-rw-rw- 2025-09-17 06:52:58
Edit Download
8.59 KB lrw-rw-rw- 2025-09-17 06:52:58
Edit Download
1.07 KB lrw-rw-rw- 2025-09-17 06:52:58
Edit Download
999 B lrw-rw-rw- 2025-09-17 06:52:58
Edit Download
1.62 KB lrw-rw-rw- 2025-09-17 06:52:58
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).