@@ -9,12 +9,12 @@ discard block |
||
| 9 | 9 | * @author jc |
| 10 | 10 | * @property BaseWidget $_self |
| 11 | 11 | */ |
| 12 | -trait BaseHtmlPropertiesTrait{ |
|
| 12 | +trait BaseHtmlPropertiesTrait { |
|
| 13 | 13 | |
| 14 | - protected $properties=array (); |
|
| 14 | + protected $properties=array(); |
|
| 15 | 15 | abstract protected function ctrl($name, $value, $typeCtrl); |
| 16 | 16 | abstract protected function removeOldValues(&$oldValue, $allValues); |
| 17 | - abstract protected function _getElementBy($callback,$elements); |
|
| 17 | + abstract protected function _getElementBy($callback, $elements); |
|
| 18 | 18 | public function getProperties() { |
| 19 | 19 | return $this->_self->properties; |
| 20 | 20 | } |
@@ -40,13 +40,13 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | public function addToProperty($name, $value, $separator=" ") { |
| 42 | 42 | if (\is_array($value)) { |
| 43 | - foreach ( $value as $v ) { |
|
| 43 | + foreach ($value as $v) { |
|
| 44 | 44 | $this->_self->addToProperty($name, $v, $separator); |
| 45 | 45 | } |
| 46 | - } else if ($value !== "" && $this->_self->propertyContains($name, $value) === false) { |
|
| 46 | + } else if ($value!=="" && $this->_self->propertyContains($name, $value)===false) { |
|
| 47 | 47 | $v=@$this->_self->properties[$name]; |
| 48 | - if (isset($v) && $v !== "") |
|
| 49 | - $v=$v . $separator . $value; |
|
| 48 | + if (isset($v) && $v!=="") |
|
| 49 | + $v=$v.$separator.$value; |
|
| 50 | 50 | else |
| 51 | 51 | $v=$value; |
| 52 | 52 | |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | public function addToPropertyCtrlCheck($name, $value, $typeCtrl) { |
| 87 | - if ($this->_self->ctrl($name, $value, $typeCtrl) === true) { |
|
| 87 | + if ($this->_self->ctrl($name, $value, $typeCtrl)===true) { |
|
| 88 | 88 | return $this->_self->addToProperty($name, $value); |
| 89 | 89 | } |
| 90 | 90 | return $this; |
@@ -105,12 +105,12 @@ discard block |
||
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | protected function setPropertyCtrl($name, $value, $typeCtrl) { |
| 108 | - if ($this->_self->ctrl($name, $value, $typeCtrl) === true) |
|
| 108 | + if ($this->_self->ctrl($name, $value, $typeCtrl)===true) |
|
| 109 | 109 | return $this->_self->setProperty($name, $value); |
| 110 | 110 | return $this; |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | - protected function getElementByPropertyValue($propertyName,$value, $elements) { |
|
| 114 | - return $this->_self->_getElementBy(function($element) use ($propertyName,$value){return $element->propertyContains($propertyName, $value) === true;}, $elements); |
|
| 113 | + protected function getElementByPropertyValue($propertyName, $value, $elements) { |
|
| 114 | + return $this->_self->_getElementBy(function($element) use ($propertyName, $value){return $element->propertyContains($propertyName, $value)===true; }, $elements); |
|
| 115 | 115 | } |
| 116 | 116 | } |
| 117 | 117 | \ No newline at end of file |