Skip to content

Commit 1d8cc18

Browse files
ping-localhostHidde Boomsma
authored andcommitted
Updated hostnet/phpcs-tool (#7)
1 parent be8e59e commit 1d8cc18

File tree

5 files changed

+14
-7
lines changed

5 files changed

+14
-7
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ services:
44
- mysql
55

66
php:
7-
- 5.6
8-
- 7.0
97
- 7.1
8+
- 7.2
109
- nightly
1110

1211
matrix:

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
"description": "Provide a real database, safe for testing purposes",
55
"license": "MIT",
66
"require": {
7-
"php": "^5.6|^7.0",
7+
"php": ">=7.1",
88
"doctrine/orm": "^2.5.4"
99
},
1010
"require-dev": {
11-
"hostnet/phpcs-tool": "^4.0.6",
11+
"hostnet/phpcs-tool": "^6.0.2",
1212
"phpunit/phpunit": "^5.3.2"
1313
},
1414
"autoload": {

src/ConnectionInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
/**
33
* @copyright 2016-2017 Hostnet B.V.
44
*/
5+
declare(strict_types=1);
6+
57
namespace Hostnet\Component\DatabaseTest;
68

79
/**

src/MysqlPersistentConnection.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
/**
33
* @copyright 2016-2017 Hostnet B.V.
44
*/
5+
declare(strict_types=1);
6+
57
namespace Hostnet\Component\DatabaseTest;
68

79
/**
@@ -69,10 +71,12 @@ public function __construct()
6971
$this->pipe = $pipes[0];
7072

7173
foreach (explode(',', $data) as $param) {
72-
if (strpos($param, ':') !== false) {
73-
list($key, $value) = explode(':', $param);
74-
$this->connection_params[trim($key)] = trim($value);
74+
if (strpos($param, ':') === false) {
75+
continue;
7576
}
77+
78+
list($key, $value) = explode(':', $param);
79+
$this->connection_params[trim($key)] = trim($value);
7680
}
7781
}
7882

test/MysqlPersistentConnectionTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
/**
33
* @copyright 2016-2017 Hostnet B.V.
44
*/
5+
declare(strict_types=1);
6+
57
namespace Hostnet\Component\DatabaseTest;
68

79
use Doctrine\DBAL\DriverManager;

0 commit comments

Comments
 (0)