PHP 8.2.30
Preview: FloatNode.php Size: 1009 B
/opt/cloudlinux/alt-php54/root/usr/share/pear/Symfony/Component/Config/Definition/FloatNode.php

<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Config\Definition;

use Symfony\Component\Config\Definition\Exception\InvalidTypeException;

/**
 * This node represents a float value in the config tree.
 *
 * @author Jeanmonod David <david.jeanmonod@gmail.com>
 */
class FloatNode extends NumericNode
{
    /**
     * {@inheritDoc}
     */
    protected function validateType($value)
    {
        // Integers are also accepted, we just cast them
        if (is_int($value)) {
            $value = (float) $value;
        }

        if (!is_float($value)) {
            $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected float, but got %s.', $this->getPath(), gettype($value)));
            $ex->setPath($this->getPath());

            throw $ex;
        }
    }
}

Directory Contents

Dirs: 3 × Files: 15

Name Size Perms Modified Actions
Builder DIR
- drwxr-xr-x 2024-03-03 22:54:51
Edit Download
Dumper DIR
- drwxr-xr-x 2024-03-03 22:54:51
Edit Download
Exception DIR
- drwxr-xr-x 2024-03-03 22:54:51
Edit Download
10.73 KB lrw-r--r-- 2019-12-18 11:22:55
Edit Download
8.51 KB lrw-r--r-- 2019-12-18 11:22:55
Edit Download
939 B lrw-r--r-- 2019-12-18 11:22:55
Edit Download
612 B lrw-r--r-- 2019-12-18 11:22:55
Edit Download
1.51 KB lrw-r--r-- 2019-12-18 11:22:55
Edit Download
1009 B lrw-r--r-- 2019-12-18 11:22:55
Edit Download
875 B lrw-r--r-- 2019-12-18 11:22:55
Edit Download
1.88 KB lrw-r--r-- 2019-12-18 11:22:55
Edit Download
1.54 KB lrw-r--r-- 2019-12-18 11:22:55
Edit Download
2.79 KB lrw-r--r-- 2019-12-18 11:22:55
Edit Download
9.78 KB lrw-r--r-- 2019-12-18 11:22:55
Edit Download
631 B lrw-r--r-- 2019-12-18 11:22:55
Edit Download
560 B lrw-r--r-- 2019-12-18 11:22:55
Edit Download
1.06 KB lrw-r--r-- 2019-12-18 11:22:55
Edit Download
2.43 KB lrw-r--r-- 2019-12-18 11:22:55
Edit Download

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