Skip to content

Commit

Permalink
Fix phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Oct 27, 2024
1 parent 8fdb638 commit a336907
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function parse(mixed $value): mixed
if (is_string($value)) {
$normalizedValue = normalize_line_endings($value);
return preg_replace_callback('/\{\{\s*([\w\.\/-]+)\s*\}\}/', function (array $matches) {
return isset($matches[1]) ? $this->get($matches[1]) : null;
return $this->get($matches[1]);
}, $normalizedValue);
}

Expand Down
3 changes: 1 addition & 2 deletions src/ProcessRunner/ProcessRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Deployer\Exception\TimeoutException;
use Deployer\Host\Host;
use Deployer\Logger\Logger;
use Deployer\ProcessRunner\Printer;
use Symfony\Component\Process\Exception\ProcessFailedException;
use Symfony\Component\Process\Exception\ProcessTimedOutException;
use Symfony\Component\Process\Process;
Expand Down Expand Up @@ -72,7 +71,7 @@ public function run(Host $host, string $command, array $config = []): string
$process->getOutput(),
$process->getErrorOutput(),
);
} catch (ProcessTimedOutException $exception) {
} catch (ProcessTimedOutException $exception) { // @phpstan-ignore-line PHPStan doesn't know about ProcessTimedOutException for some reason.
throw new TimeoutException(
$command,
$exception->getExceededTimeout(),
Expand Down

0 comments on commit a336907

Please sign in to comment.