Skip to content

Commit 22c9295

Browse files
committed
psr2
1 parent a475ab3 commit 22c9295

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

src/Qiniu/Config.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@ final class Config
1515
public static $upHost; // 上传Host
1616
public static $zone; // 设置上传的Zone
1717

18-
public function __construct() { // 构造函数,默认为zone0
18+
public function __construct() // 构造函数,默认为zone0
19+
{
1920
self::setZone(Zone::zone0());
2021
return;
2122
}
2223

23-
public static function setZone(Zone $z) {
24+
public static function setZone(Zone $z)
25+
{
2426
self::$zone = $z;
2527
self::$upHost = $z::$upHost;
2628
return;
2729
}
28-
2930
}

src/Qiniu/Storage/UploadManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ final class UploadManager
1818
public function __construct($config = null)
1919
{
2020
if ($config === null) {
21-
$config = new Config();
21+
$config = new Config();
2222
}
2323
$this->config = $config;
2424
}

src/Qiniu/Zone.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
<?php
22
namespace Qiniu;
33

4-
final Class Zone
4+
final class Zone
55
{
66
public static $upHost = 'http://up.qiniu.com';
77

8-
public function __construct($upHost)
9-
{
10-
$this->upHost = $upHost;
11-
}
8+
public function __construct($upHost)
9+
{
10+
$this->upHost = $upHost;
11+
}
1212

13-
public static function zone0()
13+
public static function zone0()
1414
{
1515
return new self('http://up.qiniu.com');
1616
}
1717

18-
public static function zone1()
18+
public static function zone1()
1919
{
2020
return new self('http://up-z1.qiniu.com');
2121
}
2222
}
23-

tests/Qiniu/Tests/FormUpTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class FormUpTest extends \PHPUnit_Framework_TestCase
99
{
1010
protected $bucketName;
1111
protected $auth;
12-
protected $config;
12+
protected $cfg;
1313

1414
protected function setUp()
1515
{
@@ -24,7 +24,7 @@ protected function setUp()
2424
public function testData()
2525
{
2626
$token = $this->auth->uploadToken($this->bucketName);
27-
list($ret, $error) = FormUploader::put($token, 'formput', 'hello world', $this->config, null, 'text/plain', true);
27+
list($ret, $error) = FormUploader::put($token, 'formput', 'hello world', $this->cfg, null, 'text/plain', true);
2828
$this->assertNull($error);
2929
$this->assertNotNull($ret['hash']);
3030
}

0 commit comments

Comments
 (0)