ObjectModuleAbstract   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getVars() 0 3 1
A toArray() 0 3 1
1
<?php
2
3
namespace ShopperLibrary\ObjectModule;
4
5
use ShopperLibrary\ObjectModule\Properties\Properties;
6
7
/**
8
 *
9
 * This class has the basic attributes to launch the form.
10
 *
11
 * Class ObjectModuleAbstract
12
 * @package ShopperLibrary\ObjectModule
13
 */
14
abstract class ObjectModuleAbstract extends Properties
15
{
16
    /**
17
     * Get all the available variables you can set
18
     *
19
     * @return array
20
     */
21
    public function getVars()
22
    {
23
        return array_keys(get_object_vars($this));
24
    }
25
26
    /**
27
     * Get array representation of object
28
     *
29
     * @return array
30
     */
31
    public function toArray()
32
    {
33
        return get_object_vars($this);
34
    }
35
}
36