Skip to content

Commit

Permalink
Enhancement: Enable no_superfluous_phpdoc_tags fixer (#525)
Browse files Browse the repository at this point in the history
* Enhancement: Enable no_superfluous_phpdoc_tags fixer

* Fix: Run php-cs-fixer

* Fix: Remove useless DocBlocks
  • Loading branch information
localheinz authored and maks-rafalko committed Nov 1, 2018
1 parent e0253ba commit 2439066
Show file tree
Hide file tree
Showing 104 changed files with 1 addition and 249 deletions.
1 change: 1 addition & 0 deletions .php_cs.dist
Expand Up @@ -51,6 +51,7 @@ return \PhpCsFixer\Config::create()
'native_function_invocation' => [
'include' => ['@compiler_optimized']
],
'no_superfluous_phpdoc_tags' => true,
'no_useless_else'=> true,
'ordered_class_elements' => true,
'ordered_imports' => true,
Expand Down
2 changes: 0 additions & 2 deletions src/Command/InfectionCommand.php
Expand Up @@ -290,8 +290,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
/**
* Run configuration command if config does not exist
*
* @param InputInterface $input
* @param OutputInterface $output
*
* @throws InfectionException
*/
Expand Down
1 change: 0 additions & 1 deletion src/Config/Guesser/SourceDirGuesser.php
Expand Up @@ -95,7 +95,6 @@ private function parsePsrSection(array $autoloadDirs): array

/**
* @param array|string $path
* @param array $dirs
*/
private function parsePath($path, array &$dirs): void
{
Expand Down
5 changes: 0 additions & 5 deletions src/Console/OutputFormatter/OutputFormatter.php
Expand Up @@ -41,16 +41,11 @@ interface OutputFormatter
{
/**
* Triggered when mutation testing is being started
*
* @param int $mutationCount
*/
public function start(int $mutationCount);

/**
* Triggered each time mutation process is finished for one Mutant
*
* @param MutantProcessInterface $mutantProcess
* @param int $mutationCount
*/
public function advance(MutantProcessInterface $mutantProcess, int $mutationCount);

Expand Down
7 changes: 0 additions & 7 deletions src/Differ/Differ.php
Expand Up @@ -49,11 +49,6 @@ class Differ
*/
private $differ;

/**
* Differ constructor.
*
* @param BaseDiffer $differ
*/
public function __construct(BaseDiffer $differ)
{
$this->differ = $differ;
Expand All @@ -66,8 +61,6 @@ public function __construct(BaseDiffer $differ)
*
* @param array|string $from
* @param array|string $to
*
* @return string
*/
public function diff($from, $to): string
{
Expand Down
2 changes: 0 additions & 2 deletions src/EventDispatcher/EventDispatcher.php
Expand Up @@ -68,8 +68,6 @@ public function addSubscriber(EventSubscriberInterface $eventSubscriber): void
}

/**
* @param string $eventName
*
* @return callable[]
*/
private function getListeners(string $eventName): array
Expand Down
2 changes: 0 additions & 2 deletions src/EventDispatcher/EventDispatcherInterface.php
Expand Up @@ -42,8 +42,6 @@ interface EventDispatcherInterface
{
/**
* Dispatches an event
*
* @param mixed $event
*/
public function dispatch($event);

Expand Down
3 changes: 0 additions & 3 deletions src/Finder/AbstractExecutableFinder.php
Expand Up @@ -43,9 +43,6 @@ abstract class AbstractExecutableFinder
abstract public function find(): string;

/**
* @param array $probableNames
* @param array $extraDirectories
*
* @return string|null
*/
protected function searchNonExecutables(array $probableNames, array $extraDirectories = [])
Expand Down
3 changes: 0 additions & 3 deletions src/Logger/DebugFileLogger.php
Expand Up @@ -73,9 +73,6 @@ protected function getLogLines(): array

/**
* @param MutantProcessInterface[] $processes
* @param string $headlinePrefix
*
* @return string
*/
private function convertProcess(array $processes, string $headlinePrefix): string
{
Expand Down
3 changes: 0 additions & 3 deletions src/Logger/TextFileLogger.php
Expand Up @@ -59,9 +59,6 @@ protected function getLogLines(): array

/**
* @param MutantProcessInterface[] $processes
* @param string $headlinePrefix
*
* @return string
*/
private function getLogParts(array $processes, string $headlinePrefix): string
{
Expand Down
2 changes: 0 additions & 2 deletions src/Mutant/Generator/MutationsGenerator.php
Expand Up @@ -107,7 +107,6 @@ public function __construct(

/**
* @param bool $onlyCovered mutate only covered by tests lines of code
* @param string $filter
* @param NodeVisitorAbstract[] $extraNodeVisitors
*
* @return Mutation[]
Expand All @@ -134,7 +133,6 @@ public function generate(bool $onlyCovered, string $filter = '', array $extraNod
}

/**
* @param SplFileInfo $file
* @param bool $onlyCovered mutate only covered by tests lines of code
* @param NodeVisitorAbstract[] $extraNodeVisitors extra visitors to influence to mutation collection process
*
Expand Down
19 changes: 0 additions & 19 deletions src/Mutant/MetricsCalculator.php
Expand Up @@ -151,8 +151,6 @@ public function collect(MutantProcessInterface $mutantProcess): void

/**
* Mutation Score Indicator (MSI)
*
* @return float
*/
public function getMutationScoreIndicator(): float
{
Expand All @@ -168,8 +166,6 @@ public function getMutationScoreIndicator(): float

/**
* Mutation coverage percentage
*
* @return float
*/
public function getCoverageRate(): float
{
Expand All @@ -196,41 +192,26 @@ public function getCoveredCodeMutationScoreIndicator(): float
return $detectionRateTested;
}

/**
* @return int
*/
public function getKilledCount(): int
{
return $this->killedCount;
}

/**
* @return int
*/
public function getEscapedCount(): int
{
return $this->escapedCount;
}

/**
* @return int
*/
public function getTimedOutCount(): int
{
return $this->timedOutCount;
}

/**
* @return int
*/
public function getNotCoveredByTestsCount(): int
{
return $this->notCoveredByTestsCount;
}

/**
* @return int
*/
public function getTotalMutantsCount(): int
{
return $this->totalMutantsCount;
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Arithmetic/Assignment.php
Expand Up @@ -46,7 +46,6 @@ final class Assignment extends Mutator
/**
* Replaces "+=", "*=", ".=", and similar with a plain "="
*
* @param Node $node
*
* @return Node\Expr\Assign
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Arithmetic/AssignmentEqual.php
Expand Up @@ -46,7 +46,6 @@ final class AssignmentEqual extends Mutator
/**
* Replaces "==" with "="
*
* @param Node $node
*
* @return Node\Expr\Assign
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Arithmetic/BitwiseAnd.php
Expand Up @@ -46,7 +46,6 @@ final class BitwiseAnd extends Mutator
/**
* Replaces "&" with "|"
*
* @param Node $node
*
* @return Node\Expr\BinaryOp\BitwiseOr
*/
Expand Down
4 changes: 0 additions & 4 deletions src/Mutator/Arithmetic/BitwiseNot.php
Expand Up @@ -45,10 +45,6 @@ final class BitwiseNot extends Mutator
{
/**
* Replaces "~" with "" (removed)
*
* @param Node $node
*
* @return mixed
*/
public function mutate(Node $node)
{
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Arithmetic/BitwiseOr.php
Expand Up @@ -46,7 +46,6 @@ final class BitwiseOr extends Mutator
/**
* Replaces "|" with "&"
*
* @param Node $node
*
* @return Node\Expr\BinaryOp\BitwiseAnd
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Arithmetic/BitwiseXor.php
Expand Up @@ -46,7 +46,6 @@ final class BitwiseXor extends Mutator
/**
* Replaces "^" with "&"
*
* @param Node $node
*
* @return Node\Expr\BinaryOp\BitwiseAnd
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Arithmetic/Decrement.php
Expand Up @@ -50,7 +50,6 @@ final class Decrement extends Mutator
/**
* Replaces "--" with "++"
*
* @param Node $node
*
* @return PreInc|PostInc
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Arithmetic/DivEqual.php
Expand Up @@ -46,7 +46,6 @@ final class DivEqual extends Mutator
/**
* Replaces "/=" with "*="
*
* @param Node $node
*
* @return Node\Expr\AssignOp\Mul
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Arithmetic/Division.php
Expand Up @@ -46,7 +46,6 @@ final class Division extends Mutator
/**
* Replaces "/" with "*"
*
* @param Node $node
*
* @return Node\Expr\BinaryOp\Mul
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Arithmetic/Exponentiation.php
Expand Up @@ -46,7 +46,6 @@ final class Exponentiation extends Mutator
/**
* Replaces "**" with "/"
*
* @param Node $node
*
* @return Node\Expr\BinaryOp\Div
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Arithmetic/Increment.php
Expand Up @@ -50,7 +50,6 @@ final class Increment extends Mutator
/**
* Replaces "++" with "--"
*
* @param Node $node
*
* @return PostDec|PreDec
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Arithmetic/Minus.php
Expand Up @@ -46,7 +46,6 @@ final class Minus extends Mutator
/**
* Replaces "-" with "+"
*
* @param Node $node
*
* @return Node\Expr\BinaryOp\Plus
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Arithmetic/MinusEqual.php
Expand Up @@ -46,7 +46,6 @@ final class MinusEqual extends Mutator
/**
* Replaces "-=" with "+="
*
* @param Node $node
*
* @return Node\Expr\AssignOp\Plus
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Arithmetic/ModEqual.php
Expand Up @@ -46,7 +46,6 @@ final class ModEqual extends Mutator
/**
* Replaces "%=" with "*="
*
* @param Node $node
*
* @return Node\Expr\AssignOp\Mul
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Arithmetic/Modulus.php
Expand Up @@ -46,7 +46,6 @@ final class Modulus extends Mutator
/**
* Replaces "%" with "*"
*
* @param Node $node
*
* @return Node\Expr\BinaryOp\Mul
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Arithmetic/MulEqual.php
Expand Up @@ -46,7 +46,6 @@ final class MulEqual extends Mutator
/**
* Replaces "*=" with "/="
*
* @param Node $node
*
* @return Node\Expr\AssignOp\Div
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Arithmetic/Multiplication.php
Expand Up @@ -46,7 +46,6 @@ final class Multiplication extends Mutator
/**
* Replaces "*" with "/"
*
* @param Node $node
*
* @return Node\Expr\BinaryOp\Div
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Arithmetic/Plus.php
Expand Up @@ -47,7 +47,6 @@ final class Plus extends Mutator
/**
* Replaces "+" with "-"
*
* @param Node $node
*
* @return Node\Expr\BinaryOp\Minus
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Arithmetic/PlusEqual.php
Expand Up @@ -46,7 +46,6 @@ final class PlusEqual extends Mutator
/**
* Replaces "+=" with "-="
*
* @param Node $node
*
* @return Node\Expr\AssignOp\Minus
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Arithmetic/PowEqual.php
Expand Up @@ -46,7 +46,6 @@ final class PowEqual extends Mutator
/**
* Replaces "**=" with "/="
*
* @param Node $node
*
* @return Node\Expr\AssignOp\Div
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Arithmetic/ShiftLeft.php
Expand Up @@ -46,7 +46,6 @@ final class ShiftLeft extends Mutator
/**
* Replaces "<<" with ">>"
*
* @param Node $node
*
* @return Node\Expr\BinaryOp\ShiftRight
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Arithmetic/ShiftRight.php
Expand Up @@ -46,7 +46,6 @@ final class ShiftRight extends Mutator
/**
* Replaces ">>" with "<<"
*
* @param Node $node
*
* @return Node\Expr\BinaryOp\ShiftLeft
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Boolean/ArrayItem.php
Expand Up @@ -46,7 +46,6 @@ final class ArrayItem extends Mutator
/**
* Replaces "[$a->foo => $b->bar]" with "[$a->foo > $b->bar]"
*
* @param Node $node
*
* @return Node\Expr\BinaryOp\Greater
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Boolean/EqualIdentical.php
Expand Up @@ -46,7 +46,6 @@ final class EqualIdentical extends Mutator
/**
* Replaces "==" with "==="
*
* @param Node $node
*
* @return Node\Expr\BinaryOp\Identical
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Boolean/FalseValue.php
Expand Up @@ -46,7 +46,6 @@ final class FalseValue extends Mutator
/**
* Replaces "false" with "true"
*
* @param Node $node
*
* @return Node\Expr\ConstFetch
*/
Expand Down
1 change: 0 additions & 1 deletion src/Mutator/Boolean/IdenticalEqual.php
Expand Up @@ -46,7 +46,6 @@ final class IdenticalEqual extends Mutator
/**
* Replaces "===" with "=="
*
* @param Node $node
*
* @return Node\Expr\BinaryOp\Equal
*/
Expand Down

0 comments on commit 2439066

Please sign in to comment.