Skip to content

Commit

Permalink
cs: Autofix code style.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Nov 30, 2021
1 parent 0cb2e0e commit ab5cac3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
9 changes: 3 additions & 6 deletions docs/pages/code/lazy-json-parsing.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@

$json = Collection::fromIterable(JsonMachine::fromFile($composerJson));

foreach ($json as $key => $value) {
}
foreach ($json as $key => $value);

$remoteFile = 'https://httpbin.org/anything';

Expand All @@ -43,8 +42,7 @@

$json = Collection::fromIterable(\JsonMachine\JsonMachine::fromStream($phpStream));

foreach ($json as $key => $value) {
}
foreach ($json as $key => $value);

// Parse a remote JSON file with Symfony HTTP client
$client = HttpClient::create();
Expand All @@ -59,5 +57,4 @@
)
);

foreach ($json as $key => $value) {
}
foreach ($json as $key => $value);
1 change: 1 addition & 0 deletions grumphp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ parameters:

# PHP CS Fixer
tasks.phpcsfixer.config: .php-cs-fixer.dist.php
tasks.phpcsfixer.diff: true

# PHPCS
tasks.phpcs.ignore_patterns:
Expand Down
12 changes: 6 additions & 6 deletions spec/loophp/collection/CollectionSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -2187,16 +2187,16 @@ public function it_can_isEmpty(): void

$withValues = $this::fromIterable([1, 2, 3]);

foreach ($withValues as $value) {
// iterating once through it
}
foreach ($withValues as $value);
// iterating once through it

$withValues->isEmpty()->shouldBe(false);

$withoutValues = $this::fromIterable([]);

foreach ($withoutValues as $value) {
// iterating once through it
}
foreach ($withoutValues as $value);
// iterating once through it

$withoutValues->isEmpty()->shouldBe(true);
}

Expand Down

0 comments on commit ab5cac3

Please sign in to comment.