Skip to content

Commit

Permalink
chore: define nullable arg on processConfigFnIntoSetup and AppConfigB…
Browse files Browse the repository at this point in the history
…uilder

Otherwise, PHP 8.4 will trigger a warning message
  • Loading branch information
Chemaclass committed Nov 30, 2024
1 parent dfd8f02 commit ec5d2ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ final class AppConfigBuilder
* @param string $pathLocal define the path where Gacela will read the local config file
* @param class-string<ConfigReaderInterface>|ConfigReaderInterface|null $reader Define the reader class which will read and parse the config files
*/
public function add(string $path, string $pathLocal = '', string|ConfigReaderInterface $reader = null): self
public function add(string $path, string $pathLocal = '', string|ConfigReaderInterface|null $reader = null): self
{
$readerInstance = $this->normalizeReader($reader);

Expand Down
2 changes: 1 addition & 1 deletion src/Framework/Gacela.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public static function overrideExistingResolvedClass(string $className, object $
/**
* @param null|Closure(GacelaConfig):void $configFn
*/
private static function processConfigFnIntoSetup(Closure $configFn = null): SetupGacelaInterface
private static function processConfigFnIntoSetup(?Closure $configFn = null): SetupGacelaInterface
{
if ($configFn instanceof Closure) {
return SetupGacela::fromCallable($configFn);
Expand Down

0 comments on commit ec5d2ec

Please sign in to comment.