Skip to content

Commit 2a720a8

Browse files
author
Jeremiah VALERIE
committed
PHP CS
1 parent 17cca89 commit 2a720a8

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Error/ErrorHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ private function getDefaultErrorHandler()
4848
$clean = [];
4949

5050
/** @var Error $error */
51-
foreach($errors as $error) {
51+
foreach ($errors as $error) {
5252
$rawException = $error->getPrevious();
5353

5454
// Parse error or user error
@@ -60,7 +60,7 @@ private function getDefaultErrorHandler()
6060
// multiple errors
6161
if ($rawException instanceof UserErrors) {
6262
$rawExceptions = $rawException;
63-
foreach($rawExceptions->getErrors() as $rawException) {
63+
foreach ($rawExceptions->getErrors() as $rawException) {
6464
$clean[] = Error::createLocatedError($rawException, $error->nodes);
6565
}
6666
continue;

Error/UserErrors.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class UserErrors extends \Exception
2121
*/
2222
private $errors = [];
2323

24-
public function __construct(array $errors, $message = "", $code = 0, \Exception $previous = null)
24+
public function __construct(array $errors, $message = '', $code = 0, \Exception $previous = null)
2525
{
2626
$this->setErrors($errors);
2727
parent::__construct($message, $code, $previous);
@@ -39,13 +39,14 @@ public function setErrors(array $errors)
3939

4040
/**
4141
* @param string|UserError $error
42-
* @return $this
42+
*
43+
* @return $this
4344
*/
4445
public function addError($error)
4546
{
4647
if (is_string($error)) {
4748
$error = new UserError($error);
48-
} elseif(!is_object($error) || !$error instanceof UserError) {
49+
} elseif (!is_object($error) || !$error instanceof UserError) {
4950
throw new \InvalidArgumentException('Error must be string or instance of Overblog\\GraphQLBundle\\Error\\UserError.');
5051
}
5152

0 commit comments

Comments
 (0)