Completed
Pull Request — master (#570)
by Marcel
02:28 queued 01:11
created

Strategy   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 22
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
__invoke() 0 1 ?
1
<?php
2
3
namespace Mpociot\ApiDoc\Strategies;
4
5
use ReflectionClass;
6
use ReflectionMethod;
7
use Illuminate\Routing\Route;
8
use Mpociot\ApiDoc\Tools\DocumentationConfig;
9
10
abstract class Strategy
11
{
12
    protected $config;
13
14
    public function __construct(DocumentationConfig $config)
15
    {
16
        $this->config = $config;
17
    }
18
19
    /**
20
     * @param Route $route
21
     * @param ReflectionClass $controller
22
     * @param ReflectionMethod $method
23
     * @param array $routeRules Array of rules for the ruleset which this route belongs to.
24
     * @param array $context Results from the previous stages
25
     *
26
     * @throws \Exception
27
     *
28
     * @return array
29
     */
30
    abstract public function __invoke(Route $route, ReflectionClass $controller, ReflectionMethod $method, array $routeRules, array $context = []);
31
}
32