src/Validators/RequiredConstants.php
public function validate(string ...$constantNames): ResultInterface
    {
        $notDefined = array_filter(
            $constantNames,
            function (string $key): bool {
                // phpcs:ignore WordPressVIPMinimum.Constants.ConstantString.NotCheckingConstantName
                return ! defined($key);
            }
        );

        return $this->report(...$notDefined);
    }
public function validate(string ...$constantNames): ResultInterface
    {
        $notDefined = array_filter(
            $constantNames,
            function (string $key): bool {
                // phpcs:ignore WordPressVIPMinimum.Constants.ConstantString.NotCheckingConstantName
                return ! defined($key);
            }
        );

        return $this->report(...$notDefined);
    }
public function validate ( string ... $ constantNames ) : ResultInterface { $ notDefined = array_filter ( $ constantNames , function ( string $ key ) : bool { // phpcs:ignore WordPressVIPMinimum.Constants.ConstantString.NotCheckingConstantName return ! defined ( $ key ) ; } ) ; return $ this -> report ( ... $ notDefined ) ; }
Validates constants are defined.

@param string|string[] ...$constantNames Constants to be checked.

@return Success|Failure
Validates constants are defined .