@@ -25,16 +25,17 @@ |
||
| 25 | 25 | if(isset($title)){ |
| 26 | 26 | $this->setTitle($title,$desc); |
| 27 | 27 | } |
| 28 | - }else{ |
|
| 28 | + } else{ |
|
| 29 | 29 | $this->setContent($content); |
| 30 | 30 | } |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | public function setActive($value=true){ |
| 34 | - if($value) |
|
| 35 | - $this->setStatus(StepStatus::ACTIVE); |
|
| 36 | - else |
|
| 37 | - $this->setStatus(StepStatus::NONE); |
|
| 34 | + if($value) { |
|
| 35 | + $this->setStatus(StepStatus::ACTIVE); |
|
| 36 | + } else { |
|
| 37 | + $this->setStatus(StepStatus::NONE); |
|
| 38 | + } |
|
| 38 | 39 | return $this; |
| 39 | 40 | } |
| 40 | 41 | |
@@ -34,8 +34,9 @@ discard block |
||
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | public function getProperty($name) { |
| 37 | - if (array_key_exists($name, $this->_self->properties)) |
|
| 38 | - return $this->_self->properties[$name]; |
|
| 37 | + if (array_key_exists($name, $this->_self->properties)) { |
|
| 38 | + return $this->_self->properties[$name]; |
|
| 39 | + } |
|
| 39 | 40 | } |
| 40 | 41 | |
| 41 | 42 | public function addToProperty($name, $value, $separator=" ") { |
@@ -46,10 +47,11 @@ discard block |
||
| 46 | 47 | } else if ($value !== "" && $this->_self->propertyContains($name, $value) === false) { |
| 47 | 48 | if(isset($this->_self->properties[$name])){ |
| 48 | 49 | $v=$this->_self->properties[$name]; |
| 49 | - if (isset($v) && $v !== "") |
|
| 50 | - $v=$v . $separator . $value; |
|
| 51 | - else |
|
| 52 | - $v=$value; |
|
| 50 | + if (isset($v) && $v !== "") { |
|
| 51 | + $v=$v . $separator . $value; |
|
| 52 | + } else { |
|
| 53 | + $v=$value; |
|
| 54 | + } |
|
| 53 | 55 | |
| 54 | 56 | return $this->_self->setProperty($name, $v); |
| 55 | 57 | } |
@@ -73,8 +75,9 @@ discard block |
||
| 73 | 75 | } |
| 74 | 76 | |
| 75 | 77 | protected function addToPropertyUnique($name, $value, $typeCtrl) { |
| 76 | - if (is_string($typeCtrl) && @class_exists($typeCtrl, true)) |
|
| 77 | - $typeCtrl=$typeCtrl::getConstants(); |
|
| 78 | + if (is_string($typeCtrl) && @class_exists($typeCtrl, true)) { |
|
| 79 | + $typeCtrl=$typeCtrl::getConstants(); |
|
| 80 | + } |
|
| 78 | 81 | if (\is_array($typeCtrl)) { |
| 79 | 82 | $this->_self->removeOldValues($this->_self->properties[$name], $typeCtrl); |
| 80 | 83 | } |
@@ -93,8 +96,9 @@ discard block |
||
| 93 | 96 | } |
| 94 | 97 | |
| 95 | 98 | public function removeProperty($name) { |
| 96 | - if (\array_key_exists($name, $this->_self->properties)) |
|
| 97 | - unset($this->_self->properties[$name]); |
|
| 99 | + if (\array_key_exists($name, $this->_self->properties)) { |
|
| 100 | + unset($this->_self->properties[$name]); |
|
| 101 | + } |
|
| 98 | 102 | return $this; |
| 99 | 103 | } |
| 100 | 104 | |
@@ -107,8 +111,9 @@ discard block |
||
| 107 | 111 | } |
| 108 | 112 | |
| 109 | 113 | protected function setPropertyCtrl($name, $value, $typeCtrl) { |
| 110 | - if ($this->_self->ctrl($name, $value, $typeCtrl) === true) |
|
| 111 | - return $this->_self->setProperty($name, $value); |
|
| 114 | + if ($this->_self->ctrl($name, $value, $typeCtrl) === true) { |
|
| 115 | + return $this->_self->setProperty($name, $value); |
|
| 116 | + } |
|
| 112 | 117 | return $this; |
| 113 | 118 | } |
| 114 | 119 | |