Skip to content

Commit c221e13

Browse files
authored
Merge pull request #9 from dude920228/analysis-zDO51B
Apply fixes from StyleCI
2 parents 2732800 + 7fa465d commit c221e13

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

config.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414

1515
return [
1616
'config' => [
17-
'memoryLimit' => 1024,
17+
'memoryLimit' => 1024,
1818
'location' => __DIR__.'/temp/php-cache.sock',
19-
'port' => 9000,
20-
'bufferSize' => 256,
21-
'ttl' => 3600,
22-
'backupTime' => 1800,
23-
'backupDir' => __DIR__.'/.backup',
24-
'socketType' => CacheIOHandler::SOCKET_TYPE_FILE,
19+
'port' => 9000,
20+
'bufferSize' => 256,
21+
'ttl' => 3600,
22+
'backupTime' => 1800,
23+
'backupDir' => __DIR__.'/.backup',
24+
'socketType' => CacheIOHandler::SOCKET_TYPE_FILE,
2525
],
2626
'services' => [
2727
'aliases' => [

src/IO/CacheIOHandler.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ class CacheIOHandler
1313
{
1414
const SOCKET_TYPE_IP = 'ip';
1515
const SOCKET_TYPE_FILE = 'file';
16-
16+
1717
private $location;
1818
private $serverPort;
1919
private $bufferLength;
2020
private $socketType;
21-
21+
2222
public function __construct($location, $serverPort, $bufferLength, $socketType)
2323
{
2424
$this->location = $location;
@@ -37,7 +37,7 @@ public function writeToSocket($socket, $dataString)
3737
public function createServerSocket()
3838
{
3939
$socketType = AF_INET;
40-
if($this->socketType == self::SOCKET_TYPE_FILE) {
40+
if ($this->socketType == self::SOCKET_TYPE_FILE) {
4141
$socketType = AF_UNIX;
4242
}
4343
$socket = socket_create($socketType, SOCK_STREAM, 0);
@@ -64,7 +64,7 @@ public function createServerSocket()
6464
public function createClientSocket()
6565
{
6666
$socketType = AF_INET;
67-
if($this->socketType == self::SOCKET_TYPE_FILE) {
67+
if ($this->socketType == self::SOCKET_TYPE_FILE) {
6868
$socketType = AF_UNIX;
6969
}
7070
$socket = socket_create($socketType, SOCK_STREAM, 0);
@@ -105,14 +105,14 @@ public function closeSocket($socket)
105105
{
106106
socket_close($socket);
107107
}
108-
108+
109109
public function removeSocketFile()
110110
{
111-
if($this->socketType == self::SOCKET_TYPE_FILE) {
111+
if ($this->socketType == self::SOCKET_TYPE_FILE) {
112112
unlink($this->location);
113113
}
114114
}
115-
115+
116116
public function getServerIp()
117117
{
118118
return $this->location;

0 commit comments

Comments
 (0)