Skip to content
This repository was archived by the owner on Apr 29, 2024. It is now read-only.

Commit 89ad098

Browse files
author
Simon Yousoufov
committed
Change order of constructor parameters:
1 parent 1f481d0 commit 89ad098

14 files changed

+19
-19
lines changed

Diff for: src/AccessDeniedHttpException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class AccessDeniedHttpException extends HttpException
2727
* @param array $headers
2828
* @param \Exception $previous
2929
*/
30-
public function __construct($message = null, $error_formatted = null, array $error_data = [], array $headers = [], \Exception $previous = null)
30+
public function __construct($message = null, array $error_data = [], $error_formatted = null, array $headers = [], \Exception $previous = null)
3131
{
3232
parent::__construct($message, $error_formatted, $error_data, $headers, self::HTTP_CODE, $previous);
3333
}

Diff for: src/BadRequestHttpException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class BadRequestHttpException extends HttpException
2727
* @param array $headers
2828
* @param \Exception $previous
2929
*/
30-
public function __construct($message = null, $error_formatted = null, array $error_data = [], array $headers = [], \Exception $previous = null)
30+
public function __construct($message = null, array $error_data = [], $error_formatted = null, array $headers = [], \Exception $previous = null)
3131
{
3232
parent::__construct($message, $error_formatted, $error_data, $headers, self::HTTP_CODE, $previous);
3333
}

Diff for: src/ConflictHttpException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class ConflictHttpException extends HttpException
2727
* @param array $headers
2828
* @param \Exception $previous
2929
*/
30-
public function __construct($message = null, $error_formatted = null, array $error_data = [], array $headers = [], \Exception $previous = null)
30+
public function __construct($message = null, array $error_data = [], $error_formatted = null, array $headers = [], \Exception $previous = null)
3131
{
3232
parent::__construct($message, $error_formatted, $error_data, $headers, self::HTTP_CODE, $previous);
3333
}

Diff for: src/GoneHttpException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class GoneHttpException extends HttpException
2727
* @param array $headers
2828
* @param \Exception $previous
2929
*/
30-
public function __construct($message = null, $error_formatted = null, array $error_data = [], array $headers = [], \Exception $previous = null)
30+
public function __construct($message = null, array $error_data = [], $error_formatted = null, array $headers = [], \Exception $previous = null)
3131
{
3232
parent::__construct($message, $error_formatted, $error_data, $headers, self::HTTP_CODE, $previous);
3333
}

Diff for: src/InternalServerErrorHttpException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class InternalServerErrorHttpException extends HttpException
2727
* @param array $headers
2828
* @param \Exception $previous
2929
*/
30-
public function __construct($message = null, $error_formatted = null, array $error_data = [], array $headers = [], \Exception $previous = null)
30+
public function __construct($message = null, array $error_data = [], $error_formatted = null, array $headers = [], \Exception $previous = null)
3131
{
3232
parent::__construct($message, $error_formatted, $error_data, $headers, self::HTTP_CODE, $previous);
3333
}

Diff for: src/LengthRequiredHttpException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class LengthRequiredHttpException extends HttpException
2727
* @param array $headers
2828
* @param \Exception $previous
2929
*/
30-
public function __construct($message = null, $error_formatted = null, array $error_data = [], array $headers = [], \Exception $previous = null)
30+
public function __construct($message = null, array $error_data = [], $error_formatted = null, array $headers = [], \Exception $previous = null)
3131
{
3232
parent::__construct($message, $error_formatted, $error_data, $headers, self::HTTP_CODE, $previous);
3333
}

Diff for: src/NotAcceptableHttpException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class NotAcceptableHttpException extends HttpException
2727
* @param array $headers
2828
* @param \Exception $previous
2929
*/
30-
public function __construct($message = null, $error_formatted = null, array $error_data = [], array $headers = [], \Exception $previous = null)
30+
public function __construct($message = null, array $error_data = [], $error_formatted = null, array $headers = [], \Exception $previous = null)
3131
{
3232
parent::__construct($message, $error_formatted, $error_data, $headers, self::HTTP_CODE, $previous);
3333
}

Diff for: src/NotFoundHttpException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class NotFoundHttpException extends HttpException
2727
* @param array $headers
2828
* @param \Exception $previous
2929
*/
30-
public function __construct($message = null, $error_formatted = null, array $error_data = [], array $headers = [], \Exception $previous = null)
30+
public function __construct($message = null, array $error_data = [], $error_formatted = null, array $headers = [], \Exception $previous = null)
3131
{
3232
parent::__construct($message, $error_formatted, $error_data, $headers, self::HTTP_CODE, $previous);
3333
}

Diff for: src/PreconditionFailedHttpException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class PreconditionFailedHttpException extends HttpException
2727
* @param array $headers
2828
* @param \Exception $previous
2929
*/
30-
public function __construct($message = null, $error_formatted = null, array $error_data = [], array $headers = [], \Exception $previous = null)
30+
public function __construct($message = null, array $error_data = [], $error_formatted = null, array $headers = [], \Exception $previous = null)
3131
{
3232
parent::__construct($message, $error_formatted, $error_data, $headers, self::HTTP_CODE, $previous);
3333
}

