@@ -30,8 +30,8 @@ abstract protected static function doParse(
30
30
$ string ,
31
31
$ enhancement = false ,
32
32
callable $ pathHandler = null ,
33
- $ fileDir = ''
34
- );
33
+ string $ fileDir = ''
34
+ ): array ;
35
35
36
36
/**
37
37
* @param $string
@@ -40,7 +40,7 @@ abstract protected static function doParse(
40
40
* @param string $fileDir
41
41
* @return array
42
42
*/
43
- public static function parse ($ string , $ enhancement = false , callable $ pathHandler = null , $ fileDir = '' )
43
+ public static function parse ($ string , $ enhancement = false , callable $ pathHandler = null , $ fileDir = '' ): array
44
44
{
45
45
if (is_file ($ string )) {
46
46
return self ::parseFile ($ string , $ enhancement , $ pathHandler , $ fileDir );
@@ -57,7 +57,7 @@ public static function parse($string, $enhancement = false, callable $pathHandle
57
57
* @return array
58
58
* @throws \InvalidArgumentException
59
59
*/
60
- public static function parseFile ($ file , $ enhancement = false , callable $ pathHandler = null , $ fileDir = '' )
60
+ public static function parseFile ($ file , $ enhancement = false , callable $ pathHandler = null , $ fileDir = '' ): array
61
61
{
62
62
if (!is_file ($ file )) {
63
63
throw new \InvalidArgumentException ("Target file [ $ file] not exists " );
@@ -76,7 +76,7 @@ public static function parseFile($file, $enhancement = false, callable $pathHand
76
76
* @param string $fileDir
77
77
* @return array
78
78
*/
79
- public static function parseString ($ string , $ enhancement = false , callable $ pathHandler = null , $ fileDir = '' )
79
+ public static function parseString ($ string , $ enhancement = false , callable $ pathHandler = null , $ fileDir = '' ): array
80
80
{
81
81
return static ::doParse ($ string , $ enhancement , $ pathHandler , $ fileDir );
82
82
}
0 commit comments