Skip to content

Commit

Permalink
Fix php 8.4 deprecations implicitly marking parameter as nullable is …
Browse files Browse the repository at this point in the history
…deprecated
  • Loading branch information
8ctopus committed Dec 4, 2024
1 parent 8e1c07f commit dc59281
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ public static function load($values, $parser = null, $string = false)
* Loads a Config instance.
*
* @param string|array $values Filenames or string with configuration
* @param ParserInterface $parser Configuration parser
* @param ?ParserInterface $parser Configuration parser
* @param bool $string Enable loading from string
*/
public function __construct($values, ParserInterface $parser = null, $string = false)
public function __construct($values, ?ParserInterface $parser = null, $string = false)
{
if ($string === true) {
$this->loadFromString($values, $parser);
Expand All @@ -85,11 +85,11 @@ public function __construct($values, ParserInterface $parser = null, $string = f
* Loads configuration from file.
*
* @param string|array $path Filenames or directories with configuration
* @param ParserInterface $parser Configuration parser
* @param ?ParserInterface $parser Configuration parser
*
* @throws EmptyDirectoryException If `$path` is an empty directory
*/
protected function loadFromFile($path, ParserInterface $parser = null)
protected function loadFromFile($path, ?ParserInterface $parser = null)
{
$paths = $this->getValidPath($path);
$this->data = [];
Expand Down Expand Up @@ -125,11 +125,11 @@ protected function loadFromFile($path, ParserInterface $parser = null)
* Writes configuration to file.
*
* @param string $filename Filename to save configuration to
* @param WriterInterface $writer Configuration writer
* @param ?WriterInterface $writer Configuration writer
*
* @throws WriteException if the data could not be written to the file
*/
public function toFile($filename, WriterInterface $writer = null)
public function toFile($filename, ?WriterInterface $writer = null)
{
if ($writer === null) {
// Get file information
Expand Down

0 comments on commit dc59281

Please sign in to comment.