Skip to content

Commit ce89039

Browse files
committed
Cleaned up code according to make cs output.
1 parent 043e3c3 commit ce89039

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ lint:
55
find examples -name *.php -exec php -l {} \;
66

77
cs: lint
8-
./bin/phpcbf --standard=PSR2 src tests examples
9-
./bin/phpcs --standard=PSR2 --warning-severity=0 src tests examples
10-
./bin/phpcs --standard=Squiz --sniffs=Squiz.Commenting.FunctionComment,Squiz.Commenting.FunctionCommentThrowTag,Squiz.Commenting.ClassComment,Squiz.Commenting.VariableComment src tests examples
8+
./vendor/bin/phpcbf --standard=PSR2 src test examples
9+
./vendor/bin/phpcs --standard=PSR2 --warning-severity=0 src test examples
10+
./vendor/bin/phpcs --standard=Squiz --sniffs=Squiz.Commenting.FunctionComment,Squiz.Commenting.FunctionCommentThrowTag,Squiz.Commenting.ClassComment,Squiz.Commenting.VariableComment src test examples
1111

1212
test:
1313
./vendor/bin/phpunit test

src/Nats/Connection.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Connection
1818

1919
/**
2020
* Chunk size in bytes to use when reading with fread.
21-
* @var int
21+
* @var integer
2222
*/
2323
private $chunkSize = 1500;
2424

@@ -167,7 +167,7 @@ private function receive($len = null)
167167
$receivedBytes = 0;
168168
while ($receivedBytes < $len) {
169169
$bytesLeft = $len - $receivedBytes;
170-
if ( $bytesLeft < $this->chunkSize ) {
170+
if ($bytesLeft < $this->chunkSize) {
171171
$chunkSize = $bytesLeft;
172172
}
173173

@@ -184,8 +184,8 @@ private function receive($len = null)
184184
/**
185185
* Returns an stream socket to the desired server.
186186
*
187-
* @param string $address Server url string.
188-
* @param float $timeout Number of seconds until the connect() system call should timeout.
187+
* @param string $address Server url string.
188+
* @param float $timeout Number of seconds until the connect() system call should timeout.
189189
*
190190
* @return resource
191191
* @throws \Exception Exception raised if connection fails.
@@ -368,7 +368,7 @@ private function handlePING()
368368
* @param string $line Message command from Nats.
369369
*
370370
* @return void
371-
* @throws Exception
371+
* @throws Exception If subscription not found.
372372
* @codeCoverageIgnore
373373
*/
374374
private function handleMSG($line)
@@ -471,9 +471,11 @@ public function reconnect()
471471
}
472472

473473
/**
474-
* @param integer $chunkSize Set byte chunk len to read when reading from wire
474+
* @param integer $chunkSize Set byte chunk len to read when reading from wire.
475+
* @return void
475476
*/
476-
public function setChunkSize($chunkSize){
477+
public function setChunkSize($chunkSize)
478+
{
477479
$this->chunkSize = $chunkSize;
478480
}
479481

test/ConnectionTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ function ($message) {
117117
);
118118

119119
$i++;
120-
121120
} while ($i < 100);
122121
}
123122

@@ -137,7 +136,6 @@ public function testLargeRequest()
137136

138137
$i = 0;
139138
do {
140-
141139
$this->c->subscribe(
142140
"saybighello$i",
143141
function ($res) use ($contentLen, $contentSum) {

0 commit comments

Comments
 (0)