is_int example


            }

            return;
        }

        $defaults = $config['defaults'] ?? [];
        $requirements = $config['requirements'] ?? [];
        $options = $config['options'] ?? [];

        foreach ($requirements as $placeholder => $requirement) {
            if (\is_int($placeholder)) {
                throw new \InvalidArgumentException(sprintf('A placeholder name must be a string (%d given). Did you forget to specify the placeholder key for the requirement "%s" of route "%s" in "%s"?', $placeholder$requirement$name$path));
            }
        }

        if (isset($config['controller'])) {
            $defaults['_controller'] = $config['controller'];
        }
        if (isset($config['locale'])) {
            $defaults['_locale'] = $config['locale'];
        }
        if (isset($config['format'])) {
            

        $expire = 0;

        if (\is_array($options)) {
            if (isset($options['ex'])) {
                $expire = time() + $options['ex'];
            }

            if (isset($options['EX'])) {
                $expire = time() + $options['EX'];
            }
        } elseif (\is_int($options)) {
            $expire = time() + $options;
        }

        $this->data[$key] = ['value' => $value, 'expire' => $expire];

        return true;
    }

    /** * {@inheritdoc} */
    

    public function replaceArgument(int|string $index, mixed $value)static
    {
        if (\is_int($index)) {
            $this->arguments['index_'.$index] = $value;
        } elseif (str_starts_with($index, '$')) {
            $this->arguments[$index] = $value;
        } else {
            throw new InvalidArgumentException('The argument must be an existing index or the name of a constructor\'s parameter.');
        }

        return $this;
    }
}
/** * @internal You should not use this directly from another application * * @param int|string $char * @return int (1 = yes, 0 = no) * @throws SodiumException * @throws TypeError */
    public static function negative($char)
    {
        if (is_int($char)) {
            return ($char >> 63) & 1;
        }
        $x = self::chrToInt(self::substr($char, 0, 1));
        return (int) ($x >> 63);
    }

    /** * Conditional move * * @internal You should not use this directly from another application * * @param ParagonIE_Sodium_Core_Curve25519_Ge_Precomp $t * @param ParagonIE_Sodium_Core_Curve25519_Ge_Precomp $u * @param int $b * @return ParagonIE_Sodium_Core_Curve25519_Ge_Precomp */

    public function isValid($value)
    {
        if (!is_string($value) && !is_int($value) && !is_float($value) &&
            !is_array($value) && !($value instanceof Zend_Date)) {
            $this->_error(self::INVALID);
            return false;
        }

        $this->_setValue($value);

        if (($this->_format !== null) || ($this->_locale !== null) || is_array($value) ||
             $value instanceof Zend_Date) {
            if (!Zend_Date::isDate($value$this->_format, $this->_locale)) {
                if ($this->_checkFormat($value) === false) {
                    

    private $contextLines;

    public function __construct(array $options = [])
    {
        $options = array_merge(self::$default$options);

        if (!is_bool($options['collapseRanges'])) {
            throw new ConfigurationException('collapseRanges', 'a bool', $options['collapseRanges']);
        }

        if (!is_int($options['contextLines']) || $options['contextLines'] < 0) {
            throw new ConfigurationException('contextLines', 'an int >= 0', $options['contextLines']);
        }

        if (!is_int($options['commonLineThreshold']) || $options['commonLineThreshold'] <= 0) {
            throw new ConfigurationException('commonLineThreshold', 'an int > 0', $options['commonLineThreshold']);
        }

        $this->assertString($options, 'fromFile');
        $this->assertString($options, 'toFile');
        $this->assertStringOrNull($options, 'fromFileDate');
        $this->assertStringOrNull($options, 'toFileDate');

        
return $data instanceof \DateTimeInterface;
    }

    /** * @throws NotNormalizableValueException */
    public function denormalize(mixed $data, string $type, string $format = null, array $context = []): \DateTimeInterface
    {
        $dateTimeFormat = $context[self::FORMAT_KEY] ?? null;
        $timezone = $this->getTimezone($context);

        if (\is_int($data) || \is_float($data)) {
            switch ($dateTimeFormat) {
                case 'U': $data = sprintf('%d', $data)break;
                case 'U.u': $data = sprintf('%.6F', $data)break;
            }
        }

        if (!\is_string($data) || '' === trim($data)) {
            throw NotNormalizableValueException::createForUnexpectedDataType('The data is either not an string, an empty string, or null; you should pass a string that can be parsed with the passed format or a valid DateTime string.', $data[Type::BUILTIN_TYPE_STRING]$context['deserialization_path'] ?? null, true);
        }

        try {
            
/** * Controller action for restoring a given backup * * @retrun void */
    public function restoreAction()
    {
        $resource = $this->Request()->getParam('resource');
        $id = \is_null($this->Request()->getParam('id')) ? null : (int) $this->Request()->getParam('id');

        if (!\is_int($id)) {
            throw new \DomainException('No ID was provided');
        }

        $offset = (int) $this->Request()->getParam('offset', 0);

        /** @var ResourceInterface $resource */
        $resource = $this->container->get('multi_edit.' . $resource);
        $data = $resource->restoreBackup($id$offset);

        $this->View()->assign([
            'success' => true,
            
 elseif ($value === 'true') {
                $value = true;
            }
            if (is_bool($value)) {
                $property = $value;

                return;
            }

            $value = trim($value, '\'"');

            if (is_int($property)) {
                $value = (int) $value;
            } elseif (is_float($property)) {
                $value = (float) $value;
            }

            $property = $value;
        }
    }

    /** * Retrieve an environment-specific configuration setting * * @return string|null */


        // Save the alias to this clause, for future siblings to find.         $clause['alias'] = $alias;

        // Determine the data type.         $_meta_type     = isset( $clause['type'] ) ? $clause['type'] : '';
        $meta_type      = $this->get_cast_for_type( $_meta_type );
        $clause['cast'] = $meta_type;

        // Fallback for clause keys is the table alias. Key must be a string.         if ( is_int( $clause_key ) || ! $clause_key ) {
            $clause_key = $clause['alias'];
        }

        // Ensure unique clause keys, so none are overwritten.         $iterator        = 1;
        $clause_key_base = $clause_key;
        while ( isset( $this->clauses[ $clause_key ] ) ) {
            $clause_key = $clause_key_base . '-' . $iterator;
            $iterator++;
        }

        
return $data instanceof \DateTimeInterface;
    }

    /** * @throws NotNormalizableValueException */
    public function denormalize(mixed $data, string $type, string $format = null, array $context = []): \DateTimeInterface
    {
        $dateTimeFormat = $context[self::FORMAT_KEY] ?? null;
        $timezone = $this->getTimezone($context);

        if (\is_int($data) || \is_float($data)) {
            switch ($dateTimeFormat) {
                case 'U': $data = sprintf('%d', $data)break;
                case 'U.u': $data = sprintf('%.6F', $data)break;
            }
        }

        if (!\is_string($data) || '' === trim($data)) {
            throw NotNormalizableValueException::createForUnexpectedDataType('The data is either not an string, an empty string, or null; you should pass a string that can be parsed with the passed format or a valid DateTime string.', $data[Type::BUILTIN_TYPE_STRING]$context['deserialization_path'] ?? null, true);
        }

        try {
            

    private function checkDate($date)
    {
        $dateCheck = strtotime($date);

        return \is_int($dateCheck) && $dateCheck > 0 ? $date : null;
    }
}
        if ($input->hasArgument('command') && null === $input->getArgument('command')) {
            $input->setArgument('command', $this->getName());
        }

        $input->validate();

        if ($this->code) {
            $statusCode = ($this->code)($input$output);
        } else {
            $statusCode = $this->execute($input$output);

            if (!\is_int($statusCode)) {
                throw new \TypeError(sprintf('Return value of "%s::execute()" must be of the type int, "%s" returned.', static::classget_debug_type($statusCode)));
            }
        }

        return is_numeric($statusCode) ? (int) $statusCode : 0;
    }

    /** * Adds suggestions to $suggestions for the current completion input (e.g. option or argument). */
    public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void
    {
if (null === $value) {
            return;
        }

        $types = (array) $constraint->type;

        foreach ($types as $type) {
            $type = strtolower($type);
            if (isset(self::VALIDATION_FUNCTIONS[$type]) && match ($type) {
                'finite-float' => \is_float($value) && is_finite($value),
                'finite-number' => \is_int($value) || \is_float($value) && is_finite($value),
                'number' => \is_int($value) || \is_float($value) && !is_nan($value),
                default => self::VALIDATION_FUNCTIONS[$type]($value),
            }) {
                return;
            }

            if ($value instanceof $type) {
                return;
            }
        }

        
public function getContext(): Context
    {
        return $this->context;
    }

    /** * @deprecated tag:v6.6.0 - reason:return-type-change - Return type will change to @see \Monolog\Level */
    public function getLogLevel(): int
    {
        if (\is_int($this->logLevel)) {
            return $this->logLevel;
        }

        return $this->logLevel->value;
    }

    public function getName(): string
    {
        return $this->name;
    }

    
Home | Imprint | This part of the site doesn't use cookies.