Completed
Push — master ( 5a9251...e48e23 )
by
unknown
03:04
created
src/ConstraintCheck/Context/ApiV2ContextCursor.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -36,29 +36,29 @@  discard block
 block discarded – undo
36 36
 		$statementPropertyId,
37 37
 		$statementGuid
38 38
 	) {
39
-		if ( !array_key_exists( $entityId, $container ) ) {
39
+		if (!array_key_exists($entityId, $container)) {
40 40
 			$container[$entityId] = [];
41 41
 		}
42 42
 		$entityContainer = &$container[$entityId];
43 43
 
44
-		if ( !array_key_exists( 'claims', $entityContainer ) ) {
44
+		if (!array_key_exists('claims', $entityContainer)) {
45 45
 			$entityContainer['claims'] = [];
46 46
 		}
47 47
 		$claimsContainer = &$entityContainer['claims'];
48 48
 
49
-		if ( !array_key_exists( $statementPropertyId, $claimsContainer ) ) {
49
+		if (!array_key_exists($statementPropertyId, $claimsContainer)) {
50 50
 			$claimsContainer[$statementPropertyId] = [];
51 51
 		}
52 52
 		$propertyContainer = &$claimsContainer[$statementPropertyId];
53 53
 
54
-		foreach ( $propertyContainer as &$statement ) {
55
-			if ( $statement['id'] === $statementGuid ) {
54
+		foreach ($propertyContainer as &$statement) {
55
+			if ($statement['id'] === $statementGuid) {
56 56
 				$statementArray = &$statement;
57 57
 				break;
58 58
 			}
59 59
 		}
60
-		if ( !isset( $statementArray ) ) {
61
-			$statementArray = [ 'id' => $statementGuid ];
60
+		if (!isset($statementArray)) {
61
+			$statementArray = ['id' => $statementGuid];
62 62
 			$propertyContainer[] = &$statementArray;
63 63
 		}
64 64
 
@@ -73,19 +73,19 @@  discard block
 block discarded – undo
73 73
 	 * @param array[] &$container
74 74
 	 * @return array
75 75
 	 */
76
-	abstract protected function &getMainArray( array &$container );
76
+	abstract protected function &getMainArray(array &$container);
77 77
 
78 78
 	/**
79 79
 	 * @param array|null $result
80 80
 	 * @param array[] &$container
81 81
 	 */
82
-	public function storeCheckResultInArray( array $result = null, array &$container ) {
83
-		$mainArray = &$this->getMainArray( $container );
84
-		if ( !array_key_exists( 'results', $mainArray ) ) {
82
+	public function storeCheckResultInArray(array $result = null, array &$container) {
83
+		$mainArray = &$this->getMainArray($container);
84
+		if (!array_key_exists('results', $mainArray)) {
85 85
 			$mainArray['results'] = [];
86 86
 		}
87 87
 
88
-		if ( $result !== null ) {
88
+		if ($result !== null) {
89 89
 			$mainArray['results'][] = $result;
90 90
 		}
91 91
 	}
Please login to merge, or discard this patch.
src/ConstraintCheck/Context/QualifierContextCursor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 		$this->snakPropertyId = $snakPropertyId;
54 54
 	}
55 55
 
56
-	protected function &getMainArray( array &$container ) {
56
+	protected function &getMainArray(array &$container) {
57 57
 		$statementArray = &$this->getStatementArray(
58 58
 			$container,
59 59
 			$this->entityId,
@@ -61,24 +61,24 @@  discard block
 block discarded – undo
61 61
 			$this->statementGuid
62 62
 		);
63 63
 
64
-		if ( !array_key_exists( 'qualifiers', $statementArray ) ) {
64
+		if (!array_key_exists('qualifiers', $statementArray)) {
65 65
 			$statementArray['qualifiers'] = [];
66 66
 		}
67 67
 		$qualifiersArray = &$statementArray['qualifiers'];
68 68
 
69
-		if ( !array_key_exists( $this->snakPropertyId, $qualifiersArray ) ) {
69
+		if (!array_key_exists($this->snakPropertyId, $qualifiersArray)) {
70 70
 			$qualifiersArray[$this->snakPropertyId] = [];
71 71
 		}
72 72
 		$propertyArray = &$qualifiersArray[$this->snakPropertyId];
73 73
 
74
-		foreach ( $propertyArray as &$potentialQualifierArray ) {
75
-			if ( $potentialQualifierArray['hash'] === $this->snakHash ) {
74
+		foreach ($propertyArray as &$potentialQualifierArray) {
75
+			if ($potentialQualifierArray['hash'] === $this->snakHash) {
76 76
 				$qualifierArray = &$potentialQualifierArray;
77 77
 				break;
78 78
 			}
79 79
 		}
80
-		if ( !isset( $qualifierArray ) ) {
81
-			$qualifierArray = [ 'hash' => $this->snakHash ];
80
+		if (!isset($qualifierArray)) {
81
+			$qualifierArray = ['hash' => $this->snakHash];
82 82
 			$propertyArray[] = &$qualifierArray;
83 83
 		}
84 84
 
Please login to merge, or discard this patch.
src/ConstraintCheck/Context/MainSnakContextCursor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 		$this->snakHash = $snakHash;
46 46
 	}
47 47
 
48
-	protected function &getMainArray( array &$container ) {
48
+	protected function &getMainArray(array &$container) {
49 49
 		$statementArray = &$this->getStatementArray(
50 50
 			$container,
51 51
 			$this->entityId,
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
 			$this->statementGuid
54 54
 		);
55 55
 
56
-		if ( !array_key_exists( 'mainsnak', $statementArray ) ) {
57
-			$statementArray['mainsnak'] = [ 'hash' => $this->snakHash ];
56
+		if (!array_key_exists('mainsnak', $statementArray)) {
57
+			$statementArray['mainsnak'] = ['hash' => $this->snakHash];
58 58
 		}
59 59
 		$mainsnakArray = &$statementArray['mainsnak'];
60 60
 
Please login to merge, or discard this patch.
src/ConstraintCheck/Context/ContextCursor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,6 +86,6 @@
 block discarded – undo
86 86
 	 * @param array|null $result
87 87
 	 * @param array[] &$container
88 88
 	 */
89
-	public function storeCheckResultInArray( array $result = null, array &$container );
89
+	public function storeCheckResultInArray(array $result = null, array &$container);
90 90
 
91 91
 }
Please login to merge, or discard this patch.
src/ConstraintCheck/Context/ReferenceContextCursor.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 		$this->referenceHash = $referenceHash;
62 62
 	}
63 63
 
64
-	protected function &getMainArray( array &$container ) {
64
+	protected function &getMainArray(array &$container) {
65 65
 		$statementArray = &$this->getStatementArray(
66 66
 			$container,
67 67
 			$this->entityId,
@@ -69,37 +69,37 @@  discard block
 block discarded – undo
69 69
 			$this->statementGuid
70 70
 		);
71 71
 
72
-		if ( !array_key_exists( 'references', $statementArray ) ) {
72
+		if (!array_key_exists('references', $statementArray)) {
73 73
 			$statementArray['references'] = [];
74 74
 		}
75 75
 		$referencesArray = &$statementArray['references'];
76 76
 
77
-		foreach ( $referencesArray as &$potentialReferenceArray ) {
78
-			if ( $potentialReferenceArray['hash'] === $this->referenceHash ) {
77
+		foreach ($referencesArray as &$potentialReferenceArray) {
78
+			if ($potentialReferenceArray['hash'] === $this->referenceHash) {
79 79
 				$referenceArray = &$potentialReferenceArray;
80 80
 				break;
81 81
 			}
82 82
 		}
83
-		if ( !isset( $referenceArray ) ) {
84
-			$referenceArray = [ 'hash' => $this->referenceHash, 'snaks' => [] ];
83
+		if (!isset($referenceArray)) {
84
+			$referenceArray = ['hash' => $this->referenceHash, 'snaks' => []];
85 85
 			$referencesArray[] = &$referenceArray;
86 86
 		}
87 87
 
88 88
 		$snaksArray = &$referenceArray['snaks'];
89 89
 
90
-		if ( !array_key_exists( $this->snakPropertyId, $snaksArray ) ) {
90
+		if (!array_key_exists($this->snakPropertyId, $snaksArray)) {
91 91
 			$snaksArray[$this->snakPropertyId] = [];
92 92
 		}
93 93
 		$propertyArray = &$snaksArray[$this->snakPropertyId];
94 94
 
95
-		foreach ( $propertyArray as &$potentialSnakArray ) {
96
-			if ( $potentialSnakArray['hash'] === $this->snakHash ) {
95
+		foreach ($propertyArray as &$potentialSnakArray) {
96
+			if ($potentialSnakArray['hash'] === $this->snakHash) {
97 97
 				$snakArray = &$potentialSnakArray;
98 98
 				break;
99 99
 			}
100 100
 		}
101
-		if ( !isset( $snakArray ) ) {
102
-			$snakArray = [ 'hash' => $this->snakHash ];
101
+		if (!isset($snakArray)) {
102
+			$snakArray = ['hash' => $this->snakHash];
103 103
 			$propertyArray[] = &$snakArray;
104 104
 		}
105 105
 
Please login to merge, or discard this patch.