Skip to content

Commit a322dce

Browse files
committed
format all codes
1 parent 9630d45 commit a322dce

File tree

5 files changed

+44
-26
lines changed

5 files changed

+44
-26
lines changed

composer.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@
2222
},
2323
"autoload": {
2424
"psr-4": {
25-
<<<<<<< HEAD
25+
<<<<<<<
26+
HEAD
2627
"Toolkit\\File\\Parse\\": "src/"
27-
=======
28-
"Toolkit\\File\\Parse\\" : "src/"
29-
>>>>>>> 54f70647d1f38987bffbff758f41cb542c0d8212
28+
=======
29+
"Toolkit\\File\\Parse\\": "src/"
30+
>>>>>>>
31+
54f70647d1f38987bffbff758f41cb542c0d8212
3032
}
3133
},
3234
"suggest": {

src/BaseParser.php

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
*/
1515
abstract class BaseParser
1616
{
17-
const EXTEND_KEY = 'extend';
18-
const IMPORT_KEY = 'import';
17+
const EXTEND_KEY = 'extend';
18+
const IMPORT_KEY = 'import';
1919
const REFERENCE_KEY = 'reference';
2020

2121
/**
2222
* parse data
23-
* @param string $string Waiting for the parse data
24-
* @param bool $enhancement 启用增强功能,支持通过关键字 继承、导入、参考
23+
* @param string $string Waiting for the parse data
24+
* @param bool $enhancement 启用增强功能,支持通过关键字 继承、导入、参考
2525
* @param callable $pathHandler When the second param is true, this param is valid.
26-
* @param string $fileDir When the second param is true, this param is valid.
26+
* @param string $fileDir When the second param is true, this param is valid.
2727
* @return array
2828
*/
2929
abstract protected static function doParse(
@@ -34,10 +34,10 @@ abstract protected static function doParse(
3434
): array;
3535

3636
/**
37-
* @param $string
38-
* @param bool $enhancement
37+
* @param $string
38+
* @param bool $enhancement
3939
* @param callable|null $pathHandler
40-
* @param string $fileDir
40+
* @param string $fileDir
4141
* @return array
4242
*/
4343
public static function parse($string, $enhancement = false, callable $pathHandler = null, $fileDir = ''): array
@@ -50,10 +50,10 @@ public static function parse($string, $enhancement = false, callable $pathHandle
5050
}
5151

5252
/**
53-
* @param $file
54-
* @param bool $enhancement
53+
* @param $file
54+
* @param bool $enhancement
5555
* @param callable|null $pathHandler
56-
* @param string $fileDir
56+
* @param string $fileDir
5757
* @return array
5858
* @throws \InvalidArgumentException
5959
*/
@@ -70,14 +70,18 @@ public static function parseFile($file, $enhancement = false, callable $pathHand
7070
}
7171

7272
/**
73-
* @param $string
74-
* @param bool $enhancement
73+
* @param $string
74+
* @param bool $enhancement
7575
* @param callable|null $pathHandler
76-
* @param string $fileDir
76+
* @param string $fileDir
7777
* @return array
7878
*/
79-
public static function parseString($string, $enhancement = false, callable $pathHandler = null, $fileDir = ''): array
80-
{
79+
public static function parseString(
80+
$string,
81+
$enhancement = false,
82+
callable $pathHandler = null,
83+
$fileDir = ''
84+
): array {
8185
return static::doParse($string, $enhancement, $pathHandler, $fileDir);
8286
}
8387
}

src/IniParser.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,12 @@ class IniParser extends BaseParser
2424
* @throws \InvalidArgumentException
2525
* @throws \UnexpectedValueException
2626
*/
27-
protected static function doParse($string, $enhancement = false, callable $pathHandler = null, string $fileDir = ''): array
28-
{
27+
protected static function doParse(
28+
$string,
29+
$enhancement = false,
30+
callable $pathHandler = null,
31+
string $fileDir = ''
32+
): array {
2933
if (!$string) {
3034
return [];
3135
}

src/JsonParser.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@ class JsonParser extends BaseParser
2626
* @throws \InvalidArgumentException
2727
* @throws \UnexpectedValueException
2828
*/
29-
protected static function doParse($string, $enhancement = false, callable $pathHandler = null, string $fileDir = ''): array
30-
{
29+
protected static function doParse(
30+
$string,
31+
$enhancement = false,
32+
callable $pathHandler = null,
33+
string $fileDir = ''
34+
): array {
3135
if (!$string) {
3236
return [];
3337
}

src/YmlParser.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@ class YmlParser extends BaseParser
2626
* @throws \InvalidArgumentException
2727
* @throws \UnexpectedValueException
2828
*/
29-
protected static function doParse($string, $enhancement = false, callable $pathHandler = null, string $fileDir = ''): array
30-
{
29+
protected static function doParse(
30+
$string,
31+
$enhancement = false,
32+
callable $pathHandler = null,
33+
string $fileDir = ''
34+
): array {
3135
if (!$string) {
3236
return [];
3337
}

0 commit comments

Comments
 (0)