diff --git a/src/Cli/Console/Application.php b/src/Cli/Console/Application.php index d0109e2..aaf8320 100644 --- a/src/Cli/Console/Application.php +++ b/src/Cli/Console/Application.php @@ -16,7 +16,7 @@ final class Application extends ConsoleApplication /** * Home directory. */ - protected string $home; + protected ?string $home = null; /** * {@inheritDoc} @@ -49,10 +49,8 @@ public function getDefinition(): InputDefinition /** * Get path to home directory. - * - * @return string */ - public function getHome() + public function getHome(): string { if (null === $this->home) { $this->home = getenv('HOME'); @@ -63,11 +61,9 @@ public function getHome() /** * Set path to home directory. - * - * @param string $home */ - public function setHome($home) + public function setHome(string $home): void { - $this->home = (string) $home; + $this->home = $home; } } diff --git a/src/Generator/RecursiveParentExceptionResolver.php b/src/Generator/RecursiveParentExceptionResolver.php index 57003eb..cec75ea 100644 --- a/src/Generator/RecursiveParentExceptionResolver.php +++ b/src/Generator/RecursiveParentExceptionResolver.php @@ -41,7 +41,7 @@ private function registerDefaultListeners(): void /** * Returns an array containing arrays with parent exception folder and its namespace */ - public function resolveExceptionDirs(string $path): array + public function resolveExceptionDirs(string $path): ?array { $exceptionDirArray = null; $eventDispatcher = $this->eventDispatcher;