Skip to content

Commit

Permalink
Merge pull request #358 from Roave/renovate/all-minor-patch
Browse files Browse the repository at this point in the history
Update dependency vimeo/psalm to ^5.20.0
  • Loading branch information
Ocramius authored Jan 18, 2024
2 parents a9a2118 + cf44f5f commit 2fe576b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"phpunit/phpunit": "^10.5.7",
"psalm/plugin-phpunit": "^0.18.4",
"roave/security-advisories": "dev-latest",
"vimeo/psalm": "^5.19.1"
"vimeo/psalm": "^5.20.0"
},
"autoload": {
"psr-4": {
Expand Down
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/DocbookPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private function determineTitleFromContent(): string
{
$firstLine = strtok($this->content, "\n");

if (! $firstLine || ! str_starts_with($firstLine, '<h1>') || ! str_ends_with($firstLine, '</h1>')) {
if ($firstLine === false || ! str_starts_with($firstLine, '<h1>') || ! str_ends_with($firstLine, '</h1>')) {
throw new RuntimeException('First line of markdown file ' . $this->slug() . ' did not start with "# "...');
}

Expand Down
7 changes: 6 additions & 1 deletion src/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,14 @@ public static function require(string $name): string
return $value;
}

/** @return non-empty-string|null */
public static function optional(string $name): string|null
{
return getenv($name) ?: null;
$value = getenv($name);

return $value === false || $value === ''
? null
: $value;
}

/** @param list<string> $trueValues */
Expand Down

0 comments on commit 2fe576b

Please sign in to comment.