Passed
Pull Request — master (#318)
by Sam
03:54
created

AbstractErrorMiddleware   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A handleExecutionError() 0 2 1
A handleError() 0 2 1
1
<?php
2
3
namespace Digia\GraphQL\Error\Handler;
4
5
use Digia\GraphQL\Execution\ExecutionContext;
6
use Digia\GraphQL\Execution\ExecutionException;
7
8
abstract class AbstractErrorMiddleware implements ErrorMiddlewareInterface
9
{
10
    /**
11
     * @param \Throwable $exception
12
     * @param callable   $next
13
     * @return mixed
14
     */
15
    public function handleError(\Throwable $exception, callable $next)
16
    {
17
    }
18
19
    /**
20
     * @param ExecutionException $exception
21
     * @param ExecutionContext   $context
22
     * @return mixed
23
     */
24
    public function handleExecutionError(ExecutionException $exception, ExecutionContext $context, callable $next)
25
    {
26
    }
27
}
28