@@ -27,15 +27,15 @@ discard block |
||
27 | 27 | * @param array[] &$container |
28 | 28 | * @return array |
29 | 29 | */ |
30 | - protected function &getClaimsArray( array &$container ) { |
|
30 | + protected function &getClaimsArray(array &$container) { |
|
31 | 31 | $entityId = $this->getEntityId(); |
32 | 32 | |
33 | - if ( !array_key_exists( $entityId, $container ) ) { |
|
33 | + if (!array_key_exists($entityId, $container)) { |
|
34 | 34 | $container[$entityId] = []; |
35 | 35 | } |
36 | 36 | $entityContainer = &$container[$entityId]; |
37 | 37 | |
38 | - if ( !array_key_exists( 'claims', $entityContainer ) ) { |
|
38 | + if (!array_key_exists('claims', $entityContainer)) { |
|
39 | 39 | $entityContainer['claims'] = []; |
40 | 40 | } |
41 | 41 | $claimsArray = &$entityContainer['claims']; |
@@ -49,25 +49,25 @@ discard block |
||
49 | 49 | * @param array[] &$container |
50 | 50 | * @return array |
51 | 51 | */ |
52 | - protected function &getStatementArray( array &$container ) { |
|
52 | + protected function &getStatementArray(array &$container) { |
|
53 | 53 | $statementPropertyId = $this->getStatementPropertyId(); |
54 | 54 | $statementGuid = $this->getStatementGuid(); |
55 | 55 | |
56 | - $claimsContainer = &$this->getClaimsArray( $container ); |
|
56 | + $claimsContainer = &$this->getClaimsArray($container); |
|
57 | 57 | |
58 | - if ( !array_key_exists( $statementPropertyId, $claimsContainer ) ) { |
|
58 | + if (!array_key_exists($statementPropertyId, $claimsContainer)) { |
|
59 | 59 | $claimsContainer[$statementPropertyId] = []; |
60 | 60 | } |
61 | 61 | $propertyContainer = &$claimsContainer[$statementPropertyId]; |
62 | 62 | |
63 | - foreach ( $propertyContainer as &$statement ) { |
|
64 | - if ( $statement['id'] === $statementGuid ) { |
|
63 | + foreach ($propertyContainer as &$statement) { |
|
64 | + if ($statement['id'] === $statementGuid) { |
|
65 | 65 | $statementArray = &$statement; |
66 | 66 | break; |
67 | 67 | } |
68 | 68 | } |
69 | - if ( !isset( $statementArray ) ) { |
|
70 | - $statementArray = [ 'id' => $statementGuid ]; |
|
69 | + if (!isset($statementArray)) { |
|
70 | + $statementArray = ['id' => $statementGuid]; |
|
71 | 71 | $propertyContainer[] = &$statementArray; |
72 | 72 | } |
73 | 73 | |
@@ -82,19 +82,19 @@ discard block |
||
82 | 82 | * @param array[] &$container |
83 | 83 | * @return array |
84 | 84 | */ |
85 | - abstract protected function &getMainArray( array &$container ); |
|
85 | + abstract protected function &getMainArray(array &$container); |
|
86 | 86 | |
87 | 87 | /** |
88 | 88 | * @param array|null $result |
89 | 89 | * @param array[] &$container |
90 | 90 | */ |
91 | - public function storeCheckResultInArray( array $result = null, array &$container ) { |
|
92 | - $mainArray = &$this->getMainArray( $container ); |
|
93 | - if ( !array_key_exists( 'results', $mainArray ) ) { |
|
91 | + public function storeCheckResultInArray(array $result = null, array &$container) { |
|
92 | + $mainArray = &$this->getMainArray($container); |
|
93 | + if (!array_key_exists('results', $mainArray)) { |
|
94 | 94 | $mainArray['results'] = []; |
95 | 95 | } |
96 | 96 | |
97 | - if ( $result !== null ) { |
|
97 | + if ($result !== null) { |
|
98 | 98 | $mainArray['results'][] = $result; |
99 | 99 | } |
100 | 100 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | * @codeCoverageIgnore This method is not supported. |
34 | 34 | */ |
35 | 35 | public function getType() { |
36 | - throw new LogicException( 'EntityContextCursor has no full associated context' ); |
|
36 | + throw new LogicException('EntityContextCursor has no full associated context'); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | public function getEntityId() { |
@@ -44,35 +44,35 @@ discard block |
||
44 | 44 | * @codeCoverageIgnore This method is not supported. |
45 | 45 | */ |
46 | 46 | public function getStatementPropertyId() { |
47 | - throw new LogicException( 'EntityContextCursor has no full associated context' ); |
|
47 | + throw new LogicException('EntityContextCursor has no full associated context'); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
51 | 51 | * @codeCoverageIgnore This method is not supported. |
52 | 52 | */ |
53 | 53 | public function getStatementGuid() { |
54 | - throw new LogicException( 'EntityContextCursor has no full associated context' ); |
|
54 | + throw new LogicException('EntityContextCursor has no full associated context'); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
58 | 58 | * @codeCoverageIgnore This method is not supported. |
59 | 59 | */ |
60 | 60 | public function getSnakPropertyId() { |
61 | - throw new LogicException( 'EntityContextCursor has no full associated context' ); |
|
61 | + throw new LogicException('EntityContextCursor has no full associated context'); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | /** |
65 | 65 | * @codeCoverageIgnore This method is not supported. |
66 | 66 | */ |
67 | 67 | public function getSnakHash() { |
68 | - throw new LogicException( 'EntityContextCursor has no full associated context' ); |
|
68 | + throw new LogicException('EntityContextCursor has no full associated context'); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
72 | 72 | * @codeCoverageIgnore This method is not supported. |
73 | 73 | */ |
74 | - public function &getMainArray( array &$container ) { |
|
75 | - throw new LogicException( 'EntityContextCursor cannot store check results' ); |
|
74 | + public function &getMainArray(array &$container) { |
|
75 | + throw new LogicException('EntityContextCursor cannot store check results'); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -81,12 +81,12 @@ discard block |
||
81 | 81 | * @param array|null $result must be null |
82 | 82 | * @param array[] &$container |
83 | 83 | */ |
84 | - public function storeCheckResultInArray( array $result = null, array &$container ) { |
|
85 | - if ( $result !== null ) { |
|
86 | - throw new LogicException( 'EntityContextCursor cannot store check results' ); |
|
84 | + public function storeCheckResultInArray(array $result = null, array &$container) { |
|
85 | + if ($result !== null) { |
|
86 | + throw new LogicException('EntityContextCursor cannot store check results'); |
|
87 | 87 | } |
88 | 88 | |
89 | - $this->getClaimsArray( $container ); |
|
89 | + $this->getClaimsArray($container); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | } |