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