Skip to content

Commit 54c5324

Browse files
committed
restoring FQN for phpdoc
changing Amount to Count for list size
1 parent 1645081 commit 54c5324

File tree

4 files changed

+49
-43
lines changed

4 files changed

+49
-43
lines changed

src/PHPSemVerCheckerGit/Console/Command/SuggestCommand.php

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,19 @@ protected function configure()
4141

4242
/**
4343
* @param string $directory
44-
* @return Repository
44+
* @return \Gitter\Repository
4545
*/
4646
private function getRepository($directory)
4747
{
4848
$client = new Client();
4949
return $client->getRepository($directory);
5050
}
5151

52-
/**
53-
* @param InputInterface $input
54-
* @param OutputInterface $output
52+
/**
53+
* @param \Symfony\Component\Console\Input\InputInterface $input
54+
* @param \Symfony\Component\Console\Output\OutputInterface $output
5555
* @return int
56-
*/
56+
*/
5757
protected function execute(InputInterface $input, OutputInterface $output)
5858
{
5959
$startTime = microtime(true);
@@ -127,7 +127,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
127127
$output->write(
128128
array(
129129
'',
130-
'[Scanned files] Before: ' . $before->getFilteredAmount() . ' (' . $before->getUnfilteredAmount() . ' unfiltered), After: ' . $after->getFilteredAmount() . ' (' . $after->getUnfilteredAmount() . ' unfiltered)',
130+
'[Scanned files] Before: ' . $before->getFilteredCount() . ' (' . $before->getUnfilteredCount() . ' unfiltered), After: ' . $after->getFilteredCount() . ' (' . $after->getUnfilteredCount() . ' unfiltered)',
131131
'Time: ' . round($duration, 3) . ' seconds, Memory: ' . round(memory_get_peak_usage() / 1024 / 1024, 3) . ' MB'
132132
),
133133
true
@@ -136,7 +136,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
136136
}
137137

138138
/**
139-
* @param Report $report
139+
* @param \PHPSemVerChecker\Report\Report $report
140140
* @param SemanticVersion $tag
141141
* @return SemanticVersion
142142
*/
@@ -160,7 +160,7 @@ private function getNextTag(Report $report, SemanticVersion $tag)
160160
}
161161

162162
/**
163-
* @param Repository $repository
163+
* @param \Gitter\Repository $repository
164164
* @return null|string
165165
*/
166166
private function getInitialTag(Repository $repository)
@@ -173,7 +173,7 @@ private function getInitialTag(Repository $repository)
173173
}
174174

175175
/**
176-
* @param Repository $repository
176+
* @param \Gitter\Repository $repository
177177
* @return string|null
178178
*/
179179
protected function findLatestTag(Repository $repository)
@@ -182,7 +182,7 @@ protected function findLatestTag(Repository $repository)
182182
}
183183

184184
/**
185-
* @param Repository $repository
185+
* @param \Gitter\Repository $repository
186186
* @param string $tag
187187
* @return string|null
188188
*/
@@ -203,6 +203,10 @@ protected function findTag(Repository $repository, $tag)
203203
return $this->getMappedVersionTag($tags, $satisfyingTag);
204204
}
205205

206+
/**
207+
* @param array $tags
208+
* @return array
209+
*/
206210
private function filterTags(array $tags)
207211
{
208212
$filteredTags = [];
@@ -218,7 +222,7 @@ private function filterTags(array $tags)
218222
}
219223

220224
/**
221-
* @param string[] $tags
225+
* @param string[] $tags
222226
* @param SemanticVersion|string|null $versionTag
223227
* @return string|null
224228
*/

src/PHPSemVerCheckerGit/ProcessedFileList.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ class ProcessedFileList
99
/**
1010
* @var int
1111
*/
12-
private $unfilteredAmount;
12+
private $unfilteredCount;
1313

1414
/**
1515
* @var int
1616
*/
17-
private $filteredAmount;
17+
private $filteredCount;
1818

1919
/**
2020
* @var string[]
@@ -27,27 +27,27 @@ class ProcessedFileList
2727
private $unfiltered;
2828

2929
/**
30-
* @var Scanner
30+
* @var \PHPSemVerChecker\Scanner\Scanner
3131
*/
3232
private $scanner;
3333

3434
/**
3535
* ProcessedFileList constructor.
3636
* @param string[] $unfiltered
3737
* @param string[] $filtered
38-
* @param Scanner $scanner
38+
* @param \PHPSemVerChecker\Scanner\Scanner $scanner
3939
*/
4040
public function __construct(array $unfiltered, array $filtered, Scanner &$scanner)
4141
{
42-
$this->unfilteredAmount = count($unfiltered);
43-
$this->filteredAmount = count($filtered);
42+
$this->unfilteredCount = count($unfiltered);
43+
$this->filteredCount = count($filtered);
4444
$this->filtered = $filtered;
4545
$this->unfiltered = $unfiltered;
4646
$this->scanner = $scanner;
4747
}
4848

