Skip to content

Commit

Permalink
[php8] Refactoring code to use PHP 8 features.
Browse files Browse the repository at this point in the history
  • Loading branch information
bbankowski committed Mar 29, 2021
1 parent 4727bc7 commit b2c6e6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Utilities/Path.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Path
* /my/path/to/file.txt
* </code>
*/
public static function join(string ...$args): string
public static function join(?string ...$args): string
{
$args = Arrays::filterNotBlank($args);
$path = preg_replace('~[/\\\]+~', DIRECTORY_SEPARATOR, implode(DIRECTORY_SEPARATOR, $args));
Expand Down
2 changes: 1 addition & 1 deletion Utilities/TimeAgo.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TimeAgo
private string $key;
private array $params = [];

public function __construct(private string $date)
public function __construct(private ?string $date)
{
$this->prepare();
}
Expand Down

0 comments on commit b2c6e6e

Please sign in to comment.