Completed
Pull Request — develop (#743)
by Tom
06:01
created

AbstractCustomerCommand::isEnabled()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace N98\Magento\Command\Customer;
4
5
use Mage_Customer_Model_Address;
6
use Mage_Customer_Model_Customer;
7
use Mage_Customer_Model_Resource_Customer_Collection;
8
use Mage_Directory_Model_Resource_Country_Collection;
9
use Mage_Directory_Model_Resource_Region_Collection;
10
use N98\Magento\Command\AbstractMagentoCommand;
11
use N98\Util\Exec;
12
13
/**
14
 * Class AbstractCustomerCommand
15
 *
16
 * @package N98\Magento\Command\Customer
17
 */
18
abstract class AbstractCustomerCommand extends AbstractMagentoCommand
19
{
20
    /**
21
     * @return Mage_Customer_Model_Customer
22
     */
23
    protected function getCustomerModel()
24
    {
25
        return $this->_getModel('customer/customer', 'Mage_Customer_Model_Customer');
26
    }
27
28
    /**
29
     * @return Mage_Customer_Model_Resource_Customer_Collection
30
     */
31
    protected function getCustomerCollection()
32
    {
33
        return $this->_getResourceModel('customer/customer_collection', 'Mage_Customer_Model_Resource_Customer_Collection');
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 124 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
34
    }
35
36
    /**
37
     * @return Mage_Customer_Model_Address
38
     */
39
    protected function getAddressModel()
40
    {
41
        return $this->_getModel('customer/address', 'Mage_Customer_Model_Address');
42
    }
43
44
    /**
45
     * @return Mage_Directory_Model_Resource_Region_Collection
46
     */
47
    protected function getRegionCollection()
48
    {
49
        return $this->_getResourceModel('directory/region_collection', 'Mage_Directory_Model_Resource_Region_Collection');
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 122 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
50
    }
51
52
    /**
53
     * @return Mage_Directory_Model_Resource_Country_Collection
54
     */
55
    protected function getCountryCollection()
56
    {
57
        return $this->_getResourceModel('directory/country_collection', 'Mage_Directory_Model_Resource_Country_Collection');
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 124 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
58
    }
59
}
60