Passed
Push — master ( 43996d...1595cb )
by Kirill
04:07
created

LinkerFacadeTrait::getAutoloaders()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * This file is part of Railt package.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
declare(strict_types=1);
11
12
namespace Railt\SDL\Backend\Linker;
13
14
/**
15
 * Trait LinkerFacadeTrait
16
 */
17
trait LinkerFacadeTrait
18
{
19
    /**
20
     * {@inheritDoc}
21
     */
22
    public function autoload(callable $loader): LinkerInterface
23
    {
24
        return $this->getLinker()
25
            ->autoload($loader);
26
    }
27
28
    /**
29
     * @return LinkerInterface
30
     */
31
    abstract public function getLinker(): LinkerInterface;
32
33
    /**
34
     * {@inheritDoc}
35
     */
36
    public function cancelAutoload(callable $loader): LinkerInterface
37
    {
38
        return $this->getLinker()
39
            ->cancelAutoload($loader);
40
    }
41
42
    /**
43
     * {@inheritDoc}
44
     */
45
    public function getAutoloaders(): iterable
46
    {
47
        return $this->getLinker()
48
            ->getAutoloaders();
49
    }
50
}
51