4949
/**
50-
* @return Scanner
50+
* @return \PHPSemVerChecker\Scanner\Scanner
5151
*/
5252
public function getScanner()
5353
{
@@ -65,17 +65,17 @@ public function getFiltered()
6565
/**
6666
* @return int
6767
*/
68-
public function getFilteredAmount()
68+
public function getFilteredCount()
6969
{
70-
return $this->filteredAmount;
70+
return $this->filteredCount;
7171
}
7272

7373
/**
7474
* @return int
7575
*/
76-
public function getUnfilteredAmount()
76+
public function getUnfilteredCount()
7777
{
78-
return $this->unfilteredAmount;
78+
return $this->unfilteredCount;
7979
}
8080

8181
/**

src/PHPSemVerCheckerGit/SourceFileProcessor.php

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,51 @@
22

33
namespace PHPSemVerCheckerGit;
44

5-
5+
use Gitter\Repository;
66
use PHPSemVerChecker\Finder\Finder;
77
use PHPSemVerChecker\Scanner\Scanner;
8-
use Symfony\Component\Console\Output\OutputInterface;
9-
use Symfony\Component\Console\Helper\ProgressBar;
108
use PHPSemVerCheckerGit\Filter\SourceFilter;
11-
use Gitter\Repository;
9+
use Symfony\Component\Console\Helper\ProgressBar;
10+
use Symfony\Component\Console\Output\OutputInterface;
1211

1312
class SourceFileProcessor
1413
{
1514
/**
16-
* @var Repository
15+
* @var \Gitter\Repository
1716
*/
1817
private $repository;
18+
1919
/**
20-
* @var OutputInterface
20+
* @var \Symfony\Component\Console\Output\OutputInterface
2121
*/
2222
private $output;
23+
2324
/**
24-
* @var Finder
25+
* @var \PHPSemVerChecker\Finder\Finder
2526
*/
2627
private $finder;
28+
2729
/**
28-
* @var SourceFilter
30+
* @var \PHPSemVerCheckerGit\Filter\SourceFilter
2931
*/
3032
private $filter;
33+
3134
/**
3235
* @var string
3336
*/
3437
private $directory;
38+
3539
/**
3640
* @var string[]
3741
*/
3842
private $modifiedFiles;
3943

4044
/**
4145
* SourceFileProcessor constructor.
42-
* @param SourceFilter &$filter
43-
* @param Repository $repository
44-
* @param OutputInterface $output
45-
* @param Finder $finder
46+
* @param PHPSemVerCheckerGit\Filter\SourceFilter $filter
47+
* @param \Gitter\Repository $repository
48+
* @param \Symfony\Component\Console\Output\OutputInterface $output
49+
* @param \PHPSemVerChecker\Finder\Finder $finder
4650
* @param string $directory
4751
* @param string[] $modifiedFiles
4852
*/
@@ -64,7 +68,7 @@ public function __construct(SourceFilter $filter, Repository $repository, Output
6468
* @param string $commitIdentifier
6569
* @param $include
6670
* @param $exclude
67-
* @return ProcessedFileList
71+
* @return \PHPSemVerCheckerGit\ProcessedFileList
6872
*/
6973
public function processFileList($commitIdentifier, $include, $exclude)
7074
{
@@ -77,7 +81,7 @@ public function processFileList($commitIdentifier, $include, $exclude)
7781
}
7882

7983
/**
80-
* @param Scanner $scanner
84+
* @param \PHPSemVerChecker\Scanner\Scanner $scanner
8185
* @param array $files
8286
*/
8387
private function scanFileList(Scanner $scanner, array $files)

test/Console/Command/SuggestCommandTest.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
use PHPSemVerCheckerGit\Console\Command\SuggestCommand;
77
use PHPUnit\Framework\TestCase;
88
use ReflectionClass;
9-
use ReflectionException;
10-
use ReflectionMethod;
119
use vierbergenlars\SemVer\version;
1210

1311
class SuggestCommandTest extends TestCase
@@ -17,16 +15,16 @@ class SuggestCommandTest extends TestCase
1715
* @param int $major
1816
* @param int $minor
1917
* @param int $patch
20-
* @return version
18+
* @return \vierbergenlars\SemVer\version
2119
*/
2220
private function getMockedVersion($major, $minor, $patch)
2321
{
2422
return new version("$major.$minor.$patch", true);
2523
}
2624

2725
/**
28-
* @return ReflectionMethod
29-
* @throws ReflectionException
26+
* @return \ReflectionMethod
27+
* @throws \ReflectionException
3028
*/
3129
private function getNextTagMethod()
3230
{
@@ -67,9 +65,9 @@ public function provideGetNextTag() {
6765

6866
/**
6967
* @param $level
70-
* @param $version
68+
* @param \vierbergenlars\SemVer\version $version
7169
* @param $expected
72-
* @throws ReflectionException
70+
* @throws \ReflectionException
7371
* @test
7472
* @dataProvider provideGetNextTag
7573
*/

0 commit comments

Comments
 (0)