Skip to content

Commit 7e16cb6

Browse files
committed
update phpunit config. format codes
1 parent a59b1e1 commit 7e16cb6

File tree

5 files changed

+21
-18
lines changed

5 files changed

+21
-18
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/cli-utils",
33
"type": "library",
44
"description": "some cli 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/cli-utils",
711
"license": "MIT",
812
"authors": [
@@ -17,7 +21,7 @@
1721
},
1822
"autoload": {
1923
"psr-4": {
20-
"Toolkit\\Cli\\" : "src/"
24+
"Toolkit\\Cli\\": "src/"
2125
}
2226
},
2327
"suggest": {

phpunit.xml.dist

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

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

src/Console.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public static function log(string $msg, array $data = [], string $type = 'info',
6060
$type,
6161
$optString,
6262
\trim($msg),
63-
$data ? PHP_EOL . \json_encode($data, \JSON_UNESCAPED_SLASHES|\JSON_PRETTY_PRINT) : ''
63+
$data ? PHP_EOL . \json_encode($data, \JSON_UNESCAPED_SLASHES | \JSON_PRETTY_PRINT) : ''
6464
));
6565
}
6666
}

src/Download.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function __construct(string $url, string $saveAs, $type = self::PROGRESS_
6565
public function start(): self
6666
{
6767
if (!$this->url || !$this->saveAs) {
68-
throw new \RuntimeException("Please the property 'url' and 'saveAs'.", - 1);
68+
throw new \RuntimeException("Please the property 'url' and 'saveAs'.", -1);
6969
}
7070

7171
$ctx = stream_context_create();

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\Cli\Example\\')) {
13+
if (0 === strpos($class, 'Toolkit\Cli\Example\\')) {
1414
$path = str_replace('\\', '/', substr($class, strlen('Toolkit\Cli\Example\\')));
1515
$file = dirname(__DIR__) . "/example/{$path}.php";
16-
} elseif (0 === strpos($class,'Toolkit\Cli\Test\\')) {
16+
} elseif (0 === strpos($class, 'Toolkit\Cli\Test\\')) {
1717
$path = str_replace('\\', '/', substr($class, strlen('Toolkit\Cli\Test\\')));
1818
$file = __DIR__ . "/{$path}.php";
19-
} elseif (0 === strpos($class,'Toolkit\Cli\\')) {
19+
} elseif (0 === strpos($class, 'Toolkit\Cli\\')) {
2020
$path = str_replace('\\', '/', substr($class, strlen('Toolkit\Cli\\')));
2121
$file = dirname(__DIR__) . "/src/{$path}.php";
2222
}

0 commit comments

Comments
 (0)