GiftregistryPerson   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 39
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A _setIdentifier() 0 4 1
A getEntityName() 0 4 1
1
<?php
2
/**
3
 * integer_net Magento Module
4
 *
5
 * @category   IntegerNet
6
 * @package    IntegerNet_Anonymizer
7
 * @copyright  Copyright (c) 2015 integer_net GmbH (http://www.integer-net.de/)
8
 * @author     Fabian Schmengler <[email protected]>
9
 */
10
class IntegerNet_Anonymizer_Model_Bridge_Entity_Enterprise_GiftregistryPerson
11
    extends IntegerNet_Anonymizer_Model_Bridge_Entity_Abstract
12
{
13
14
    protected $_formattersByAttribute = array(
15
        'email'         => 'safeEmail',
16
        'firstname'     => 'firstName',
17
        'lastname'      => 'lastName',
18
        'custom_values' => 'null',
19
    );
20
21
22
    function __construct()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
23
    {
24
        $this->_entity = Mage::getModel('enterprise_giftregistry/person');
25
    }
26
27
    /**
28
     * Sets identifier based on current entity
29
     *
30
     * @return void
31
     */
32
    protected function _setIdentifier()
33
    {
34
        $this->_identifier = $this->_entity->getEmail();
35
    }
36
37
    /**
38
     * Returns name of entity as translatable string
39
     *
40
     * @return string
41
     */
42
    function getEntityName()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
43
    {
44
        return 'Gift Registry Person';
45
    }
46
47
48
}