Skip to content

Commit f5dfc9d

Browse files
committed
Fix issue with counting the uncountable
1 parent 54734a6 commit f5dfc9d

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/Handler/GenerateHandler.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,14 @@ public function handle(string $sniffPath = null): iterable
3232
$filesystem = new Filesystem();
3333

3434
$standardPath = new Folder($repoPath . 'PHPCompatibility/');
35+
yield "Searching for sniffs...";
3536

3637
if ($sniffPath !== null) {
3738
$sniffs = [$this->sniffFinder->getSniff($standardPath, $sniffPath)];
3839
} else {
3940
$sniffs = $this->sniffFinder->getSniffs($standardPath);
4041
}
4142

42-
$count = count($sniffs);
43-
yield "Found {$count} sniff(s)";
44-
4543
foreach ($sniffs as $sniff) {
4644
$markdownPath = $this->sniffCodeToMarkdownPath($sniff->getCode());
4745
$filesystem->dumpFile(

tests/Handler/GenerateHandlerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function handle_WithoutArguments_CreatesFile()
4848

4949
self::assertEquals(
5050
[
51-
'Found 2 sniff(s)',
51+
'Searching for sniffs...',
5252
'Created file: var/markdown/Standard/Category/First.md',
5353
'Created file: var/markdown/Standard/Category/Second.md'
5454
],
@@ -67,7 +67,7 @@ public function handle_WithSniffPath_CreatesSingleFile()
6767

6868
self::assertEquals(
6969
[
70-
'Found 1 sniff(s)',
70+
'Searching for sniffs...',
7171
'Created file: var/markdown/Standard/Category/First.md',
7272
],
7373
iterator_to_array($messages)

0 commit comments

Comments
 (0)