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

Commit 7c99a3b

Browse files
committed
Merge branch 'hotfix/213' into develop
Forward port #213
2 parents 5325839 + 7b2df0a commit 7c99a3b

File tree

8 files changed

+44
-28
lines changed

8 files changed

+44
-28
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ standards checks, and provides configuration for our selected checks.
7878
To run checks only:
7979

8080
```console
81-
$ ./vendor/bin/phpcs --standard=PSR2 src test
81+
$ composer cs-check
8282
```
8383

8484
`phpcs` also installs a tool named `phpcbf` which can attempt to fix problems
8585
for you:
8686

8787
```console
88-
$ ./vendor/bin/phpcbf --standard=PSR2 src test
88+
$ composer cs-fix
8989
```
9090

9191
If you allow phpcbf to fix CS issues, please re-run the tests to ensure

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
},
2626
"require-dev": {
2727
"phpunit/phpunit": "^4.6 || ^5.5",
28-
"squizlabs/php_codesniffer": "^2.3.1"
28+
"zendframework/zend-coding-standard": "~1.0.0"
2929
},
3030
"provide": {
3131
"psr/http-message-implementation": "~1.0.0"

composer.lock

Lines changed: 31 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpcs.xml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
11
<?xml version="1.0"?>
22
<ruleset name="Zend Framework coding standard">
3-
<description>Zend Framework coding standard</description>
4-
5-
<!-- display progress -->
6-
<arg value="p"/>
7-
<arg name="colors"/>
8-
9-
<!-- inherit rules from: -->
10-
<rule ref="PSR2"/>
11-
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
12-
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
13-
<properties>
14-
<property name="ignoreBlankLines" value="false"/>
15-
</properties>
16-
</rule>
3+
<rule ref="./vendor/zendframework/zend-coding-standard/ruleset.xml"/>
174

185
<!-- Paths to check -->
196
<file>src</file>

src/Uri.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -442,12 +442,12 @@ private function parseUri($uri)
442442
);
443443
}
444444

445-
$this->scheme = isset($parts['scheme']) ? $this->filterScheme($parts['scheme']) : '';
446-
$this->userInfo = isset($parts['user']) ? $parts['user'] : '';
447-
$this->host = isset($parts['host']) ? $parts['host'] : '';
448-
$this->port = isset($parts['port']) ? $parts['port'] : null;
449-
$this->path = isset($parts['path']) ? $this->filterPath($parts['path']) : '';
450-
$this->query = isset($parts['query']) ? $this->filterQuery($parts['query']) : '';
445+
$this->scheme = isset($parts['scheme']) ? $this->filterScheme($parts['scheme']) : '';
446+
$this->userInfo = isset($parts['user']) ? $parts['user'] : '';
447+
$this->host = isset($parts['host']) ? $parts['host'] : '';
448+
$this->port = isset($parts['port']) ? $parts['port'] : null;
449+
$this->path = isset($parts['path']) ? $this->filterPath($parts['path']) : '';
450+
$this->query = isset($parts['query']) ? $this->filterQuery($parts['query']) : '';
451451
$this->fragment = isset($parts['fragment']) ? $this->filterFragment($parts['fragment']) : '';
452452

453453
if (isset($parts['pass'])) {

test/RequestTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ public function headersWithInjectionVectors()
468468
public function testConstructorRaisesExceptionForHeadersWithCRLFVectors($name, $value)
469469
{
470470
$this->setExpectedException('InvalidArgumentException');
471-
$request = new Request(null, null, 'php://memory', [$name => $value]);
471+
$request = new Request(null, null, 'php://memory', [$name => $value]);
472472
}
473473

474474
public function hostHeaderKeys()

test/ResponseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,6 @@ public function headersWithInjectionVectors()
197197
public function testConstructorRaisesExceptionForHeadersWithCRLFVectors($name, $value)
198198
{
199199
$this->setExpectedException('InvalidArgumentException');
200-
$request = new Response('php://memory', 200, [$name => $value]);
200+
$request = new Response('php://memory', 200, [$name => $value]);
201201
}
202202
}

test/StreamTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ private function findNonExistentTempName()
288288
{
289289
while (true) {
290290
$tmpnam = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'diac' . uniqid();
291-
if (!file_exists(sys_get_temp_dir() . $tmpnam)) {
291+
if (! file_exists(sys_get_temp_dir() . $tmpnam)) {
292292
break;
293293
}
294294
}

0 commit comments

Comments
 (0)