Module::getAutoloaderConfig()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 10
Ratio 100 %

Importance

Changes 3
Bugs 3 Features 0
Metric Value
c 3
b 3
f 0
dl 10
loc 10
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
/**
4
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
5
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
6
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
7
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
8
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
11
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
12
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
13
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
14
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15
 *
16
 * This software consists of voluntary contributions made by many individuals
17
 * and is licensed under the MIT license.
18
 */
19
namespace LearnZF2Navigation;
20
21
use Zend\Loader\StandardAutoloader;
22
use Zend\ModuleManager\Feature\AutoloaderProviderInterface;
23
use Zend\ModuleManager\Feature\ConfigProviderInterface;
24
25
/**
26
 * Class Module.
27
 *
28
 * @author Alejandro Celaya Alastrué <[email protected]>
29
 */
30 View Code Duplication
class Module implements ConfigProviderInterface, AutoloaderProviderInterface
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
31
{
32
    /**
33
     * Returns configuration to merge with application configuration.
34
     *
35
     * @return array|\Traversable
36
     */
37
    public function getConfig()
38
    {
39
        return include __DIR__.'/config/module.config.php';
40
    }
41
42
    /**
43
     * Return an array for passing to Zend\Loader\AutoloaderFactory.
44
     *
45
     * @return array
46
     */
47
    public function getAutoloaderConfig()
48
    {
49
        return [
50
            'Zend\Loader\StandardAutoloader' => [
51
                StandardAutoloader::LOAD_NS => [
52
                    __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__,
53
                ],
54
            ],
55
        ];
56
    }
57
}
58