From 40f47924f7b88add2915ac3aafb8d0a411d99385 Mon Sep 17 00:00:00 2001 From: CyberVitexus Date: Fri, 15 Nov 2024 18:36:32 +0100 Subject: [PATCH] v1.9.0 release --- composer.json | 2 +- debian/changelog | 10 ++++++++-- src/Ease/TWB4/Alert.php | 10 +++++----- src/Ease/TWB4/Badge.php | 8 ++++---- src/Ease/TWB4/Breadcrumb.php | 6 +++--- src/Ease/TWB4/Card.php | 6 ++++++ src/Ease/TWB4/Carousel.php | 10 +++++----- src/Ease/TWB4/Col.php | 8 ++++---- src/Ease/TWB4/Container.php | 2 +- src/Ease/TWB4/ContainerFluid.php | 4 ++-- src/Ease/TWB4/DropdownLink.php | 2 +- src/Ease/TWB4/Label.php | 6 +++--- src/Ease/TWB4/LinkButton.php | 6 +++--- src/Ease/TWB4/NavItemDropDown.php | 3 ++- src/Ease/TWB4/Navbar.php | 14 +++++++------- src/Ease/TWB4/Panel.php | 6 +++--- src/Ease/TWB4/PillBadge.php | 6 +++--- src/Ease/TWB4/ProgressBar.php | 10 +++++----- src/Ease/TWB4/Row.php | 4 ++-- src/Ease/TWB4/Table.php | 4 ++-- src/Ease/TWB4/WebPage.php | 12 ++++++------ src/Ease/TWB4/Well.php | 4 ++-- 22 files changed, 78 insertions(+), 65 deletions(-) diff --git a/composer.json b/composer.json index b5e8c2f..746f01b 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "vitexsoftware/ease-html": ">= 1.25" + "vitexsoftware/ease-html": "^1.32" }, "autoload": { "psr-4": { diff --git a/debian/changelog b/debian/changelog index b2ddb21..301cec4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,14 @@ -php-vitexsoftware-ease-bootstrap4 (1.8.0) UNRELEASED; urgency=medium +php-vitexsoftware-ease-bootstrap4 (1.9.0) UNRELEASED; urgency=medium + + * Semantic versioning + + -- vitex Fri, 15 Nov 2024 18:36:22 +0100 + +php-vitexsoftware-ease-bootstrap4 (1.8.0) unstable; urgency=medium * ProgressBarr added - -- vitex Sun, 25 Aug 2024 11:42:01 +0200 + -- vitex Fri, 15 Nov 2024 18:35:43 +0100 php-vitexsoftware-ease-bootstrap4 (1.7) unstable; urgency=medium diff --git a/src/Ease/TWB4/Alert.php b/src/Ease/TWB4/Alert.php index 5f17b37..2fbb93e 100644 --- a/src/Ease/TWB4/Alert.php +++ b/src/Ease/TWB4/Alert.php @@ -28,13 +28,13 @@ class Alert extends DivTag /** * Bootstrap4's Alert. * - * @see https://v4-alpha.getbootstrap.com/components/alerts/ + * @see https://getbootstrap.com/docs/4.0/components/alerts/ * - * @param string $type success|info|warning|danger - * @param mixed $content to insert in - * @param array $properties additional + * @param string $type success|info|warning|danger + * @param mixed $content to insert in + * @param array $properties additional */ - public function __construct($type, $content = null, array $properties = []) + public function __construct(string $type, $content = null, array $properties = []) { $properties['role'] = 'alert'; parent::__construct($content, $properties); diff --git a/src/Ease/TWB4/Badge.php b/src/Ease/TWB4/Badge.php index fd014cb..bf3fc78 100644 --- a/src/Ease/TWB4/Badge.php +++ b/src/Ease/TWB4/Badge.php @@ -23,11 +23,11 @@ class Badge extends \Ease\Html\SpanTag /** * Návěstí bootstrapu. * - * @see http://getbootstrap.com/components/#badges + * @see https://getbootstrap.com/docs/4.6/components/badge/ * - * @param string $type success|info|warning|danger - * @param mixed $content to insert in - * @param array $properties additional + * @param string $type success|info|warning|danger + * @param mixed $content to insert in + * @param array $properties additional */ public function __construct($type, $content = null, array $properties = []) { diff --git a/src/Ease/TWB4/Breadcrumb.php b/src/Ease/TWB4/Breadcrumb.php index 0b5617d..4c08e24 100644 --- a/src/Ease/TWB4/Breadcrumb.php +++ b/src/Ease/TWB4/Breadcrumb.php @@ -25,10 +25,10 @@ class Breadcrumb extends \Ease\Html\NavTag /** * Bootstrap's Breadcrumb. * - * @see https://getbootstrap.com/docs/4.0/components/breadcrumb/ + * @see https://getbootstrap.com/docs/4.1/components/breadcrumb/ * - * @param mixed $content to insert in - * @param array $properties additional + * @param mixed $content to insert in + * @param array $properties additional */ public function __construct($content = null, array $properties = []) { diff --git a/src/Ease/TWB4/Card.php b/src/Ease/TWB4/Card.php index 5bf469d..377a123 100644 --- a/src/Ease/TWB4/Card.php +++ b/src/Ease/TWB4/Card.php @@ -24,6 +24,12 @@ */ class Card extends DivTag { + /** + * Card. + * + * @param string $content + * @param array $properties + */ public function __construct($content = null, array $properties = []) { if (\is_array($properties) && \array_key_exists('class', $properties)) { diff --git a/src/Ease/TWB4/Carousel.php b/src/Ease/TWB4/Carousel.php index 74c4e1c..1f0434a 100644 --- a/src/Ease/TWB4/Carousel.php +++ b/src/Ease/TWB4/Carousel.php @@ -24,11 +24,11 @@ */ class Carousel extends DivTag { - public $slides = []; - public $captions = []; - public $showCaptions = false; - public $showIndicators = false; - public $showControls = false; + public array $slides = []; + public array $captions = []; + public bool $showCaptions = false; + public bool $showIndicators = false; + public bool $showControls = false; public int $activeSlide = 0; /** diff --git a/src/Ease/TWB4/Col.php b/src/Ease/TWB4/Col.php index 81c2a60..4cb3696 100644 --- a/src/Ease/TWB4/Col.php +++ b/src/Ease/TWB4/Col.php @@ -22,10 +22,10 @@ class Col extends \Ease\Html\DivTag * * @see http://getbootstrap.com/css/#grid * - * @param int $size Velikost políčka 1 - 12 - * @param mixed $content Obsah políčka - * @param string $target Typ zařízení xs|sm|md|lg - * @param array $properties Další vlastnosti tagu + * @param int $size Column size 1 - 12 + * @param mixed $content Content to put into Col div + * @param string $target Device type xs|sm|md|lg + * @param array $properties Additional properties */ public function __construct( $size, diff --git a/src/Ease/TWB4/Container.php b/src/Ease/TWB4/Container.php index 6fb1efa..b839652 100644 --- a/src/Ease/TWB4/Container.php +++ b/src/Ease/TWB4/Container.php @@ -21,7 +21,7 @@ class Container extends \Ease\Html\DivTag * Twitter Bootrstap Container. * * @param mixed $content - * @param array $properties of Container Row + * @param array $properties of Container Row */ public function __construct($content = null, array $properties = []) { diff --git a/src/Ease/TWB4/ContainerFluid.php b/src/Ease/TWB4/ContainerFluid.php index 5082bbd..846a957 100644 --- a/src/Ease/TWB4/ContainerFluid.php +++ b/src/Ease/TWB4/ContainerFluid.php @@ -20,8 +20,8 @@ class ContainerFluid extends \Ease\Html\DivTag /** * Twitter Bootrstap fluid Container. * - * @param mixed $content - * @param array $properties of Container Row + * @param mixed $content + * @param array $properties of Container Row */ public function __construct($content = null, array $properties = []) { diff --git a/src/Ease/TWB4/DropdownLink.php b/src/Ease/TWB4/DropdownLink.php index c48da36..83a2f97 100644 --- a/src/Ease/TWB4/DropdownLink.php +++ b/src/Ease/TWB4/DropdownLink.php @@ -22,7 +22,7 @@ */ class DropdownLink extends \Ease\Html\DivTag { - private \Ease\Html\DivTag $dropdownMenu = null; + private \Ease\Html\DivTag $dropdownMenu; /** * Dropdown menu. diff --git a/src/Ease/TWB4/Label.php b/src/Ease/TWB4/Label.php index aed6f01..4862e1e 100644 --- a/src/Ease/TWB4/Label.php +++ b/src/Ease/TWB4/Label.php @@ -25,9 +25,9 @@ class Label extends Card /** * TWB3 Backward compatibility Label. * - * @param string $type alert|success|danger| etc... - * @param mixed $content Content inside label - * @param array $properties additional properties for Card + * @param string $type alert|success|danger| etc... + * @param mixed $content Content inside label + * @param array $properties additional properties for Card */ public function __construct($type, $content, array $properties = []) { diff --git a/src/Ease/TWB4/LinkButton.php b/src/Ease/TWB4/LinkButton.php index 2e4e922..a350213 100644 --- a/src/Ease/TWB4/LinkButton.php +++ b/src/Ease/TWB4/LinkButton.php @@ -28,10 +28,10 @@ class LinkButton extends \Ease\Html\ATag /** * Odkazové tlačítko twbootstrabu. * - * @param string $href cíl odkazu - * @param mixed $contents obsah tlačítka + * @param string $href URL + * @param mixed $contents Button Label * @param string $type primary|info|success|warning|danger|inverse|link - * @param array $properties dodatečné vlastnosti + * @param array $properties additional properties */ public function __construct( $href, diff --git a/src/Ease/TWB4/NavItemDropDown.php b/src/Ease/TWB4/NavItemDropDown.php index 25e2f3c..68d0488 100644 --- a/src/Ease/TWB4/NavItemDropDown.php +++ b/src/Ease/TWB4/NavItemDropDown.php @@ -27,7 +27,8 @@ class NavItemDropDown extends \Ease\Html\DivTag /** * DropDown menu. * - * @param string $heading + * @param string $heading + * @param array $items */ public function __construct($heading, array $items = []) { diff --git a/src/Ease/TWB4/Navbar.php b/src/Ease/TWB4/Navbar.php index 3d98272..6067469 100644 --- a/src/Ease/TWB4/Navbar.php +++ b/src/Ease/TWB4/Navbar.php @@ -121,13 +121,13 @@ public function addMenuItem($content, $enabled = true, $placement = 'left') /** * Add Dropdown menu to nav. * - * @param string $label submenu label - * @param array $items ['url'=>'label','url2'=>'label2','divider1'=>'',...] - * @param string $placement "left" is default + * @param string $label submenu label + * @param array $items ['url'=>'label','url2'=>'label2','divider1'=>'',...] + * @param string $placement "left" is default * * @return NavItemDropDown */ - public function addDropDownMenu($label, $items, $placement = 'left') + public function addDropDownMenu(string $label, array $items, string $placement = 'left') { return $this->addMenuItem(new NavItemDropDown($label, $items), true, $placement); } @@ -135,9 +135,9 @@ public function addDropDownMenu($label, $items, $placement = 'left') /** * Navbar collapse helper. * - * @return \Ease\Html\DivTagnavbar collapse + * @return \Ease\Html\DivTag navbar collapse */ - public function navbarCollapse() + public function navbarCollapse(): DivTag { return new DivTag( [$this->leftContent, $this->rightContent], @@ -151,7 +151,7 @@ public function finalize(): void parent::finalize(); } - public function navBarToggler() + public function navBarToggler(): ButtonTag { return new ButtonTag( new SpanTag( diff --git a/src/Ease/TWB4/Panel.php b/src/Ease/TWB4/Panel.php index 91e7577..28c4161 100644 --- a/src/Ease/TWB4/Panel.php +++ b/src/Ease/TWB4/Panel.php @@ -27,17 +27,17 @@ class Panel extends Card /** * Panel Head. */ - public \Ease\Html\DivTag $header; + public DivTag $header; /** * Panel's body. */ - public \Ease\Html\DivTag $body; + public DivTag $body; /** * footer content. */ - public \Ease\Html\DivTag $footer; + public DivTag $footer; /** * Panel type. diff --git a/src/Ease/TWB4/PillBadge.php b/src/Ease/TWB4/PillBadge.php index 9679781..ce86596 100644 --- a/src/Ease/TWB4/PillBadge.php +++ b/src/Ease/TWB4/PillBadge.php @@ -18,16 +18,16 @@ /** * Rounded Bootstrap4's Badge. */ -class PillBadge extends \Ease\Html\Span +class PillBadge extends \Ease\Html\SpanTag { /** * Rounded Bootstrap4's Badge. * - * @see http://getbootstrap.com/components/#badges + * @see https://getbootstrap.com/docs/4.1/components/badge/ * * @param string $type success|info|warning|danger * @param mixed $content to insert in - * @param array $properties additional + * @param array $properties additional properties */ public function __construct($type, $content = null, array $properties = []) { diff --git a/src/Ease/TWB4/ProgressBar.php b/src/Ease/TWB4/ProgressBar.php index 0a08186..0ba2e6f 100644 --- a/src/Ease/TWB4/ProgressBar.php +++ b/src/Ease/TWB4/ProgressBar.php @@ -29,12 +29,12 @@ class ProgressBar extends \Ease\Html\DivTag /** * ProgressBar. * - * @see https://getbootstrap.com/docs/4.0/components/progress/ + * @see https://getbootstrap.com/docs/4.1/components/progress/ * - * @param int $value 0-100 - * @param string $label progress bar caption - * @param string $tweaks progress-bar-striped progress-bar-animated bg-info - * @param array $properties of main div of progress bar + * @param int $value 0-100 + * @param string $label progress bar caption + * @param string $tweaks progress-bar-striped progress-bar-animated bg-info + * @param array $properties additional properties */ public function __construct($value = 0, $label = '', $tweaks = '', array $properties = []) { diff --git a/src/Ease/TWB4/Row.php b/src/Ease/TWB4/Row.php index 92538d4..9785d3e 100644 --- a/src/Ease/TWB4/Row.php +++ b/src/Ease/TWB4/Row.php @@ -20,8 +20,8 @@ class Row extends \Ease\Html\DivTag /** * Twitter Bootrstap Row. * - * @param mixed $content Initial content - * @param array $properties Of Row Div + * @param mixed $content Initial content + * @param array $properties Of Row Div */ public function __construct($content = null, array $properties = []) { diff --git a/src/Ease/TWB4/Table.php b/src/Ease/TWB4/Table.php index 7e20faf..5c7dd63 100644 --- a/src/Ease/TWB4/Table.php +++ b/src/Ease/TWB4/Table.php @@ -25,8 +25,8 @@ class Table extends \Ease\Html\TableTag /** * TWB4 Table. * - * @param mixed $content tag content - * @param array $properties table tag options + * @param mixed $content tag content + * @param array $properties table tag options */ public function __construct($content = null, array $properties = []) { diff --git a/src/Ease/TWB4/WebPage.php b/src/Ease/TWB4/WebPage.php index 10da42a..94d3ccc 100644 --- a/src/Ease/TWB4/WebPage.php +++ b/src/Ease/TWB4/WebPage.php @@ -65,7 +65,7 @@ public function __construct(string $pageTitle = '') public function addToHeader($content) { - if (null === $this->header) { + if ( $this->header) { $this->header = new \Ease\Html\HeaderTag(); } @@ -74,7 +74,7 @@ public function addToHeader($content) public function addToMain($content) { - if (null === $this->main) { + if (isset($this->main) ) { $this->main = new \Ease\Html\MainTag(); } @@ -83,7 +83,7 @@ public function addToMain($content) public function addToFooter($content) { - if (null === $this->footer) { + if (isset($this->footer) ) { $this->footer = new \Ease\Html\FooterTag(); } @@ -92,15 +92,15 @@ public function addToFooter($content) public function finalize(): void { - if ((null === $this->header) === false) { + if (isset($this->header)) { $this->addAsFirst($this->header); } - if ((null === $this->main) === false) { + if (isset($this->main)) { $this->addItem($this->main); } - if ((null === $this->footer) === false) { + if (isset($this->footer)) { $this->addItem($this->footer); } diff --git a/src/Ease/TWB4/Well.php b/src/Ease/TWB4/Well.php index 4af8e5c..49b1fbb 100644 --- a/src/Ease/TWB4/Well.php +++ b/src/Ease/TWB4/Well.php @@ -23,8 +23,8 @@ class Well extends Card /** * Twitter Bootrstap Well. * - * @param mixed $content - * @param mixed $properties + * @param mixed $content + * @param array $properties */ public function __construct($content = null, array $properties = []) {