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

Commit 26c8185

Browse files
author
tr
committed
Merge branch 'master' of git://github.com/zendframework/zf2
2 parents a1bfde3 + f329014 commit 26c8185

File tree

16 files changed

+30
-30
lines changed

16 files changed

+30
-30
lines changed

src/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ protected function calcAuthDigest($user, $password, $type = self::AUTH_BASIC, $d
652652
throw new Exception\InvalidArgumentException("Invalid or not supported authentication type: '$type'");
653653
}
654654
$response = false;
655-
switch(strtolower($type)) {
655+
switch (strtolower($type)) {
656656
case self::AUTH_BASIC :
657657
// In basic authentication, the user name cannot contain ":"
658658
if (strpos($user, ':') !== false) {

src/Client/Adapter/Curl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function setOptions($options = array())
131131

132132
foreach ($options as $k => $v) {
133133
$option = strtolower($k);
134-
switch($option) {
134+
switch ($option) {
135135
case 'proxyhost':
136136
$this->setCurlOption(CURLOPT_PROXY, $v);
137137
break;

src/PhpEnvironment/Request.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function getContent()
9494
{
9595
if (empty($this->content)) {
9696
$requestBody = file_get_contents('php://input');
97-
if (strlen($requestBody) > 0){
97+
if (strlen($requestBody) > 0) {
9898
$this->content = $requestBody;
9999
}
100100
}
@@ -307,7 +307,7 @@ public function getServer($name = null, $default = null)
307307
$this->serverParams = new Parameters();
308308
}
309309

310-
if($name === null){
310+
if ($name === null) {
311311
return $this->serverParams;
312312
}
313313

@@ -340,7 +340,7 @@ public function getEnv($name = null, $default = null)
340340
$this->envParams = new Parameters();
341341
}
342342

343-
if($name === null){
343+
if ($name === null) {
344344
return $this->envParams;
345345
}
346346

src/Request.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ public function getQuery($name = null, $default = null)
237237
$this->queryParams = new Parameters();
238238
}
239239

240-
if($name === null){
240+
if ($name === null) {
241241
return $this->queryParams;
242242
}
243243

@@ -270,7 +270,7 @@ public function getPost($name = null, $default = null)
270270
$this->postParams = new Parameters();
271271
}
272272

273-
if($name === null){
273+
if ($name === null) {
274274
return $this->postParams;
275275
}
276276

@@ -314,7 +314,7 @@ public function getFiles($name = null, $default = null)
314314
$this->fileParams = new Parameters();
315315
}
316316

317-
if($name === null){
317+
if ($name === null) {
318318
return $this->fileParams;
319319
}
320320

@@ -336,11 +336,11 @@ public function getHeaders($name = null, $default = false)
336336
$this->headers = (is_string($this->headers)) ? Headers::fromString($this->headers) : new Headers();
337337
}
338338

339-
if($name === null){
339+
if ($name === null) {
340340
return $this->headers;
341341
}
342342

343-
if($this->headers->has($name)){
343+
if ($this->headers->has($name)) {
344344
return $this->headers->get($name);
345345
}
346346

src/Response/Stream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public static function fromStream($responseString, $stream)
180180
}
181181

182182
$headers = $response->getHeaders();
183-
foreach($headers as $header) {
183+
foreach ($headers as $header) {
184184
if ($header instanceof \Zend\Http\Header\ContentLength) {
185185
$response->contentLength = (int) $header->getFieldValue();
186186
if (strlen($response->content) > $response->contentLength) {

test/Client/CommonHttpTests.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ public function testMutipleFilesWithSameFormNameZF5744()
816816
$files = array('file1.txt', 'file2.txt', 'someotherfile.foo');
817817

818818
$expectedBody = '';
819-
foreach($files as $filename) {
819+
foreach ($files as $filename) {
820820
$this->client->setFileUpload($filename, 'uploadfile[]', $rawData, 'text/plain');
821821
$expectedBody .= "uploadfile $filename text/plain " . strlen($rawData) . "\n";
822822
}
@@ -844,7 +844,7 @@ public function testZF4238FalseLinesInResponse()
844844

845845
public function testStreamResponse()
846846
{
847-
if(!($this->client->getAdapter() instanceof Adapter\StreamInterface)) {
847+
if (!($this->client->getAdapter() instanceof Adapter\StreamInterface)) {
848848
$this->markTestSkipped('Current adapter does not support streaming');
849849
return;
850850
}
@@ -871,7 +871,7 @@ public function testStreamResponseBody()
871871
{
872872
$this->markTestSkipped('To check with the new ZF2 implementation');
873873

874-
if(!($this->client->getAdapter() instanceof Adapter\StreamInterface)) {
874+
if (!($this->client->getAdapter() instanceof Adapter\StreamInterface)) {
875875
$this->markTestSkipped('Current adapter does not support streaming');
876876
return;
877877
}
@@ -891,7 +891,7 @@ public function testStreamResponseBody()
891891

892892
public function testStreamResponseNamed()
893893
{
894-
if(!($this->client->getAdapter() instanceof Adapter\StreamInterface)) {
894+
if (!($this->client->getAdapter() instanceof Adapter\StreamInterface)) {
895895
$this->markTestSkipped('Current adapter does not support streaming');
896896
return;
897897
}
@@ -917,7 +917,7 @@ public function testStreamResponseNamed()
917917

918918
public function testStreamRequest()
919919
{
920-
if(!($this->client->getAdapter() instanceof Adapter\StreamInterface)) {
920+
if (!($this->client->getAdapter() instanceof Adapter\StreamInterface)) {
921921
$this->markTestSkipped('Current adapter does not support streaming');
922922
return;
923923
}

test/Client/CurlTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function testConfigSetAsArray()
7272
$this->_adapter->setOptions($config);
7373

7474
$hasConfig = $this->_adapter->getConfig();
75-
foreach($config as $k => $v) {
75+
foreach ($config as $k => $v) {
7676
$this->assertEquals($v, $hasConfig[$k]);
7777
}
7878
}

test/Client/SocketTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function testConfigSetAsArray()
6060
$this->_adapter->setOptions($config);
6161

6262
$hasConfig = $this->_adapter->getConfig();
63-
foreach($config as $k => $v) {
63+
foreach ($config as $k => $v) {
6464
$this->assertEquals($v, $hasConfig[$k]);
6565
}
6666
}

test/Client/StaticTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ public function testConfigSetAsArray()
218218

219219
$hasConfig = $this->_client->config;
220220

221-
foreach($config as $k => $v) {
221+
foreach ($config as $k => $v) {
222222
$this->assertEquals($v, $hasConfig[$k]);
223223
}
224224
}

test/Client/_files/testRedirections.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @package Zend_Http
99
*/
1010

11-
if (! isset($_GET['redirection'])){
11+
if (! isset($_GET['redirection'])) {
1212
$_GET['redirection'] = 0;
1313

1414
/**

0 commit comments

Comments
 (0)