Diff for: src/PreconditionRequiredHttpException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class PreconditionRequiredHttpException extends HttpException
2727
* @param array $headers
2828
* @param \Exception $previous
2929
*/
30-
public function __construct($message = null, $error_formatted = null, array $error_data = [], array $headers = [], \Exception $previous = null)
30+
public function __construct($message = null, array $error_data = [], $error_formatted = null, array $headers = [], \Exception $previous = null)
3131
{
3232
parent::__construct($message, $error_formatted, $error_data, $headers, self::HTTP_CODE, $previous);
3333
}

Diff for: src/UnauthorizedHttpException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class UnauthorizedHttpException extends HttpException
2727
* @param array $headers
2828
* @param \Exception $previous
2929
*/
30-
public function __construct($message = null, $error_formatted = null, array $error_data = [], array $headers = [], \Exception $previous = null)
30+
public function __construct($message = null, array $error_data = [], $error_formatted = null, array $headers = [], \Exception $previous = null)
3131
{
3232
parent::__construct($message, $error_formatted, $error_data, $headers, self::HTTP_CODE, $previous);
3333
}

Diff for: src/UnprocessableEntityHttpException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class UnprocessableEntityHttpException extends HttpException
2727
* @param array $headers
2828
* @param \Exception $previous
2929
*/
30-
public function __construct($message = null, $error_formatted = null, array $error_data = [], array $headers = [], \Exception $previous = null)
30+
public function __construct($message = null, array $error_data = [], $error_formatted = null, array $headers = [], \Exception $previous = null)
3131
{
3232
parent::__construct($message, $error_formatted, $error_data, $headers, self::HTTP_CODE, $previous);
3333
}

Diff for: src/UnsupportedMediaTypeHttpException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class UnsupportedMediaTypeHttpException extends HttpException
2727
* @param array $headers
2828
* @param \Exception $previous
2929
*/
30-
public function __construct($message = null, $error_formatted = null, array $error_data = [], array $headers = [], \Exception $previous = null)
30+
public function __construct($message = null, array $error_data = [], $error_formatted = null, array $headers = [], \Exception $previous = null)
3131
{
3232
parent::__construct($message, $error_formatted, $error_data, $headers, self::HTTP_CODE, $previous);
3333
}

Diff for: tests/HttpExceptionTest.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -34,31 +34,31 @@ public function testItCanGetErrorName()
3434

3535
public function testItCanGetStatusCode()
3636
{
37-
$exception = new StubException('message', 'formatted', ['foo' => 'bar'], ['header' => 'value'], new \Exception);
37+
$exception = new StubException('message', ['foo' => 'bar'], 'formatted', ['header' => 'value'], new \Exception);
3838
$this->assertEquals(404, $exception->getStatusCode());
3939
}
4040

4141
public function testItCanGetErrorMessage()
4242
{
43-
$exception = new StubException('message', 'formatted', ['foo' => 'bar'], ['header' => 'value'], new \Exception);
43+
$exception = new StubException('message', ['foo' => 'bar'], 'formatted', ['header' => 'value'], new \Exception);
4444
$this->assertEquals('message', $exception->getMessage());
4545
}
4646

4747
public function testItCanGetErrorFormatted()
4848
{
49-
$exception = new StubException('message', 'formatted', ['foo' => 'bar'], ['header' => 'value'], new \Exception);
49+
$exception = new StubException('message', ['foo' => 'bar'], 'formatted', ['header' => 'value'], new \Exception);
5050
$this->assertEquals('formatted', $exception->getErrorFormatted());
5151
}
5252

5353
public function testItCanGetErrorData()
5454
{
55-
$exception = new StubException('message', 'formatted', ['foo' => 'bar'], ['header' => 'value'], new \Exception);
55+
$exception = new StubException('message', ['foo' => 'bar'], 'formatted', ['header' => 'value'], new \Exception);
5656
$this->assertEquals(['foo' => 'bar'], $exception->getErrorData());
5757
}
5858

5959
public function testItCanGetErrorHeaders()
6060
{
61-
$exception = new StubException('message', 'formatted', ['foo' => 'bar'], ['header' => 'value'], new \Exception);
61+
$exception = new StubException('message', ['foo' => 'bar'], 'formatted', ['header' => 'value'], new \Exception);
6262
$this->assertEquals(['header' => 'value'], $exception->getHeaders());
6363
}
6464

@@ -192,7 +192,7 @@ class StubException extends HttpException
192192

193193
protected $error_name = 'stub_exception';
194194

195-
public function __construct($message = null, $error_formatted = null, array $error_data = [], array $headers = [], \Exception $previous = null)
195+
public function __construct($message = null, array $error_data = [], $error_formatted = null, array $headers = [], \Exception $previous = null)
196196
{
197197
parent::__construct($message, $error_formatted, $error_data, $headers, self::HTTP_CODE, $previous);
198198
}

0 commit comments

Comments
 (0)