Completed
Pull Request — master (#510)
by Pieter
02:49 queued 01:25
created

TagTraitHelper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __call() 0 4 1
1
<?php
2
3
namespace Drupal\DrupalExtension;
4
5
/**
6
 * Helper class for the TagTrait.
7
 *
8
 * Traits in PHP can not easily depend on other traits. This class wraps the
9
 * depending traits so that they can be injected using composition. This allows
10
 * TagTrait to be freely used in classes without needing to remember to include
11
 * the depending traits as well.
12
 */
13
class TagTraitHelper
14
{
15
    use FeatureTrait;
16
    use ScenarioTrait;
17
18
    /**
19
     * Escalate visibility to access the protected methods in the traits.
20
     */
21
    public function __call($name, $arguments)
22
    {
23
        return $this->$name(...$arguments);
24
    }
25
}
26