@@ -34,7 +34,7 @@ |
||
34 | 34 | string $currency, bool $isValid, ?int $iso, ?int $decimals |
35 | 35 | ): void |
36 | 36 | { |
37 | - if(!$isValid) { |
|
37 | + if (!$isValid) { |
|
38 | 38 | $this->expectException(\InvalidArgumentException::class); |
39 | 39 | $this->expectExceptionMessage("$currency is not an allowed currency"); |
40 | 40 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | public function amountFloat(): float |
27 | 27 | { |
28 | - return (float)($this->amount() / pow(10, $this->currency->config()->decimals())); |
|
28 | + return (float) ($this->amount() / pow(10, $this->currency->config()->decimals())); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | public function currency(): Currency |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | public function formatted(string $thousandsSeparator = ',', string $decimalsSeparator = '.'): string |
37 | 37 | { |
38 | - return $this->currency->value() . ' ' . |
|
38 | + return $this->currency->value().' '. |
|
39 | 39 | number_format( |
40 | 40 | $this->amountFloat(), |
41 | 41 | $this->currency->config()->decimals(), |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | // Arrange |
15 | 15 | $money1 = Money::create(2320, Currency::fromValue(Currency::EUR)); |
16 | 16 | $money2 = Money::create(32423, Currency::fromValue(Currency::USD)); |
17 | - $money3 = Money::create(23423,Currency::fromValue(Currency::VES)); |
|
17 | + $money3 = Money::create(23423, Currency::fromValue(Currency::VES)); |
|
18 | 18 | $moneyArray = [ |
19 | 19 | $money1, |
20 | 20 | $money2, |
@@ -38,11 +38,11 @@ discard block |
||
38 | 38 | ); |
39 | 39 | $this->assertEquals(3, count($moneyCollection)); |
40 | 40 | |
41 | - for($i = 0; $i < 3; $i++) { |
|
41 | + for ($i = 0; $i < 3; $i++) { |
|
42 | 42 | $this->assertEquals($moneyArray[$i], $moneyCollection[$i]); |
43 | 43 | } |
44 | 44 | |
45 | - foreach($moneyCollection as $key => $money) { |
|
45 | + foreach ($moneyCollection as $key => $money) { |
|
46 | 46 | $this->assertInstanceOf(Money::class, $money); |
47 | 47 | } |
48 | 48 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | public function testGivenAnInvalidValueItThrowsAnException(): void |
64 | 64 | { |
65 | 65 | $this->expectException(\InvalidArgumentException::class); |
66 | - $this->expectExceptionMessage("Provided value is not a valid " . Money::class); |
|
66 | + $this->expectExceptionMessage("Provided value is not a valid ".Money::class); |
|
67 | 67 | |
68 | 68 | $money1 = new \stdClass(); |
69 | 69 |
@@ -37,11 +37,11 @@ discard block |
||
37 | 37 | ); |
38 | 38 | $this->assertEquals(3, count($currencyCollection)); |
39 | 39 | |
40 | - for($i = 0; $i < 3; $i++) { |
|
40 | + for ($i = 0; $i < 3; $i++) { |
|
41 | 41 | $this->assertEquals($currencyArray[$i], $currencyCollection[$i]); |
42 | 42 | } |
43 | 43 | |
44 | - foreach($currencyCollection as $key => $currency) { |
|
44 | + foreach ($currencyCollection as $key => $currency) { |
|
45 | 45 | $this->assertInstanceOf(Currency::class, $currency); |
46 | 46 | } |
47 | 47 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | public function testGivenAnInvalidValueItThrowsAnException(): void |
63 | 63 | { |
64 | 64 | $this->expectException(\InvalidArgumentException::class); |
65 | - $this->expectExceptionMessage("Provided value is not a valid " . Currency::class); |
|
65 | + $this->expectExceptionMessage("Provided value is not a valid ".Currency::class); |
|
66 | 66 | |
67 | 67 | $currency1 = new \stdClass(); |
68 | 68 |
@@ -37,11 +37,11 @@ discard block |
||
37 | 37 | ); |
38 | 38 | $this->assertEquals(3, count($genderCollection)); |
39 | 39 | |
40 | - for($i = 0; $i < 3; $i++) { |
|
40 | + for ($i = 0; $i < 3; $i++) { |
|
41 | 41 | $this->assertEquals($genderArray[$i], $genderCollection[$i]); |
42 | 42 | } |
43 | 43 | |
44 | - foreach($genderCollection as $key => $gender) { |
|
44 | + foreach ($genderCollection as $key => $gender) { |
|
45 | 45 | $this->assertInstanceOf(Gender::class, $gender); |
46 | 46 | } |
47 | 47 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | public function testGivenAnInvalidValueItThrowsAnException(): void |
63 | 63 | { |
64 | 64 | $this->expectException(\InvalidArgumentException::class); |
65 | - $this->expectExceptionMessage("Provided value is not a valid " . Gender::class); |
|
65 | + $this->expectExceptionMessage("Provided value is not a valid ".Gender::class); |
|
66 | 66 | |
67 | 67 | $gender1 = new \stdClass(); |
68 | 68 |
@@ -37,11 +37,11 @@ discard block |
||
37 | 37 | ); |
38 | 38 | $this->assertEquals(3, count($descriptionCollection)); |
39 | 39 | |
40 | - for($i = 0; $i < 3; $i++) { |
|
40 | + for ($i = 0; $i < 3; $i++) { |
|
41 | 41 | $this->assertEquals($descriptionArray[$i], $descriptionCollection[$i]); |
42 | 42 | } |
43 | 43 | |
44 | - foreach($descriptionCollection as $key => $description) { |
|
44 | + foreach ($descriptionCollection as $key => $description) { |
|
45 | 45 | $this->assertInstanceOf(Description::class, $description); |
46 | 46 | } |
47 | 47 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | public function testGivenAnInvalidValueItThrowsAnException(): void |
63 | 63 | { |
64 | 64 | $this->expectException(\InvalidArgumentException::class); |
65 | - $this->expectExceptionMessage("Provided value is not a valid " . Description::class); |
|
65 | + $this->expectExceptionMessage("Provided value is not a valid ".Description::class); |
|
66 | 66 | |
67 | 67 | $description1 = new \stdClass(); |
68 | 68 |
@@ -37,11 +37,11 @@ discard block |
||
37 | 37 | ); |
38 | 38 | $this->assertEquals(3, count($nameCollection)); |
39 | 39 | |
40 | - for($i = 0; $i < 3; $i++) { |
|
40 | + for ($i = 0; $i < 3; $i++) { |
|
41 | 41 | $this->assertEquals($nameArray[$i], $nameCollection[$i]); |
42 | 42 | } |
43 | 43 | |
44 | - foreach($nameCollection as $key => $name) { |
|
44 | + foreach ($nameCollection as $key => $name) { |
|
45 | 45 | $this->assertInstanceOf(Name::class, $name); |
46 | 46 | } |
47 | 47 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | public function testGivenAnInvalidValueItThrowsAnException(): void |
63 | 63 | { |
64 | 64 | $this->expectException(\InvalidArgumentException::class); |
65 | - $this->expectExceptionMessage("Provided value is not a valid " . Name::class); |
|
65 | + $this->expectExceptionMessage("Provided value is not a valid ".Name::class); |
|
66 | 66 | |
67 | 67 | $name1 = new \stdClass(); |
68 | 68 |
@@ -37,11 +37,11 @@ discard block |
||
37 | 37 | ); |
38 | 38 | $this->assertEquals(3, count($slugCollection)); |
39 | 39 | |
40 | - for($i = 0; $i < 3; $i++) { |
|
40 | + for ($i = 0; $i < 3; $i++) { |
|
41 | 41 | $this->assertEquals($slugArray[$i], $slugCollection[$i]); |
42 | 42 | } |
43 | 43 | |
44 | - foreach($slugCollection as $key => $slug) { |
|
44 | + foreach ($slugCollection as $key => $slug) { |
|
45 | 45 | $this->assertInstanceOf(Slug::class, $slug); |
46 | 46 | } |
47 | 47 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | public function testGivenAnInvalidValueItThrowsAnException(): void |
63 | 63 | { |
64 | 64 | $this->expectException(\InvalidArgumentException::class); |
65 | - $this->expectExceptionMessage("Provided value is not a valid " . Slug::class); |
|
65 | + $this->expectExceptionMessage("Provided value is not a valid ".Slug::class); |
|
66 | 66 | |
67 | 67 | $slug1 = new \stdClass(); |
68 | 68 |
@@ -37,11 +37,11 @@ discard block |
||
37 | 37 | ); |
38 | 38 | $this->assertEquals(3, count($emailCollection)); |
39 | 39 | |
40 | - for($i = 0; $i < 3; $i++) { |
|
40 | + for ($i = 0; $i < 3; $i++) { |
|
41 | 41 | $this->assertEquals($emailArray[$i], $emailCollection[$i]); |
42 | 42 | } |
43 | 43 | |
44 | - foreach($emailCollection as $key => $email) { |
|
44 | + foreach ($emailCollection as $key => $email) { |
|
45 | 45 | $this->assertInstanceOf(Email::class, $email); |
46 | 46 | } |
47 | 47 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | public function testGivenAnInvalidValueItThrowsAnException(): void |
63 | 63 | { |
64 | 64 | $this->expectException(\InvalidArgumentException::class); |
65 | - $this->expectExceptionMessage("Provided value is not a valid " . Email::class); |
|
65 | + $this->expectExceptionMessage("Provided value is not a valid ".Email::class); |
|
66 | 66 | |
67 | 67 | $email1 = new \stdClass(); |
68 | 68 |