Skip to content

Commit c71f53e

Browse files
committed
fix: Fix some issues with PHP 8
1 parent 92255a1 commit c71f53e

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

lib/Compiler/Tag/Example.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ class Example implements CompilerInterface
2323
public function __construct($docBlock)
2424
{
2525
$docBlock = new DocBlock($docBlock);
26-
$this->tag = trim($docBlock->getTag('example'));
26+
27+
$this->tag = trim($docBlock->getTag('example') ?? '');
2728
}
2829

2930
/**

lib/Console/ReferenceGenerator.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ protected function configure()
8989
/**
9090
* @param InputInterface $input
9191
* @param OutputInterface $output
92-
* @return int|null|void
92+
* @return int
9393
* @throws \InvalidArgumentException
9494
*/
95-
protected function execute(InputInterface $input, OutputInterface $output)
95+
protected function execute(InputInterface $input, OutputInterface $output) : int
9696
{
9797
$files = $this->getFiles($input);
9898
$message = $this->handleClassCollection($input, $output, $files);
@@ -102,6 +102,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
102102
}
103103

104104
$output->writeln($message);
105+
106+
return 0;
105107
}
106108

107109
/**
@@ -114,7 +116,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
114116
public function getFiles(InputInterface $input)
115117
{
116118
$files = $input->getArgument(self::ARG_FILES);
117-
$ignore = explode(',', $input->getOption(self::OPT_IGNORE));
119+
$ignore = explode(',', $input->getOption(self::OPT_IGNORE) ?: '');
118120

119121
if (is_dir($files)) {
120122
$files = $this->getFilesInFolder($files, $ignore);

0 commit comments

Comments
 (0)