Completed
Pull Request — master (#3)
by thomas
17:25 queued 15:04
created
src/Notification/MiningNotification.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -154,6 +154,6 @@
 block discarded – undo
154 154
      */
155 155
     public function toRequest()
156 156
     {
157
-        return new Request(null, MiningClient::MINING_SUBSCRIBE, [$this->job_id, $this->prevhash, $this->coinb1, $this->coinb2, $this->merkle_branch, $this->version, $this->nbits, $this->ntime, $this->clean_jobs]);
157
+        return new Request(null, MiningClient::MINING_SUBSCRIBE, [ $this->job_id, $this->prevhash, $this->coinb1, $this->coinb2, $this->merkle_branch, $this->version, $this->nbits, $this->ntime, $this->clean_jobs ]);
158 158
     }
159 159
 }
Please login to merge, or discard this patch.
src/Notification/SetDifficultyNotification.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,6 +34,6 @@
 block discarded – undo
34 34
      */
35 35
     public function toRequest()
36 36
     {
37
-        return new Request(null, MiningClient::SET_DIFFICULTY, [$this->difficulty]);
37
+        return new Request(null, MiningClient::SET_DIFFICULTY, [ $this->difficulty ]);
38 38
     }
39 39
 }
Please login to merge, or discard this patch.
examples.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,17 +21,17 @@
 block discarded – undo
21 21
 $clientFactory = new Factory($loop, $connector, $requestFactory);
22 22
 $stratum = $clientFactory->create($host, $port);
23 23
 
24
-$v = $stratum->request('server.version', ['1.9.7', ' 0.6'])->then(function (Response $r) {
25
-    echo "Server version: " . $r->getResult() . "\n";
24
+$v = $stratum->request('server.version', [ '1.9.7', ' 0.6' ])->then(function(Response $r) {
25
+    echo "Server version: ".$r->getResult()."\n";
26 26
 });
27 27
 
28 28
 // Make the query, receive a Promise
29
-$t = $stratum->request('blockchain.address.get_balance', ['1NfcqVqW4f6tACwaqjyKXRV75aqt3VEVPE']);
30
-$t->then(function (Response $response) {
29
+$t = $stratum->request('blockchain.address.get_balance', [ '1NfcqVqW4f6tACwaqjyKXRV75aqt3VEVPE' ]);
30
+$t->then(function(Response $response) {
31 31
     var_dump($response);
32
-}, function (\BitWasp\Stratum\Exceptions\ApiError $error) {
32
+}, function(\BitWasp\Stratum\Exceptions\ApiError $error) {
33 33
     echo sprintf(" [id: %s] error: %s", $error->getId(), $error->getMessage());
34
-}, function () {
34
+}, function() {
35 35
 
36 36
 });
37 37
 
Please login to merge, or discard this patch.
src/Exceptions/ApiError.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,6 +48,6 @@
 block discarded – undo
48 48
         return json_encode([
49 49
             'id' => $this->id,
50 50
             'result' => $this->result
51
-        ]) . "\n";
51
+        ])."\n";
52 52
     }
53 53
 }
Please login to merge, or discard this patch.