Passed
Push — dependabot/composer/doctrine/m... ( a1ff7e )
by
unknown
03:20
created
tests/Unit/UseCases/ReadAddressChangeUseCaseTest.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\UseCases;
6 6
 
Please login to merge, or discard this patch.
src/UseCases/ReadAddressChange/AddressChangeData.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\ReadAddressChange;
6 6
 
Please login to merge, or discard this patch.
src/UseCases/ReadAddressChange/ReadAddressChangeUseCase.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\ReadAddressChange;
6 6
 
Please login to merge, or discard this patch.
src/AddressChangeContextFactory.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;
6 6
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 	 * @return string[]
23 23
 	 */
24 24
 	public function getDoctrineMappingPaths(): array {
25
-		return [ self::DOCTRINE_CLASS_MAPPING_DIRECTORY ];
25
+		return [self::DOCTRINE_CLASS_MAPPING_DIRECTORY];
26 26
 	}
27 27
 
28 28
 	/**
Please login to merge, or discard this patch.
src/Domain/Model/AddressType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare( strict_types=1 );
2
+declare(strict_types=1);
3 3
 
4 4
 namespace WMDE\Fundraising\AddressChangeContext\Domain\Model;
5 5
 
Please login to merge, or discard this patch.
src/ScalarTypeConverter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare( strict_types=1 );
2
+declare(strict_types=1);
3 3
 
4 4
 namespace WMDE\Fundraising\AddressChangeContext;
5 5
 
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 		return strval( self::assertScalarType( $value ) );
26 26
 	}
27 27
 
28
-	private static function assertScalarType( mixed $value ): int|string|bool|float {
28
+	private static function assertScalarType( mixed $value ): int | string | bool | float {
29 29
 		if ( is_scalar( $value ) ) {
30 30
 			return $value;
31 31
 		}
Please login to merge, or discard this patch.
src/UseCases/ChangeAddress/ChangeAddressUseCase.php 1 patch
Spacing   +3 added lines, -3 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\UseCases\ChangeAddress;
6 6
 
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 	public function changeAddress( ChangeAddressRequest $request ): ChangeAddressResponse {
21 21
 		$addressChange = $this->addressChangeRepository->getAddressChangeByUuid( $request->identifier );
22 22
 		if ( $addressChange === null ) {
23
-			return ChangeAddressResponse::newErrorResponse( [ ChangeAddressResponse::ERROR_ADDRESS_NOT_FOUND ] );
23
+			return ChangeAddressResponse::newErrorResponse( [ChangeAddressResponse::ERROR_ADDRESS_NOT_FOUND] );
24 24
 		}
25 25
 
26 26
 		$newIdentifier = AddressChangeId::fromString( AddressChangeBuilder::generateUuid() );
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 			try {
29 29
 				$addressChange->performAddressChange( $this->buildAddress( $request ), $newIdentifier );
30 30
 			} catch ( ChangeAddressValidationException $e ) {
31
-				return ChangeAddressResponse::newErrorResponse( [ $e->getMessage() ] );
31
+				return ChangeAddressResponse::newErrorResponse( [$e->getMessage()] );
32 32
 			}
33 33
 		}
34 34
 
Please login to merge, or discard this patch.
tests/Unit/Domain/Model/AddressTest.php 1 patch
Spacing   +13 added lines, -13 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
 
@@ -86,23 +86,23 @@  discard block
 block discarded – undo
86 86
 	 * @return \Generator<string[]>
87 87
 	 */
