Passed
Push — master ( 34770a...32caf2 )
by
unknown
08:08
created
src/Lookup/EntityLookupException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 	 * @param string|null $message
25 25
 	 * @param Exception|null $previous
26 26
 	 */
27
-	public function __construct( EntityId $entityId, $message = null, ?Exception $previous = null ) {
27
+	public function __construct(EntityId $entityId, $message = null, ?Exception $previous = null) {
28 28
 		$this->entityId = $entityId;
29 29
 
30 30
 		parent::__construct(
Please login to merge, or discard this patch.
src/Lookup/EntityRedirectLookupException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 	 * @param string|null $message
25 25
 	 * @param Exception|null $previous
26 26
 	 */
27
-	public function __construct( EntityId $entityId, $message = null, ?Exception $previous = null ) {
27
+	public function __construct(EntityId $entityId, $message = null, ?Exception $previous = null) {
28 28
 		$this->entityId = $entityId;
29 29
 
30 30
 		parent::__construct(
Please login to merge, or discard this patch.
src/Lookup/EntityRetrievingDataTypeLookup.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 	private $entityLookup;
23 23
 	private array $propertyIdsInProcess = [];
24 24
 
25
-	public function __construct( EntityLookup $entityLookup ) {
25
+	public function __construct(EntityLookup $entityLookup) {
26 26
 		$this->entityLookup = $entityLookup;
27 27
 	}
28 28
 
@@ -34,16 +34,16 @@  discard block
 block discarded – undo
34 34
 	 * @return string
35 35
 	 * @throws PropertyDataTypeLookupException
36 36
 	 */
37
-	public function getDataTypeIdForProperty( PropertyId $propertyId ) {
38
-		if ( array_key_exists( $propertyId->getSerialization(), $this->propertyIdsInProcess ) ) {
37
+	public function getDataTypeIdForProperty(PropertyId $propertyId) {
38
+		if (array_key_exists($propertyId->getSerialization(), $this->propertyIdsInProcess)) {
39 39
 			// avoid self-referencing loop for newly created properties (T374230)
40
-			throw new PropertyDataTypeLookupException( $propertyId, 'loop detected' );
40
+			throw new PropertyDataTypeLookupException($propertyId, 'loop detected');
41 41
 		}
42
-		$this->propertyIdsInProcess[ $propertyId->getSerialization() ] = true;
42
+		$this->propertyIdsInProcess[$propertyId->getSerialization()] = true;
43 43
 		try {
44
-			return $this->getProperty( $propertyId )->getDataTypeId();
44
+			return $this->getProperty($propertyId)->getDataTypeId();
45 45
 		} finally {
46
-			unset( $this->propertyIdsInProcess[ $propertyId->getSerialization() ] );
46
+			unset($this->propertyIdsInProcess[$propertyId->getSerialization()]);
47 47
 		}
48 48
 	}
49 49
 
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
53 53
 	 * @return Property
54 54
 	 * @throws PropertyDataTypeLookupException
55 55
 	 */
56
-	private function getProperty( PropertyId $propertyId ) {
57
-		$property = $this->entityLookup->getEntity( $propertyId );
56
+	private function getProperty(PropertyId $propertyId) {
57
+		$property = $this->entityLookup->getEntity($propertyId);
58 58
 
59
-		if ( !( $property instanceof Property ) ) {
60
-			throw new PropertyDataTypeLookupException( $propertyId );
59
+		if (!($property instanceof Property)) {
60
+			throw new PropertyDataTypeLookupException($propertyId);
61 61
 		}
62 62
 
63 63
 		return $property;
Please login to merge, or discard this patch.