update docs

This commit is contained in:
Tomas Votruba 2018-07-31 14:50:39 +02:00
parent 3c95af05f3
commit 722f8e9b88
4 changed files with 709 additions and 410 deletions

File diff suppressed because it is too large Load Diff

View File

@ -24,6 +24,7 @@ parameters:
- '#Call to function in_array\(\) with arguments string, array<array<string\|false>> and true will always evaluate to false#'
# known values
- '#Method Rector\\Console\\Command\\DescribeCommand::getRectorsByInput\(\) should return array<Rector\\Contract\\Rector\\RectorInterface|Rector\\YamlRector\\Contract \\YamlRectorInterface> but returns array<int, object>#'
- '#Cannot call method getAttribute\(\) on PhpParser\\Node\\Name\|null#'
- '#Parameter \#2 \$str of function explode expects string, string\|null given#'
- '#Cannot call method getName\(\) on Rector\\Builder\\Class_\\VariableInfo\|null#'

View File

@ -144,7 +144,7 @@ final class DescribeCommand extends Command
$robotLoader->addDirectory(__DIR__ . '/../../Rector');
$robotLoader->addDirectory(__DIR__ . '/../../../packages');
$robotLoader->setTempDirectory(sys_get_temp_dir() . '/_rector_finder');
$robotLoader->acceptFiles = '*Rector.php';
$robotLoader->acceptFiles = ['*Rector.php'];
return $robotLoader;
}

View File

@ -28,7 +28,7 @@ final class DescribeCommandReporter
}
/**
* @param RectorInterface[] $rectors
* @param RectorInterface[]|YamlRectorInterface[] $rectors
*/
public function reportRectorsInFormat(array $rectors, string $outputFormat, bool $showDiffs): void
{
@ -74,7 +74,10 @@ final class DescribeCommandReporter
}
}
private function printWithMarkdownFormat(bool $showDiffs, RectorInterface $rector): void
/**
* @param RectorInterface|YamlRectorInterface $rector
*/
private function printWithMarkdownFormat(bool $showDiffs, $rector): void
{
$this->consoleStyle->writeln('## ' . get_class($rector));