RootModule::getDefaultName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
/*
4
 * This file is part of the puli/manager package.
5
 *
6
 * (c) Bernhard Schussek <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Puli\Manager\Api\Module;
13
14
/**
15
 * The root module.
16
 *
17
 * @since  1.0
18
 *
19
 * @author Bernhard Schussek <[email protected]>
20
 */
21
class RootModule extends Module
22
{
23
    /**
24
     * Creates a new root module.
25
     *
26
     * @param RootModuleFile $moduleFile  The module file.
27
     * @param string         $installPath The absolute install path.
28
     */
29 338
    public function __construct(RootModuleFile $moduleFile, $installPath)
30
    {
31 338
        parent::__construct($moduleFile, $installPath);
32 338
    }
33
34
    /**
35
     * Returns the module file of the module.
36
     *
37
     * @return RootModuleFile The module file.
0 ignored issues
show
Documentation introduced by
Should the return type not be RootModuleFile|null?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
38
     */
39 236
    public function getModuleFile()
40
    {
41 236
        return parent::getModuleFile();
42
    }
43
44
    /**
45
     * {@inheritdoc}
46
     */
47 11
    protected function getDefaultName()
48
    {
49 11
        return '__root__';
50
    }
51
}
52