PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 6.3.0
Defender Security – Malware Scanner, Login Security & Firewall v6.3.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
defender-security / lib / packages / Ramsey / Uuid / Math / CalculatorInterface.php

CalculatorInterface.php in Defender Security – Malware Scanner, Login Security & Firewall 6.3.0, at lib/packages/Ramsey/Uuid/Math/CalculatorInterface.php

122 lines 3.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * This file is part of the ramsey/uuid library
5 *
6 * For the full copyright and license information, please view the LICENSE
7 * file that was distributed with this source code.
8 *
9 * @copyright Copyright (c) Ben Ramsey <[email protected]>
10 * @license http://opensource.org/licenses/MIT MIT
11 */
12
13 declare(strict_types=1);
14
15 namespace WP_DEFENDER_VENDOR\Ramsey\Uuid\Math;
16
17 use WP_DEFENDER_VENDOR\Ramsey\Uuid\Type\Hexadecimal;
18 use WP_DEFENDER_VENDOR\Ramsey\Uuid\Type\Integer as IntegerObject;
19 use WP_DEFENDER_VENDOR\Ramsey\Uuid\Type\NumberInterface;
20
21 /**
22 * A calculator performs arithmetic operations on numbers
23 *
24 * @immutable
25 */
26 interface CalculatorInterface
27 {
28 /**
29 * Returns the sum of all the provided parameters
30 *
31 * @param NumberInterface $augend The first addend (the integer being added to)
32 * @param NumberInterface ...$addends The additional integers to a add to the augend
33 *
34 * @return NumberInterface The sum of all the parameters
35 *
36 * @pure
37 */
38 public function add(NumberInterface $augend, NumberInterface ...$addends): NumberInterface;
39
40 /**
41 * Returns the difference of all the provided parameters
42 *
43 * @param NumberInterface $minuend The integer being subtracted from
44 * @param NumberInterface ...$subtrahends The integers to subtract from the minuend
45 *
46 * @return NumberInterface The difference after subtracting all parameters
47 *
48 * @pure
49 */
50 public function subtract(NumberInterface $minuend, NumberInterface ...$subtrahends): NumberInterface;
51
52 /**
53 * Returns the product of all the provided parameters
54 *
55 * @param NumberInterface $multiplicand The integer to be multiplied
56 * @param NumberInterface ...$multipliers The factors by which to multiply the multiplicand
57 *
58 * @return NumberInterface The product of multiplying all the provided parameters
59 *
60 * @pure
61 */
62 public function multiply(NumberInterface $multiplicand, NumberInterface ...$multipliers): NumberInterface;
63
64 /**
65 * Returns the quotient of the provided parameters divided left-to-right
66 *
67 * @param int $roundingMode The RoundingMode constant to use for this operation
68 * @param int<0, max> $scale The scale to use for this operation
69 * @param NumberInterface $dividend The integer to be divided
70 * @param NumberInterface ...$divisors The integers to divide $dividend by, in the order in which the division
71 * operations should take place (left-to-right)
72 *
73 * @return NumberInterface The quotient of dividing the provided parameters left-to-right
74 *
75 * @pure
76 */
77 public function divide(
78 int $roundingMode,
79 int $scale,
80 NumberInterface $dividend,
81 NumberInterface ...$divisors,
82 ): NumberInterface;
83
84 /**
85 * Converts a value from an arbitrary base to a base-10 integer value
86 *
87 * @param non-empty-string $value The value to convert
88 * @param int<2, 36> $base The base to convert from (i.e., 2, 16, 32, etc.)
89 *
90 * @return IntegerObject The base-10 integer value of the converted value
91 *
92 * @pure
93 */
94 public function fromBase(string $value, int $base): IntegerObject;
95
96 /**
97 * Converts a base-10 integer value to an arbitrary base
98 *
99 * @param IntegerObject $value The integer value to convert
100 * @param int<2, 36> $base The base to convert to (i.e., 2, 16, 32, etc.)
101 *
102 * @return string The value represented in the specified base
103 *
104 * @pure
105 */
106 public function toBase(IntegerObject $value, int $base): string;
107
108 /**
109 * Converts an Integer instance to a Hexadecimal instance
110 *
111 * @pure
112 */
113 public function toHexadecimal(IntegerObject $value): Hexadecimal;
114
115 /**
116 * Converts a Hexadecimal instance to an Integer instance
117 *
118 * @pure
119 */
120 public function toInteger(Hexadecimal $value): IntegerObject;
121 }
122