Skip to content

Commit

Permalink
Fixed two type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiang committed Feb 10, 2023
1 parent 5f46759 commit 1b26544
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions src/Cli/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class Application extends ConsoleApplication
/**
* Home directory.
*/
protected string $home;
protected ?string $home = null;

/**
* {@inheritDoc}
Expand Down Expand Up @@ -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');
Expand All @@ -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;
}
}
2 changes: 1 addition & 1 deletion src/Generator/RecursiveParentExceptionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1b26544

Please sign in to comment.