Passed
Push — develop ( 5412c0...f2f1c0 )
by nguereza
54s queued 15s
created
src/Http/Client/HttpCookie.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@  discard block
 block discarded – undo
52 52
  * @class HttpCookie
53 53
  * @package Platine\Framework\Http\Client
54 54
  */
55
-class HttpCookie
56
-{
55
+class HttpCookie {
57 56
     /**
58 57
      * The name of cookie
59 58
      * @var string
@@ -113,8 +112,7 @@  discard block
 block discarded – undo
113 112
      * Create new instance
114 113
      * @param string $cookieString
115 114
      */
116
-    public function __construct(string $cookieString)
117
-    {
115
+    public function __construct(string $cookieString) {
118 116
         $parts = array_map('trim', explode(';', $cookieString));
119 117
         foreach ($parts as $partStr) {
120 118
             $part = array_map('trim', explode('=', $partStr));
Please login to merge, or discard this patch.
src/Http/Client/HttpResponse.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@  discard block
 block discarded – undo
55 55
  * @class HttpResponse
56 56
  * @package Platine\Framework\Http\Client
57 57
  */
58
-class HttpResponse
59
-{
58
+class HttpResponse {
60 59
     /**
61 60
      * The request URL
62 61
      * @var string
@@ -180,8 +179,7 @@  discard block
 block discarded – undo
180 179
      * @param string $name
181 180
      * @return mixed|null
182 181
      */
183
-    public function getHeader(string $name)
184
-    {
182
+    public function getHeader(string $name) {
185 183
         return $this->headers[$name] ?? null;
186 184
     }
187 185
 
@@ -250,8 +248,7 @@  discard block
 block discarded – undo
250 248
      * Return the response as XML
251 249
      * @return mixed
252 250
      */
253
-    public function xml()
254
-    {
251
+    public function xml() {
255 252
         return Xml::decode($this->content);
256 253
     }
257 254
 
Please login to merge, or discard this patch.
src/Http/Client/Exception/HttpClientException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,6 +40,5 @@
 block discarded – undo
40 40
  * @class HttpClientException
41 41
  * @package Platine\Framework\Http\Client
42 42
  */
43
-class HttpClientException extends Exception
44
-{
43
+class HttpClientException extends Exception {
45 44
 }
Please login to merge, or discard this patch.
src/Http/Client/HttpStatus.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@
 block discarded – undo
58 58
  * @class HttpStatus
59 59
  * @package Platine\Framework\Http\Client
60 60
  */
61
-class HttpStatus
62
-{
61
+class HttpStatus {
63 62
     // Informational 1xx:
64 63
     public const INFORMATIONAL = 100;
65 64
     public const CONTINUE = 100;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 {
63 63
     // Informational 1xx:
64 64
     public const INFORMATIONAL = 100;
65
-    public const CONTINUE = 100;
65
+    public const continue = 100;
66 66
     public const SWITCHING_PROTOCOLS = 101;
67 67
 
68 68
     // Successful 2xx:
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     public const SERVER_ERROR_END = 600;
119 119
 
120 120
     public const REASON_PHRASES = [
121
-        self::CONTINUE => 'Continue',
121
+        self::continue => 'Continue',
122 122
         self::SWITCHING_PROTOCOLS => 'Switching Protocols',
123 123
 
124 124
         self::OK => 'OK',
Please login to merge, or discard this patch.
src/Http/Client/HttpClient.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -271,8 +271,8 @@
 block discarded – undo
271 271
      */
272 272
     public function contentType(string $contentType): self
273 273
     {
274
-       // If this is a multipart request and boundary was not defined,
275
-       // we define a boundary as this is required for multipart requests.
274
+        // If this is a multipart request and boundary was not defined,
275
+        // we define a boundary as this is required for multipart requests.
276 276
         if (stripos($contentType, 'multipart/') !== false) {
277 277
             if (stripos($contentType, 'boundary') === false) {
278 278
                 $contentType .= sprintf('; boundary="%s"', uniqid((string) time()));
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -519,7 +519,7 @@
 block discarded – undo
519 519
     protected function send($ch): HttpResponse
520 520
     {
521 521
         $responseHeaders = [];
522
-        curl_setopt($ch, CURLOPT_HEADERFUNCTION, function ($curl, $header) use (&$responseHeaders) {
522
+        curl_setopt($ch, CURLOPT_HEADERFUNCTION, function($curl, $header) use (&$responseHeaders) {
523 523
             if (strpos($header, ':') !== false) {
524 524
                 list($name, $value) = explode(':', $header);
525 525
                 if (array_key_exists($name, $responseHeaders) === false) {
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@  discard block
 block discarded – undo
56 56
  * @class HttpClient
57 57
  * @package Platine\Framework\Http\Client
58 58
  */
59
-class HttpClient
60
-{
59
+class HttpClient {
61 60
     /**
62 61
      * The base URL
63 62
      * @var string
@@ -110,8 +109,7 @@  discard block
 block discarded – undo
110 109
      * Create new instance
111 110
      * @param string $baseUrl
112 111
      */
113
-    public function __construct(string $baseUrl = '')
114
-    {
112
+    public function __construct(string $baseUrl = '') {
115 113
         $this->baseUrl = $baseUrl;
116 114
     }
117 115
 
Please login to merge, or discard this patch.