Skip to content
This repository was archived by the owner on Jun 17, 2020. It is now read-only.

Commit 8327b82

Browse files
committed
update phpunit config. format codes
1 parent 7f3d031 commit 8327b82

File tree

8 files changed

+27
-24
lines changed

8 files changed

+27
-24
lines changed

composer.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
"name": "toolkit/file-utils",
33
"type": "library",
44
"description": "some file tool library of the php",
5-
"keywords": ["library","tool","php"],
5+
"keywords": [
6+
"library",
7+
"tool",
8+
"php"
9+
],
610
"homepage": "https://github.com/php-toolkit/file-utils",
711
"license": "MIT",
812
"authors": [
@@ -17,7 +21,7 @@
1721
},
1822
"autoload": {
1923
"psr-4": {
20-
"Toolkit\\File\\" : "src/"
24+
"Toolkit\\File\\": "src/"
2125
}
2226
},
2327
"suggest": {

example/file-finder.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
// ->ignoreDotFiles(false)
1919
// ->exclude('tmp')
2020
->notPath('tmp')
21-
->inDir(dirname(__DIR__))
22-
;
21+
->inDir(dirname(__DIR__));
2322

2423
foreach ($finder as $file) {
2524
// var_dump($file);die;

phpunit.xml.dist

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
convertNoticesToExceptions="true"
99
convertWarningsToExceptions="true"
1010
stopOnFailure="false"
11-
syntaxCheck="false"
11+
1212
>
13-
<testsuites>
14-
<testsuite name="Php Library Test Suite">
15-
<directory>test</directory>
16-
</testsuite>
17-
</testsuites>
13+
<testsuites>
14+
<testsuite name="Php Library Test Suite">
15+
<directory>test</directory>
16+
</testsuite>
17+
</testsuites>
1818

19-
<filter>
20-
<whitelist>
21-
<directory suffix=".php">src</directory>
22-
</whitelist>
23-
</filter>
19+
<filter>
20+
<whitelist>
21+
<directory suffix=".php">src</directory>
22+
</whitelist>
23+
</filter>
2424
</phpunit>

src/Directory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
namespace Toolkit\File;
1111

1212
use DirectoryIterator;
13-
use Toolkit\File\Exception\FileSystemException;
1413
use Toolkit\File\Exception\FileNotFoundException;
14+
use Toolkit\File\Exception\FileSystemException;
1515

1616
/**
1717
* Class Directory

src/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public static function write($content, $path)
134134
}
135135

136136
/**
137-
* @param string$path
137+
* @param string $path
138138
* @return resource
139139
* @throws IOException
140140
*/

src/FileSystem.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111
namespace Toolkit\File;
1212

13-
use Toolkit\File\Exception\IOException;
14-
use Toolkit\File\Exception\FileNotFoundException;
1513
use Toolkit\ArrUtil\Arr;
14+
use Toolkit\File\Exception\FileNotFoundException;
15+
use Toolkit\File\Exception\IOException;
1616

1717
/**
1818
* Class FileSystem

src/ReadTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
namespace Toolkit\File;
1111

1212
use Toolkit\File\Exception\FileNotFoundException;
13-
use Toolkit\File\Exception\FileSystemException;
1413
use Toolkit\File\Exception\FileReadException;
14+
use Toolkit\File\Exception\FileSystemException;
1515
use Toolkit\File\Parser\IniParser;
1616
use Toolkit\File\Parser\JsonParser;
1717
use Toolkit\File\Parser\YmlParser;
@@ -244,7 +244,7 @@ public static function tail($fp, int $n, int $base = 5): array
244244
$pos = $n + 1;
245245
$lines = [];
246246

247-
while (\count($lines) <= $n) {
247+
while (\count($lines) <= $n) {
248248
try {
249249
fseek($fp, -$pos, SEEK_END);
250250
} catch (\Exception $e) {

test/boot.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
spl_autoload_register(function ($class) {
1111
$file = null;
1212

13-
if (0 === strpos($class,'Toolkit\File\Example\\')) {
13+
if (0 === strpos($class, 'Toolkit\File\Example\\')) {
1414
$path = str_replace('\\', '/', substr($class, strlen('Toolkit\File\Example\\')));
1515
$file = dirname(__DIR__) . "/example/{$path}.php";
16-
} elseif (0 === strpos($class,'Toolkit\File\Test\\')) {
16+
} elseif (0 === strpos($class, 'Toolkit\File\Test\\')) {
1717
$path = str_replace('\\', '/', substr($class, strlen('Toolkit\File\Test\\')));
1818
$file = __DIR__ . "/{$path}.php";
19-
} elseif (0 === strpos($class,'Toolkit\File\\')) {
19+
} elseif (0 === strpos($class, 'Toolkit\File\\')) {
2020
$path = str_replace('\\', '/', substr($class, strlen('Toolkit\File\\')));
2121

2222
$file = dirname(__DIR__) . "/src/{$path}.php";

0 commit comments

Comments
 (0)