HOME


5h-3LL 1.0
DIR: /opt/cpanel/ea-wappspector/vendor/rector/rector/src/Util
/opt/cpanel/ea-wappspector/vendor/rector/rector/src/Util/
Upload File:
Current File : /opt/cpanel/ea-wappspector/vendor/rector/rector/src/Util/ArrayChecker.php
<?php

declare (strict_types=1);
namespace Rector\Util;

final class ArrayChecker
{
    /**
     * @param mixed[] $elements
     * @param callable(mixed $element): bool $callable
     */
    public function doesExist(array $elements, callable $callable) : bool
    {
        foreach ($elements as $element) {
            $isFound = $callable($element);
            if ($isFound) {
                return \true;
            }
        }
        return \false;
    }
}