Issues (52)

src/Kernel/Exceptions/HttpException.php (1 issue)

1
<?php
2
/**
3
 * This file is part of the dingtalk.
4
 * User: Ilham Tahir <[email protected]>
5
 * This source file is subject to the MIT license that is bundled
6
 * with this source code in the file LICENSE.
7
 */
8
9
namespace Aplisin\DingTalk\Kernel\Exceptions;
10
11
use Psr\Http\Message\ResponseInterface;
12
13
class HttpException extends Exception
14
{
15
    public $response;
16
17
    public $formattedResponse;
18
19
    public function __construct($message, ResponseInterface $response = null, $formattedResponse = null, $code = null)
20
    {
21
        parent::__construct($message, $code);
22
23
        $this->response = $response;
0 ignored issues
show
Equals sign not aligned with surrounding assignments; expected 10 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
24
        $this->formattedResponse = $formattedResponse;
25
26
        if ($response) {
27
            $response->getBody()->rewind();
28
        }
29
    }
30
}
31