Skip to content

Commit

Permalink
phpstan fix
Browse files Browse the repository at this point in the history
  • Loading branch information
paveljanda committed Nov 20, 2018
1 parent 9de4578 commit 50e4a08
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Console/GenerateDocuCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ public function initialize(InputInterface $input, OutputInterface $output): void
$httpAuthPass = $input->getOption('httpAuthPass');
$overwriteOutputDir = $input->getOption('overwriteOutputDir');

if (!is_string($inputDirectory) && $inputDirectory !== null) {
if (!is_string($inputDirectory)) {
throw new \UnexpectedValueException;
}

if (!is_string($outputDirectory) && $outputDirectory !== null) {
if (!is_string($outputDirectory)) {
throw new \UnexpectedValueException;
}

Expand All @@ -139,7 +139,7 @@ public function initialize(InputInterface $input, OutputInterface $output): void
$httpAuthPass
);

$this->overwriteOutputDir = $input->getOption('overwriteOutputDir');
$this->overwriteOutputDir = $overwriteOutputDir;

$this->logger = new Logger($output);

Expand Down
3 changes: 3 additions & 0 deletions src/Markdown/Macro/Index/AbstractIndexSection.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
abstract class AbstractIndexSection implements IIndexSection
{

/**
* @var string
*/
protected static $pattern = '/.+/';

/**
Expand Down
3 changes: 3 additions & 0 deletions src/Markdown/Macro/Index/IndexSection.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
final class IndexSection extends AbstractIndexSection
{

/**
* @var string
*/
protected static $pattern = '/^(@@?) ?.+[^:]:.+\.md/';
}
3 changes: 3 additions & 0 deletions src/Markdown/Macro/Index/IndexSubTitle.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
final class IndexSubTitle extends AbstractIndexSection
{

/**
* @var string
*/
protected static $pattern = '/^(##) .+/';
}
3 changes: 3 additions & 0 deletions src/Markdown/Macro/Index/IndexTitle.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
final class IndexTitle extends AbstractIndexSection
{

/**
* @var string
*/
protected static $pattern = '/^# .+/';
}

0 comments on commit 50e4a08

Please sign in to comment.