Completed
Pull Request — master (#50)
by Robbie
05:48
created

AbstractConfigCommand::getYamlConfig()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 2
eloc 5
nc 2
nop 0
1
<?php
2
3
namespace SilverLeague\Console\Command\Config;
4
5
use SilverLeague\Console\Command\SilverStripeCommand;
6
use SilverStripe\Core\ClassInfo;
7
use SilverStripe\Core\Config\ConfigLoader;
8
use SilverStripe\Core\Config\ConfigCollectionInterface;
9
use SilverStripe\Core\Object;
10
11
/**
12
 * Provide base functionality for retrieving configuration from SilverStripe
13
 *
14
 * @package silverstripe-console
15
 * @author  Robbie Averill <[email protected]>
16
 */
17
class AbstractConfigCommand extends SilverStripeCommand
18
{
19
    /**
20
     * Get the SilverStripe Config manifest/collection interface
21
     *
22
     * @return ConfigCollectionInterface
23
     */
24
    public function getConfig()
25
    {
26
        return ConfigLoader::instance()->getManifest();
27
    }
28
}
29