Skip to content

Commit

Permalink
Fix some PHP docs
Browse files Browse the repository at this point in the history
  • Loading branch information
villfa committed Nov 17, 2020
1 parent ed8498d commit 5e37dbb
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/Assessor/CyclomaticComplexityAssessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class CyclomaticComplexityAssessor
{
/**
* The total cyclomatic complexity score.
* @var integer.
* @var integer
*/
protected $score;

Expand Down
2 changes: 1 addition & 1 deletion src/Command/AssessComplexityCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
{
$file = $input->getArgument('file');
$assessor = new CyclomaticComplexityAssessor();
$output->writeln($assessor->assess($file));
$output->writeln((string) $assessor->assess($file));
return 0;
}
}
4 changes: 2 additions & 2 deletions src/Command/RunCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
* @param InputInterface $input Input Interface.
* @param array $dirsConfigured The directories configured to scan.
* @throws InvalidArgumentException If paths argument invalid.
* @return array When no directories to scan found.
* @return string[] When no directories to scan found.
*/
private function getDirectoriesToScan(InputInterface $input, array $dirsConfigured): array
{
$dirsProvidedAsArgs = $input->getArgument('paths');
$dirsProvidedAsArgs = (array) $input->getArgument('paths');
if (count($dirsProvidedAsArgs) > 0) {
return $dirsProvidedAsArgs;
}
Expand Down
8 changes: 4 additions & 4 deletions src/File/FileFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function __construct(array $fileExtensions, array $filesToIgnore)
* Recursively finds all files with the .php extension in the provided
* $paths and returns list as array.
* @param array $paths Paths in which to look for .php files.
* @return Generator
* @return Generator<int, File>
*/
public function getPhpFiles(array $paths): Generator
{
Expand All @@ -58,7 +58,7 @@ public function getPhpFiles(array $paths): Generator
* Recursively finds all files with the .php extension in the provided
* $path adds them to $this->files.
* @param string $path Path in which to look for .php files.
* @return Generator
* @return Generator<int, File>
*/
private function getPhpFilesFromPath(string $path): Generator
{
Expand All @@ -76,7 +76,7 @@ private function getPhpFilesFromPath(string $path): Generator
/**
* Recursively finds all PHP files in a given directory.
* @param string $path Path in which to look for .php files.
* @return Generator|SplFileInfo[]
* @return Generator<int, SplFileInfo>
*/
private function findPhpFiles(string $path): Generator
{
Expand All @@ -93,7 +93,7 @@ private function findPhpFiles(string $path): Generator
/**
* Recursively finds all files in a given directory.
* @param string $path Path in which to look for .php files.
* @return Generator|SplFileInfo[]
* @return Generator<int, SplFileInfo>
*/
private function findFiles(string $path): Generator
{
Expand Down
1 change: 0 additions & 1 deletion src/Process/ChangesCount/NoVcsChangesCountProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public function start(): void
/**
* Determines if the process was successful.
* @return boolean
* @throws ProcessFailedException If the process failed.
*/
public function isSuccessful(): bool
{
Expand Down
1 change: 0 additions & 1 deletion src/Process/ProcessInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public function start(): void;
/**
* Determines if the process was successful.
* @return boolean
* @throws ProcessFailedException If the process failed.
*/
public function isSuccessful(): bool;

Expand Down

0 comments on commit 5e37dbb

Please sign in to comment.