Skip to content
This repository was archived by the owner on Apr 24, 2021. It is now read-only.

Commit 2ebc56a

Browse files
committed
update phpunit config. format codes
1 parent 22cab4f commit 2ebc56a

File tree

4 files changed

+28
-23
lines changed

4 files changed

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

example/property_exists.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
* Time: 12:45
77
*/
88

9-
class Some {
9+
class Some
10+
{
1011
public $prop0;
1112
private $prop1;
1213
protected $prop2;
@@ -23,14 +24,14 @@ public function getProp1()
2324

2425
echo "use class:\n";
2526

26-
echo 'public: ' . (property_exists(Some::class, 'prop0') ? 'Y':'N') . PHP_EOL;
27-
echo 'private: ' . (property_exists(Some::class, 'prop1') ? 'Y':'N') . PHP_EOL;
28-
echo 'protected: ' . (property_exists(Some::class, 'prop2') ? 'Y':'N') . PHP_EOL;
27+
echo 'public: ' . (property_exists(Some::class, 'prop0') ? 'Y' : 'N') . PHP_EOL;
28+
echo 'private: ' . (property_exists(Some::class, 'prop1') ? 'Y' : 'N') . PHP_EOL;
29+
echo 'protected: ' . (property_exists(Some::class, 'prop2') ? 'Y' : 'N') . PHP_EOL;
2930

3031
echo "use object:\n";
3132

3233
$object = new Some();
3334

34-
echo 'public: ' . (property_exists($object, 'prop0') ? 'Y':'N') . PHP_EOL;
35-
echo 'private: ' . (property_exists($object, 'prop1') ? 'Y':'N') . PHP_EOL;
36-
echo 'protected: ' . (property_exists($object, 'prop2') ? 'Y':'N') . PHP_EOL;
35+
echo 'public: ' . (property_exists($object, 'prop0') ? 'Y' : 'N') . PHP_EOL;
36+
echo 'private: ' . (property_exists($object, 'prop1') ? 'Y' : 'N') . PHP_EOL;
37+
echo 'protected: ' . (property_exists($object, 'prop2') ? 'Y' : 'N') . PHP_EOL;

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>

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

0 commit comments

Comments
 (0)