Debian Codegraph @

vendor/symfony/polyfill-php84/Resources/stubs/RoundingMode.php

raw
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <[email protected]>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 if (\PHP_VERSION_ID < 80100) {
13 final class RoundingMode
14 {
15 const HalfAwayFromZero = 0;
16 const HalfTowardsZero = 1;
17 const HalfEven = 2;
18 const HalfOdd = 3;
19 const TowardsZero = 4;
20 const AwayFromZero = 5;
21 const NegativeInfinity = 6;
22 const PositiveInfinity = 7;
23
24 private function __construct()
25 {
26 }
27
28 public static function cases(): array
29 {
30 return [
31 self::HalfAwayFromZero,
32 self::HalfTowardsZero,
33 self::HalfEven,
34 self::HalfOdd,
35 self::TowardsZero,
36 self::AwayFromZero,
37 self::NegativeInfinity,
38 self::PositiveInfinity,
39 ];
40 }
41 }
42 } elseif (\PHP_VERSION_ID < 80400) {
43 require dirname(__DIR__).'/RoundingMode.php';
44 }