diff --git a/src/Components/AbstractObject.php b/src/Components/AbstractObject.php index bcf3d6e..db22470 100644 --- a/src/Components/AbstractObject.php +++ b/src/Components/AbstractObject.php @@ -216,24 +216,24 @@ protected function get($name) } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function getLazarusObjectId() { return $this->lazarusObjectId; } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function getLazarusClass() { return $this->lazarusClass; } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function fire($eventName) { if (array_key_exists($eventName, $this->eventHandlers)) { @@ -244,8 +244,8 @@ public function fire($eventName) } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function on($eventName, callable $eventHandler) { $eventName = 'on' . $eventName; diff --git a/src/Components/Calendar.php b/src/Components/Calendar.php index 30d6725..952a5ed 100644 --- a/src/Components/Calendar.php +++ b/src/Components/Calendar.php @@ -30,9 +30,7 @@ class Calendar extends VisualObject */ public function setValue($value) { - /** - * See explanation of P.O.G in self::getValue() - */ + // See explanation of P.O.G in self::getValue() $datetime1 = date_create('1900-01-01'); $datetime2 = date_create_from_format('d/m/Y', $value); $interval = date_diff($datetime1, $datetime2, true); diff --git a/src/Components/ContainerObject.php b/src/Components/ContainerObject.php index 30a757b..042b0ba 100644 --- a/src/Components/ContainerObject.php +++ b/src/Components/ContainerObject.php @@ -19,16 +19,16 @@ abstract class ContainerObject extends VisualObject implements ContainerObjectIn protected $children = []; /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function appendChild(VisualObjectInterface $object) { $this->children[$object->getLazarusObjectId()] = $object; } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function getChild($lazarusObjectId) { if (!isset($this->children[$lazarusObjectId])) { @@ -39,8 +39,8 @@ public function getChild($lazarusObjectId) } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function getChildren() { return $this->children; diff --git a/src/Components/InputPassword.php b/src/Components/InputPassword.php index 1ab9961..520c02a 100644 --- a/src/Components/InputPassword.php +++ b/src/Components/InputPassword.php @@ -35,9 +35,7 @@ public function __construct( ) { parent::__construct($defaultAttributes, $parent, $application); - /* - * Required to configure the component as a password field. - */ + // Required to configure the component as a password field. $this->setEchoMode(); } diff --git a/src/Components/VisualObject.php b/src/Components/VisualObject.php index 3801690..ced1a0d 100644 --- a/src/Components/VisualObject.php +++ b/src/Components/VisualObject.php @@ -13,16 +13,16 @@ abstract class VisualObject extends AbstractObject implements VisualObjectInterface { /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function getAutoSize() { return $this->get('autosize'); } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function setAutoSize($autoSize) { $this->set('autosize', $autoSize); @@ -31,16 +31,16 @@ public function setAutoSize($autoSize) } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function getBackgroundColor() { return $this->get('color'); } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function setBackgroundColor($color) { $this->set('color', Color::toLazarus($color)); @@ -49,16 +49,16 @@ public function setBackgroundColor($color) } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function getBottom() { return $this->get('bottom'); } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function setBottom($bottom) { $this->set('bottom', $bottom); @@ -67,16 +67,16 @@ public function setBottom($bottom) } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function getHeight() { return $this->get('height'); } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function setHeight($height) { $this->set('height', $height); @@ -85,16 +85,16 @@ public function setHeight($height) } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function getLeft() { return $this->get('left'); } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function setLeft($left) { $this->set('left', $left); @@ -103,16 +103,16 @@ public function setLeft($left) } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function getRight() { return $this->get('right'); } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function setRight($right) { $this->set('right', $right); @@ -121,16 +121,16 @@ public function setRight($right) } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function getTop() { return $this->get('top'); } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function setTop($top) { $this->set('top', $top); @@ -139,16 +139,16 @@ public function setTop($top) } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function getWidth() { return $this->get('width'); } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function setWidth($width) { $this->set('width', $width); @@ -157,16 +157,16 @@ public function setWidth($width) } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function getVisible() { return $this->get('visible'); } /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ public function setVisible($visible) { $this->set('visible', $visible); diff --git a/src/Exception/ComponentException.php b/src/Exception/ComponentException.php index e7de7cc..25bf270 100644 --- a/src/Exception/ComponentException.php +++ b/src/Exception/ComponentException.php @@ -11,10 +11,21 @@ */ class ComponentException extends \RuntimeException { + /** + * ComponentException + * + * @param string $message + * @param int $code + * @param \Exception|null $previous + */ public function __construct($message, $code = 0, \Exception $previous = null) { parent::__construct($message, $code, $previous); } + + /** + * Activated when casting to string + */ public function __toString() { return __CLASS__ . ": [{$this->code}]: {$this->message}\n";