Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 028d363

Browse files
committed
up: fix some code syntax check error on php8.4
1 parent 803a0c9 commit 028d363

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

‎src/Extra/FileTreeBuilder.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ public function files(array $files, string $contents = ''): static
264264
*
265265
* @return $this
266266
*/
267-
public function dir(string $dir, callable $intoFn = null): static
267+
public function dir(string $dir, ?callable $intoFn = null): static
268268
{
269269
Assert::notBlank($dir);
270270
$dirPath = $this->getRealpath($dir);
@@ -322,7 +322,7 @@ public function dirs(string ...$dirs): static
322322
*
323323
* @return $this
324324
*/
325-
public function into(string $dir, callable $intoFn = null): static
325+
public function into(string $dir, ?callable $intoFn = null): static
326326
{
327327
Assert::notBlank($dir);
328328
$dirPath = $this->getRealpath($dir);

‎src/Parser/AbstractParser.php‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ abstract class AbstractParser
4141
abstract protected static function doParse(
4242
string $string,
4343
bool $enhancement = false,
44-
callable $pathHandler = null,
44+
?callable $pathHandler = null,
4545
string $fileDir = ''
4646
): array;
4747

@@ -56,7 +56,7 @@ abstract protected static function doParse(
5656
public static function parse(
5757
string $string,
5858
bool $enhancement = false,
59-
callable $pathHandler = null,
59+
?callable $pathHandler = null,
6060
string $fileDir = ''
6161
): array {
6262
if (strlen($string) < 256 && is_file($string)) {
@@ -78,7 +78,7 @@ public static function parse(
7878
public static function parseFile(
7979
string $file,
8080
bool $enhancement = false,
81-
callable $pathHandler = null,
81+
?callable $pathHandler = null,
8282
string $fileDir = ''
8383
): array {
8484
if (!is_file($file)) {
@@ -102,7 +102,7 @@ public static function parseFile(
102102
public static function parseString(
103103
string $string,
104104
bool $enhancement = false,
105-
callable $pathHandler = null,
105+
?callable $pathHandler = null,
106106
string $fileDir = ''
107107
): array {
108108
return static::doParse($string, $enhancement, $pathHandler, $fileDir);
@@ -115,7 +115,7 @@ public static function parseString(
115115
*
116116
* @return string
117117
*/
118-
protected static function getImportFile(string $value, string $fileDir, callable $pathHandler = null): string
118+
protected static function getImportFile(string $value, string $fileDir, ?callable $pathHandler = null): string
119119
{
120120
// eg: 'import#other.yaml'
121121
$importFile = trim(substr($value, 7));

‎src/Parser/IniParser.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class IniParser extends AbstractParser
4444
protected static function doParse(
4545
string $string,
4646
bool $enhancement = false,
47-
callable $pathHandler = null,
47+
?callable $pathHandler = null,
4848
string $fileDir = ''
4949
): array {
5050
if (!$string) {

‎src/Parser/JsonParser.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class JsonParser extends AbstractParser
4444
protected static function doParse(
4545
string $string,
4646
bool $enhancement = false,
47-
callable $pathHandler = null,
47+
?callable $pathHandler = null,
4848
string $fileDir = ''
4949
): array {
5050
if (!$string) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /