BaseRegistry::__call()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 2
1
<?php
2
3
namespace TwoDojo\ModuleManager\Registries;
4
5
use TwoDojo\ModuleManager\Contracts\Repository;
6
7
abstract class BaseRegistry implements Repository
8
{
9
    /**
10
     * Find the module by unique name
11
     *
12
     * @param string $uniqueName
13
     * @return mixed
14
     */
15
    abstract public function findByUniqueName(string $uniqueName);
16
17
    /**
18
     * @param $scope
19
     * @param $arguments
20
     * @return $this
21
     */
22
    protected function scope($scope, $arguments)
0 ignored issues
show
Unused Code introduced by
The parameter $scope is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

22
    protected function scope(/** @scrutinizer ignore-unused */ $scope, $arguments)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
23
    {
24
        return $this;
25
    }
26
27
    /**
28
     * Handle scope call
29
     *
30
     * @param $name
31
     * @param $arguments
32
     * @return BaseRegistry
33
     */
34
    public function __call($name, $arguments)
35
    {
36
        return $this->scope($name, $arguments);
37
    }
38
}
39