Completed
Pull Request — master (#44)
by devosc
02:52
created

Config   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A config() 0 4 1
plugin() 0 1 ?
1
<?php
2
/**
3
 *
4
 */
5
6
namespace Mvc5\Plugins;
7
8
use Mvc5\Arg;
9
10
trait Config
11
{
12
    /**
13
     * @return mixed
14
     */
15
    protected function config()
0 ignored issues
show
Best Practice introduced by
Using PHP4-style constructors that are named like the class is not recommend; better use the more explicit __construct method.
Loading history...
16
    {
17
        return $this->plugin(Arg::CONFIG);
18
    }
19
20
    /**
21
     * @param string $name
22
     * @param array $args
23
     * @param callable $callback
24
     * @return callable|null|object
25
     */
26
    protected abstract function plugin($name, array $args = [], callable $callback = null);
27
}
28