Completed
Branch 0.4-dev (f926df)
by Evgenij
04:00
created
src/Operation/WriteOperation.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     /**
72 72
      * Return Data
73 73
      *
74
-     * @return string|array|\Traversable
74
+     * @return string|null
75 75
      */
76 76
     public function getData()
77 77
     {
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     /**
82 82
      * Sets Data
83 83
      *
84
-     * @param string|array|\Traversable $data Data to send
84
+     * @param \AsyncSockets\RequestExecutor\Pipeline\PushbackIterator $data Data to send
85 85
      *
86 86
      * @return void
87 87
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
      */
37 37
     public function __construct($data = null, $isOutOfBand = false)
38 38
     {
39
-        $this->data         = $data !== null ? $data : null;
39
+        $this->data = $data !== null ? $data : null;
40 40
         $this->isOutOfBand = $isOutOfBand;
41 41
     }
42 42
 
Please login to merge, or discard this patch.
src/Configuration/StreamContext.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
         }
57 57
 
58 58
         $map = [
59
-            'null'     => [ $this, 'createFromNull' ],
60
-            'resource' => [ $this, 'createFromResource' ],
61
-            'array'    => [ $this, 'createFromArray' ],
59
+            'null'     => [$this, 'createFromNull'],
60
+            'resource' => [$this, 'createFromResource'],
61
+            'array'    => [$this, 'createFromArray'],
62 62
         ];
63 63
 
64 64
         $type = strtolower(gettype($settings));
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
     private function createFromArray(array $settings)
108 108
     {
109 109
         return stream_context_create(
110
-            isset($settings[ 'options' ]) ? $settings[ 'options' ] : [],
111
-            isset($settings[ 'params' ]) ? $settings[ 'params' ] : []
110
+            isset($settings['options']) ? $settings['options'] : [],
111
+            isset($settings['params']) ? $settings['params'] : []
112 112
         );
113 113
     }
114 114
 }
Please login to merge, or discard this patch.
src/RequestExecutor/Pipeline/PushbackIterator.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -163,8 +163,7 @@
 block discarded – undo
163 163
         $this->popLastPushedBackItem();
164 164
 
165 165
         $result .= $this->hasUnreadItem() ?
166
-            array_shift($this->unreadItems) :
167
-            (string) $this->nestedIterator->current();
166
+            array_shift($this->unreadItems) : (string) $this->nestedIterator->current();
168 167
 
169 168
         while ($this->hasUnreadItem() && strlen($result) < $this->chunkSize) {
170 169
             $result .= array_shift($this->unreadItems);
Please login to merge, or discard this patch.