Completed
Pull Request — master (#16)
by Gabriel
61:29
created
src/Domain/Model/Address.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare( strict_types = 1 );
3
+declare(strict_types=1);
4 4
 
5 5
 namespace WMDE\Fundraising\AddressChangeContext\Domain\Model;
6 6
 
Please login to merge, or discard this patch.
src/Domain/Model/AddressChange.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare( strict_types = 1 );
3
+declare(strict_types=1);
4 4
 
5 5
 namespace WMDE\Fundraising\AddressChangeContext\Domain\Model;
6 6
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 		if ( $addressType !== self::ADDRESS_TYPE_PERSON && $addressType !== self::ADDRESS_TYPE_COMPANY ) {
69 69
 			throw new \InvalidArgumentException( 'Invalid address type' );
70 70
 		}
71
-		if( $externalIdType !== self::EXTERNAL_ID_TYPE_DONATION && $externalIdType !== self::EXTERNAL_ID_TYPE_MEMBERSHIP ) {
71
+		if ( $externalIdType !== self::EXTERNAL_ID_TYPE_DONATION && $externalIdType !== self::EXTERNAL_ID_TYPE_MEMBERSHIP ) {
72 72
 			throw new \InvalidArgumentException( 'Invalid external reference type' );
73 73
 		}
74 74
 		$this->createdAt = $createdAt ?? new \DateTime();
Please login to merge, or discard this patch.
src/Domain/AddressChangeRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare( strict_types = 1 );
3
+declare(strict_types=1);
4 4
 
5 5
 namespace WMDE\Fundraising\AddressChangeContext\Domain;
6 6
 
Please login to merge, or discard this patch.
src/UseCases/ChangeAddress/ChangeAddressValidationException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare( strict_types = 1 );
3
+declare(strict_types=1);
4 4
 
5 5
 namespace WMDE\Fundraising\AddressChangeContext\UseCases\ChangeAddress;
6 6
 
Please login to merge, or discard this patch.
tests/Unit/Domain/Model/AddressChangeBuilderTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare( strict_types = 1 );
3
+declare(strict_types=1);
4 4
 
5 5
 namespace WMDE\Fundraising\AddressChangeContext\Tests\Unit\Domain\Model;
6 6
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 		AddressChangeBuilder::setUuidGenerator( $this );
78 78
 		$addressChange = $addressChange = AddressChangeBuilder::create()->forPerson()->forDonation( 1 )->build();
79 79
 
80
-		$this->assertSame( 'c956688a-89e8-41b7-b93e-7e4cf3d6c826', (string) $addressChange->getCurrentIdentifier() );
80
+		$this->assertSame( 'c956688a-89e8-41b7-b93e-7e4cf3d6c826', (string)$addressChange->getCurrentIdentifier() );
81 81
 	}
82 82
 
83 83
 	public function generate(): string {
Please login to merge, or discard this patch.
tests/Unit/Domain/Model/AddressChangeTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare( strict_types = 1 );
3
+declare(strict_types=1);
4 4
 
5 5
 namespace WMDE\Fundraising\AddressChangeContext\Tests\Unit\Domain\Model;
6 6
 
Please login to merge, or discard this patch.
tests/Unit/Domain/Model/AddressChangeIdTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare( strict_types = 1 );
3
+declare(strict_types=1);
4 4
 
5 5
 namespace WMDE\Fundraising\AddressChangeContext\Tests\Unit\Domain\Model;
6 6
 
@@ -103,10 +103,10 @@  discard block
 block discarded – undo
103 103
 	}
104 104
 
105 105
 	public function invalidUUIDProvider(): \Generator {
106
-		yield [ '' ];
107
-		yield [ 'just a string' ];
108
-		yield [ '1111222233334444-1111222233334444-1111222233334444-1111222233334444-1111222233334444' ];
109
-		yield [ 'e-f-f-e-d' ];
110
-		yield [ 'This-is-not-a-UUID' ];
106
+		yield [''];
107
+		yield ['just a string'];
108
+		yield ['1111222233334444-1111222233334444-1111222233334444-1111222233334444-1111222233334444'];
109
+		yield ['e-f-f-e-d'];
110
+		yield ['This-is-not-a-UUID'];
111 111
 	}
112 112
 }
Please login to merge, or discard this patch.
tests/Unit/DataAccess/DoctrineAddressChangeRepositoryTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare( strict_types = 1 );
3
+declare(strict_types=1);
4 4
 
5 5
 namespace WMDE\Fundraising\AddressChangeContext\Tests\Unit\DataAccess;
6 6
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 		$now = new \DateTime();
72 72
 
73 73
 		$this->em->clear( AddressChange::class );
74
-		$retrievedAddressChange = $addressChangeRepository->getAddressChangeByUuid( (string) $addressChange->getCurrentIdentifier() );
74
+		$retrievedAddressChange = $addressChangeRepository->getAddressChangeByUuid( (string)$addressChange->getCurrentIdentifier() );
75 75
 		$this->assertNotNull( $retrievedAddressChange );
76 76
 		$this->assertNotNull( $retrievedAddressChange->getAddress() );
77 77
 		$this->assertNotNull( $addressChange->getAddress() ); // avoid PHPStan errors when accessing address later
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 		$addressChangeRepository->storeAddressChange( $addressChange );
92 92
 
93 93
 		$this->em->clear( AddressChange::class );
94
-		$retrievedAddressChange = $addressChangeRepository->getAddressChangeByUuid( (string) $addressChange->getCurrentIdentifier() );
94
+		$retrievedAddressChange = $addressChangeRepository->getAddressChangeByUuid( (string)$addressChange->getCurrentIdentifier() );
95 95
 		$this->assertTrue( $retrievedAddressChange->isOptedIntoDonationReceipt() );
96 96
 	}
97 97
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 		$addressChangeRepository->storeAddressChange( $addressChange );
103 103
 
104 104
 		$this->em->clear( AddressChange::class );
105
-		$retrievedAddressChange = $addressChangeRepository->getAddressChangeByUuid( (string) $addressChange->getCurrentIdentifier() );
105
+		$retrievedAddressChange = $addressChangeRepository->getAddressChangeByUuid( (string)$addressChange->getCurrentIdentifier() );
106 106
 		$this->assertFalse( $retrievedAddressChange->isOptedIntoDonationReceipt() );
107 107
 	}
108 108
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 		$now = new \DateTime();
115 115
 
116 116
 		$this->em->clear( AddressChange::class );
117
-		$retrievedAddressChange = $addressChangeRepository->getAddressChangeByUuid( (string) $addressChange->getCurrentIdentifier() );
117
+		$retrievedAddressChange = $addressChangeRepository->getAddressChangeByUuid( (string)$addressChange->getCurrentIdentifier() );
118 118
 		$this->assertNotNull( $retrievedAddressChange );
119 119
 		$this->assertTrue( $retrievedAddressChange->isExported() );
120 120
 		$this->assertDatePropertyIsSet( $now, $retrievedAddressChange, 'exportDate' );
Please login to merge, or discard this patch.
src/Domain/Model/AddressChangeBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare( strict_types = 1 );
3
+declare(strict_types=1);
4 4
 
5 5
 namespace WMDE\Fundraising\AddressChangeContext\Domain\Model;
6 6
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 		if ( self::$uuidGenerator === null ) {
82 82
 			self::$uuidGenerator = new RandomUuidGenerator();
83 83
 		}
84
-		return call_user_func( [ self::$uuidGenerator, 'generate' ] );
84
+		return call_user_func( [self::$uuidGenerator, 'generate'] );
85 85
 	}
86 86
 
87 87
 
Please login to merge, or discard this patch.