Conditions | 8 |
Paths | 8 |
Total Lines | 16 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | public function getPropertiesAndValues($props = NULL) { |
||
21 | $ret = []; |
||
22 | $defaultParameters=$this->getDefaultParameters(); |
||
|
|||
23 | if (\is_null ( $props )) |
||
24 | $props = $this->getProperties ( $this ); |
||
25 | foreach ( $props as $prop ) { |
||
26 | $prop->setAccessible ( true ); |
||
27 | $name=$prop->getName(); |
||
28 | $v = $prop->getValue ( $this ); |
||
29 | if ($v !== null && $v !== '' && isset ( $v )) { |
||
30 | if(!isset($defaultParameters[$name]) || $defaultParameters[$name]!==$v){ |
||
31 | $ret [$name] = $v; |
||
32 | } |
||
33 | } |
||
34 | } |
||
35 | return $ret; |
||
36 | } |
||
39 |