Skip to content

Commit 636c6c4

Browse files
committed
Fix whitespace in if() and such
1 parent 9fef2dc commit 636c6c4

7 files changed

Lines changed: 14 additions & 14 deletions

File tree

src/Entity/Entity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ public function setDescriptions( array $descriptions ) {
296296
public function setAllAliases( array $aliasLists ) {
297297
$this->getFingerprint()->setAliasGroups( new AliasGroupList() );
298298

299-
foreach( $aliasLists as $languageCode => $aliasList ) {
299+
foreach ( $aliasLists as $languageCode => $aliasList ) {
300300
$this->setAliases( $languageCode, $aliasList );
301301
}
302302
}

src/ReferenceList.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,20 +105,20 @@ private function insertReferenceAtIndex( Reference $reference, $index ) {
105105
$i = 0;
106106

107107
// Determine the references that need to be shifted and detach them:
108-
foreach( $this as $object ) {
109-
if( $i++ >= $index ) {
108+
foreach ( $this as $object ) {
109+
if ( $i++ >= $index ) {
110110
$referencesToShift[] = $object;
111111
}
112112
}
113113

114-
foreach( $referencesToShift as $object ) {
114+
foreach ( $referencesToShift as $object ) {
115115
$this->detach( $object );
116116
}
117117

118118
// Attach the new reference and reattach the previously detached references:
119119
$this->attach( $reference );
120120

121-
foreach( $referencesToShift as $object ) {
121+
foreach ( $referencesToShift as $object ) {
122122
$this->attach( $object );
123123
}
124124
}
@@ -149,8 +149,8 @@ public function hasReference( Reference $reference ) {
149149
public function indexOf( Reference $reference ) {
150150
$index = 0;
151151

152-
foreach( $this as $object ) {
153-
if( $object === $reference ) {
152+
foreach ( $this as $object ) {
153+
if ( $object === $reference ) {
154154
return $index;
155155
}
156156
$index++;

src/Statement/StatementList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public function getAllSnaks() {
200200
$snaks = array();
201201

202202
foreach ( $this->statements as $statement ) {
203-
foreach( $statement->getAllSnaks() as $snak ) {
203+
foreach ( $statement->getAllSnaks() as $snak ) {
204204
$snaks[] = $snak;
205205
}
206206
}

tests/unit/ByPropertyIdArrayTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public function testGetFlatArrayIndexOfObject( array $objects ) {
224224
$indicesDestination = array();
225225

226226
$i = 0;
227-
foreach( $objects as $object ) {
227+
foreach ( $objects as $object ) {
228228
$indicesSource[$i++] = $object;
229229
$indicesDestination[$indexedArray->getFlatArrayIndexOfObject( $object )] = $object;
230230
}
@@ -318,7 +318,7 @@ public function testMoveObjectToIndex(
318318
// Not using $indexedArray->toFlatArray() here to test whether native array has been
319319
// exchanged:
320320
$reindexedArray = array();
321-
foreach( $indexedArray as $o ) {
321+
foreach ( $indexedArray as $o ) {
322322
$reindexedArray[] = $o;
323323
}
324324

tests/unit/ReferenceListTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public function testIndexOf( ReferenceList $array ) {
223223
$this->assertFalse( $array->indexOf( new Reference() ) );
224224

225225
$i = 0;
226-
foreach( $array as $reference ) {
226+
foreach ( $array as $reference ) {
227227
$this->assertEquals( $i++, $array->indexOf( $reference ) );
228228
}
229229
}
@@ -300,7 +300,7 @@ public function testRemoveReferenceHash( ReferenceList $references ) {
300300
$hashes[] = $reference->getHash();
301301
}
302302

303-
foreach( $hashes as $hash ) {
303+
foreach ( $hashes as $hash ) {
304304
$references->removeReferenceHash( $hash );
305305
}
306306

tests/unit/ReferenceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public function unorderedReferenceProvider() {
160160

161161
$args = array();
162162

163-
foreach( $snakListArgs as $snakLists ) {
163+
foreach ( $snakListArgs as $snakLists ) {
164164
$args[] = array(
165165
new Reference( $snakLists[0] ),
166166
new Reference( $snakLists[1] ),

tests/unit/Statement/StatementGuidTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function provideStatementGuids() {
7878
$constructionDatas = $this->provideConstructionData();
7979
$argLists = array();
8080

81-
foreach( $constructionDatas as $constructionData ){
81+
foreach ( $constructionDatas as $constructionData ) {
8282
$argLists[] = array( new StatementGuid( $constructionData[0], $constructionData[1] ) );
8383
}
8484

0 commit comments

Comments
 (0)