PluginProbe
Media Cloud Sync / 1.4.2
Media Cloud Sync v1.4.2
1.4.2 1.4.1 1.4.0 1.3.12 1.3.11 1.3.10 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.2.0 1.2.10 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 All 36 releases
media-cloud-sync / includes / sdk / google / ramsey / uuid / src / Math / CalculatorInterface.php

CalculatorInterface.php in Media Cloud Sync 1.4.2, at includes/sdk/google/ramsey/uuid/src/Math/CalculatorInterface.php

107 lines 3.8 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 declare (strict_types=1);
13 namespace Dudlewebs\WPMCS\GCP\Ramsey\Uuid\Math;
14
15 use Dudlewebs\WPMCS\GCP\Ramsey\Uuid\Type\Hexadecimal;
16 use Dudlewebs\WPMCS\GCP\Ramsey\Uuid\Type\Integer as IntegerObject;
17 use Dudlewebs\WPMCS\GCP\Ramsey\Uuid\Type\NumberInterface;
18 /**
19 * A calculator performs arithmetic operations on numbers
20 *
21 * @immutable
22 */
23 interface CalculatorInterface
24 {
25 /**
26 * Returns the sum of all the provided parameters
27 *
28 * @param NumberInterface $augend The first addend (the integer being added to)
29 * @param NumberInterface ...$addends The additional integers to a add to the augend
30 *
31 * @return NumberInterface The sum of all the parameters
32 *
33 * @pure
34 */
35 public function add(NumberInterface $augend, NumberInterface ...$addends) : NumberInterface;
36 /**
37 * Returns the difference of all the provided parameters
38 *
39 * @param NumberInterface $minuend The integer being subtracted from
40 * @param NumberInterface ...$subtrahends The integers to subtract from the minuend
41 *
42 * @return NumberInterface The difference after subtracting all parameters
43 *
44 * @pure
45 */
46 public function subtract(NumberInterface $minuend, NumberInterface ...$subtrahends) : NumberInterface;
47 /**
48 * Returns the product of all the provided parameters
49 *
50 * @param NumberInterface $multiplicand The integer to be multiplied
51 * @param NumberInterface ...$multipliers The factors by which to multiply the multiplicand
52 *
53 * @return NumberInterface The product of multiplying all the provided parameters
54 *
55 * @pure
56 */
57 public function multiply(NumberInterface $multiplicand, NumberInterface ...$multipliers) : NumberInterface;
58 /**
59 * Returns the quotient of the provided parameters divided left-to-right
60 *
61 * @param int $roundingMode The RoundingMode constant to use for this operation
62 * @param int $scale The scale to use for this operation
63 * @param NumberInterface $dividend The integer to be divided
64 * @param NumberInterface ...$divisors The integers to divide $dividend by, in the order in which the division
65 * operations should take place (left-to-right)
66 *
67 * @return NumberInterface The quotient of dividing the provided parameters left-to-right
68 *
69 * @pure
70 */
71 public function divide(int $roundingMode, int $scale, NumberInterface $dividend, NumberInterface ...$divisors) : NumberInterface;
72 /**
73 * Converts a value from an arbitrary base to a base-10 integer value
74 *
75 * @param string $value The value to convert
76 * @param int $base The base to convert from (i.e., 2, 16, 32, etc.)
77 *
78 * @return IntegerObject The base-10 integer value of the converted value
79 *
80 * @pure
81 */
82 public function fromBase(string $value, int $base) : IntegerObject;
83 /**
84 * Converts a base-10 integer value to an arbitrary base
85 *
86 * @param IntegerObject $value The integer value to convert
87 * @param int $base The base to convert to (i.e., 2, 16, 32, etc.)
88 *
89 * @return string The value represented in the specified base
90 *
91 * @pure
92 */
93 public function toBase(IntegerObject $value, int $base) : string;
94 /**
95 * Converts an Integer instance to a Hexadecimal instance
96 *
97 * @pure
98 */
99 public function toHexadecimal(IntegerObject $value) : Hexadecimal;
100 /**
101 * Converts a Hexadecimal instance to an Integer instance
102 *
103 * @pure
104 */
105 public function toInteger(Hexadecimal $value) : IntegerObject;
106 }
107