Skip to content

Commit 1c97555

Browse files
committed
[skip ci] Update compile method signatures for PHP 8 compatibility
Changed the signatures of various compile methods to use PHP 8 union and nullable types, replacing 'JsUtils $js = NULL, &$view = NULL' with '?JsUtils $js = NULL, mixed &$view = NULL' where appropriate. This improves type safety and compatibility with newer PHP versions.
1 parent b9dc728 commit 1c97555

31 files changed

+31
-31
lines changed

Ajax/bootstrap/html/HtmlAlert.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function close() {
7878
* (non-PHPdoc)
7979
* @see \Ajax\bootstrap\html\base\BaseHtml::compile()
8080
*/
81-
public function compile(JsUtils $js=NULL, &$view=NULL) {
81+
public function compile(?JsUtils $js=NULL, mixed &$view=NULL) {
8282
if ($this->closeable&&$this->button==="") {
8383
$this->addCloseButton();
8484
}

Ajax/bootstrap/html/HtmlBreadcrumbs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function getHref($index=null,$separator="/"){
123123
* (non-PHPdoc)
124124
* @see \Ajax\bootstrap\html\BaseHtml::compile()
125125
*/
126-
public function compile(JsUtils $js=NULL, &$view=NULL) {
126+
public function compile(?JsUtils $js=NULL, mixed &$view=NULL) {
127127
if($this->autoActive){
128128
$this->setActive();
129129
}

Ajax/bootstrap/html/HtmlCarousel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ private function createIndicator() {
141141
* (non-PHPdoc)
142142
* @see \Ajax\bootstrap\html\base\BaseHtml::compile()
143143
*/
144-
public function compile(JsUtils $js=NULL, &$view=NULL) {
144+
public function compile(?JsUtils $js=NULL, mixed &$view=NULL) {
145145
$this->slides [0]->setClass("item active");
146146
$this->indicators [0]->setClass("active");
147147
$this->createControls();

Ajax/bootstrap/html/HtmlForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct($identifier) {
2424
* (non-PHPdoc)
2525
* @see \Ajax\bootstrap\html\base\BaseHtml::compile()
2626
*/
27-
public function compile(JsUtils $js=NULL, &$view=NULL) {
27+
public function compile(?JsUtils $js=NULL, mixed &$view=NULL) {
2828
if (isset($js)) {
2929
$this->formElementsPrefix=$js->config()->getVar("formElementsPrefix");
3030
foreach ( $this->futureElements as $futureElement ) {

Ajax/bootstrap/html/HtmlGridSystem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function getCellAt($row,$col,$force=true){
9090
return $col;
9191
}
9292

93-
public function compile(JsUtils $js=NULL, &$view=NULL) {
93+
public function compile(?JsUtils $js=NULL, mixed &$view=NULL) {
9494
foreach ($this->rows as $row){
9595
$this->addContent($row);
9696
}

Ajax/bootstrap/html/HtmlProgressbar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function setStyle($cssStyle) {
132132
* (non-PHPdoc)
133133
* @see \Ajax\bootstrap\html\base\BaseHtml::compile()
134134
*/
135-
public function compile(JsUtils $js=NULL, &$view=NULL) {
135+
public function compile(?JsUtils $js=NULL, mixed &$view=NULL) {
136136
$actualStyle=$this->style;
137137
if(isset($this->styleLimits)&& JArray::isAssociative($this->styleLimits)){
138138
foreach ($this->styleLimits as $k=>$v){

Ajax/bootstrap/html/HtmlTabs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function setTabstype($_tabsType="tabs") {
9595
* (non-PHPdoc)
9696
* @see \Ajax\bootstrap\html\BaseHtml::compile()
9797
*/
98-
public function compile(JsUtils $js=NULL, &$view=NULL) {
98+
public function compile(?JsUtils $js=NULL, mixed &$view=NULL) {
9999
$this->setProperty("class", "nav nav-".$this->_tabsType." ".$this->stacked);
100100
return parent::compile($js, $view);
101101
}

Ajax/bootstrap/html/content/HtmlGridCol.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ private function _generateClass(){
3636
return implode(" ", $result);
3737
}
3838

39-
public function compile(JsUtils $js=NULL, &$view=NULL) {
39+
public function compile(?JsUtils $js=NULL, mixed &$view=NULL) {
4040
$this->setProperty("class", $this->_generateClass());
4141
return parent::compile($js,$view);
4242
}

Ajax/bootstrap/html/content/HtmlGridRow.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function getColAt($offset,$force=true){
6363
return $result;
6464
}
6565

66-
public function compile(JsUtils $js=NULL, &$view=NULL) {
66+
public function compile(?JsUtils $js=NULL, mixed &$view=NULL) {
6767

6868
foreach ($this->cols as $col){
6969
$this->addContent($col);

Ajax/bootstrap/html/content/HtmlListgroupItem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function __toString() {
5454
* (non-PHPdoc)
5555
* @see \Ajax\bootstrap\html\base\BaseHtml::compile()
5656
*/
57-
public function compile(JsUtils $js=NULL, &$view=NULL) {
57+
public function compile(?JsUtils $js=NULL, mixed &$view=NULL) {
5858
return $this->element->compile($js, $view);
5959
}
6060

0 commit comments

Comments
 (0)