88 88
 	public static function emptyPersonFieldTestProvider(): \Generator {
89
-		yield [ 'Salutation', '', 'Prof. Dr.', 'Testdude', 'Testfamily', 'Test Address 123', '12345', 'Test City', 'Test Country' ];
90
-		yield [ 'First Name', 'Herr', 'Prof. Dr.', '', 'Testfamily', 'Test Address 123', '12345', 'Test City', 'Test Country' ];
91
-		yield [ 'Last Name', 'Herr', 'Prof. Dr.', 'Testdude', '', 'Test Address 123', '12345', 'Test City', 'Test Country' ];
92
-		yield [ 'Address', 'Herr', 'Prof. Dr.', 'Testdude', 'Testfamily', '', '12345', 'Test City', 'Test Country' ];
93
-		yield [ 'Post Code', 'Herr', 'Prof. Dr.', 'Testdude', 'Testfamily', 'Test Address 123', '', 'Test City', 'Test Country' ];
94
-		yield [ 'City', 'Herr', 'Prof. Dr.', 'Testdude', 'Testfamily', 'Test Address 123', '12345', '', 'Test Country' ];
95
-		yield [ 'Country', 'Herr', 'Prof. Dr.', 'Testdude', 'Testfamily', 'Test Address 123', '12345', 'Test City', '' ];
89
+		yield ['Salutation', '', 'Prof. Dr.', 'Testdude', 'Testfamily', 'Test Address 123', '12345', 'Test City', 'Test Country'];
90
+		yield ['First Name', 'Herr', 'Prof. Dr.', '', 'Testfamily', 'Test Address 123', '12345', 'Test City', 'Test Country'];
91
+		yield ['Last Name', 'Herr', 'Prof. Dr.', 'Testdude', '', 'Test Address 123', '12345', 'Test City', 'Test Country'];
92
+		yield ['Address', 'Herr', 'Prof. Dr.', 'Testdude', 'Testfamily', '', '12345', 'Test City', 'Test Country'];
93
+		yield ['Post Code', 'Herr', 'Prof. Dr.', 'Testdude', 'Testfamily', 'Test Address 123', '', 'Test City', 'Test Country'];
94
+		yield ['City', 'Herr', 'Prof. Dr.', 'Testdude', 'Testfamily', 'Test Address 123', '12345', '', 'Test Country'];
95
+		yield ['Country', 'Herr', 'Prof. Dr.', 'Testdude', 'Testfamily', 'Test Address 123', '12345', 'Test City', ''];
96 96
 	}
97 97
 
98 98
 	/**
99 99
 	 * @return \Generator<string[]>
100 100
 	 */
101 101
 	public static function emptyCompanyFieldTestProvider(): \Generator {
102
-		yield [ 'Company', '', 'Test Street 123', '12345', 'Test City', 'Test Country' ];
103
-		yield [ 'Address', 'Test Company', '', '12345', 'Test City', 'Test Country' ];
104
-		yield [ 'Post Code', 'Test Company', 'Test Street 123', '', 'Test City', 'Test Country' ];
105
-		yield [ 'City', 'Test Company', 'Test Street 123', '12345', '', 'Test Country' ];
106
-		yield [ 'Country', 'Test Company', 'Test Street 123', '12345', 'Test City', '' ];
102
+		yield ['Company', '', 'Test Street 123', '12345', 'Test City', 'Test Country'];
103
+		yield ['Address', 'Test Company', '', '12345', 'Test City', 'Test Country'];
104
+		yield ['Post Code', 'Test Company', 'Test Street 123', '', 'Test City', 'Test Country'];
105
+		yield ['City', 'Test Company', 'Test Street 123', '12345', '', 'Test Country'];
106
+		yield ['Country', 'Test Company', 'Test Street 123', '12345', 'Test City', ''];
107 107
 	}
108 108
 }
Please login to merge, or discard this patch.
src/DataAccess/Migrations/Version20240528083322.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\DataAccess\Migrations;
6 6
 
@@ -15,11 +15,11 @@  discard block
 block discarded – undo
15 15
 
16 16
 	public function up( Schema $schema ): void {
17 17
 		$table = $schema->getTable( 'address' );
18
-		$table->addIndex( [ 'first_name' ], 'idx_ac_first_name' );
19
-		$table->addIndex( [ 'last_name' ], 'idx_ac_last_name' );
20
-		$table->addIndex( [ 'street' ], 'idx_ac_street' );
21
-		$table->addIndex( [ 'postcode' ], 'idx_ac_postcode' );
22
-		$table->addIndex( [ 'city' ], 'idx_ac_city' );
18
+		$table->addIndex( ['first_name'], 'idx_ac_first_name' );
19
+		$table->addIndex( ['last_name'], 'idx_ac_last_name' );
20
+		$table->addIndex( ['street'], 'idx_ac_street' );
21
+		$table->addIndex( ['postcode'], 'idx_ac_postcode' );
22
+		$table->addIndex( ['city'], 'idx_ac_city' );
23 23
 	}
24 24
 
25 25
 	public function down( Schema $schema ): void {
Please login to merge, or discard this patch.