Skip to content

Commit b9dc728

Browse files
committed
[skip ci] Update compile method signatures for type safety
Changed the compile method signatures in several classes to use nullable and explicit types (?JsUtils and mixed) for parameters. This improves type safety and compatibility with newer PHP versions.
1 parent dbc45c0 commit b9dc728

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

Ajax/common/html/HtmlCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public function addPropertyValues($property,$values){
194194
return $this;
195195
}
196196

197-
public function compile(JsUtils $js=NULL, &$view=NULL) {
197+
public function compile(?JsUtils $js=NULL, mixed &$view=NULL) {
198198
$index=0;
199199
$classname=\strtolower(JReflection::shortClassName($this));
200200
foreach ($this->content as $item){

Ajax/common/html/html5/HtmlInput.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function setPlaceholder($value) {
3939
return $this;
4040
}
4141

42-
public function compile(JsUtils $js = NULL, &$view = NULL) {
42+
public function compile(?JsUtils $js = NULL, mixed &$view = NULL) {
4343
$value = $this->_placeholder;
4444
if (JString::isNull($value)) {
4545
if (JString::isNotNull($this->getProperty("name")))

Ajax/semantic/html/collections/form/HtmlForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public function addMessage(string $identifier, string $content, ?string $header=
163163

164164

165165

166-
public function compile(JsUtils $js=NULL,&$view=NULL){
166+
public function compile(?JsUtils $js=NULL,mixed &$view=NULL){
167167
if(\sizeof($this->_validationParams)>0)
168168
$this->setProperty("novalidate", "");
169169
return parent::compile($js,$view);

Ajax/semantic/html/content/HtmlAccordionItem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ protected function createTitleElement(){
3636
return $element;
3737
}
3838

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

Ajax/semantic/html/modules/HtmlModal.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public function forward(JsUtils $js, $initialControllerInstance, $controllerName
197197
*
198198
* @see \Ajax\semantic\html\base\HtmlSemDoubleElement::compile()
199199
*/
200-
public function compile(JsUtils $js = NULL, &$view = NULL) {
200+
public function compile(?JsUtils $js = NULL, mixed &$view = NULL) {
201201
$this->content = JArray::sortAssociative($this->content, [
202202
'header',
203203
'content',

Ajax/semantic/html/modules/HtmlShape.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public function run(JsUtils $js) {
153153
return $this->_bsComponent;
154154
}
155155

156-
public function compile(JsUtils $js=NULL, &$view=NULL) {
156+
public function compile(?JsUtils $js=NULL,mixed &$view=NULL) {
157157
if($this->_autoActive)
158158
$this->setActiveSide(0);
159159
return parent::compile($js,$view);

Ajax/semantic/widgets/dataelement/DataElement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function __construct($identifier, $modelInstance=NULL) {
2727
$this->content["table"]->setDefinition()->addClass("_element");
2828
}
2929

30-
public function compile(JsUtils $js=NULL,&$view=NULL){
30+
public function compile(?JsUtils $js=NULL,mixed &$view=NULL){
3131
if(!$this->_generated){
3232
$this->_instanceViewer->setInstance($this->_modelInstance);
3333

0 commit comments

Comments
 (0)