BaseRegistry   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 30
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __call() 0 3 1
A scope() 0 3 1
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