Skip to content

Commit

Permalink
style(creator): Remove create
Browse files Browse the repository at this point in the history
  • Loading branch information
anibalsanchez committed Jan 16, 2023
1 parent bb7a886 commit 5ad7931
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions library/src/Infrastructure/Service/Cms/Joomla/ScriptHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static function addScriptDeclaration($script)
$document->addScriptDeclaration($script);

// Alternative XT Html Asset Tags Builder
$inlineScriptTag = InlineScriptTag::create($script);
$inlineScriptTag = new InlineScriptTag($script);
HtmlAssetRepository::getInstance()->push($inlineScriptTag);
}

Expand All @@ -58,7 +58,7 @@ public static function addStyleDeclaration($style)
$document->addStyleDeclaration($style);

// Alternative XT Html Asset Tags Builder
$inlineStyleTag = InlineStyleTag::create($style);
$inlineStyleTag = new InlineStyleTag($style);
HtmlAssetRepository::getInstance()->push($inlineStyleTag);
}

Expand All @@ -81,7 +81,7 @@ public static function addDeferredExtensionScript($extensionScript, $options = [
self::addScriptToDocument($uriWithMediaVersion, $options, $attribs);

// Alternative XT Html Asset Tags Builder
$scriptTag = ScriptTag::create($uriWithMediaVersion, $attribs);
$scriptTag = new ScriptTag($uriWithMediaVersion, $attribs);
HtmlAssetRepository::getInstance()->push($scriptTag);
}

Expand Down Expand Up @@ -122,7 +122,7 @@ public static function addDeferredScript($extensionScriptUri, $options = [], $at
$document->addScript($extensionScriptUri, $options, $attribs);

// Alternative XT Html Asset Tags Builder
$scriptTag = ScriptTag::create($extensionScriptUri, $attribs);
$scriptTag = new ScriptTag($extensionScriptUri, $attribs);
HtmlAssetRepository::getInstance()->push($scriptTag);
}

Expand All @@ -145,12 +145,12 @@ public static function addDeferredStylesheet($stylesheetUri, $options = [], $att
$script = LinkStylesheetByScript::renderScript($stylesheetUri);
$document->addScriptDeclaration($script);

$noScriptTagTag = LinkCriticalStylesheetTag::create($stylesheetUri);
$noScriptTag = HtmlAssetTagsBuilder::create()->buildNoScriptTag($noScriptTagTag);
$noScriptTagTag = new LinkCriticalStylesheetTag($stylesheetUri);
$noScriptTag = (new HtmlAssetTagsBuilder())->buildNoScriptTag($noScriptTagTag);
$document->addCustomTag($noScriptTag);

// Alternative XT Html Asset Tags Builder
$linkStylesheetTag = LinkDeferStylesheetTag::create($stylesheetUri, $attribs);
$linkStylesheetTag = new LinkDeferStylesheetTag($stylesheetUri, $attribs);
HtmlAssetRepository::getInstance()->push($linkStylesheetTag);
}

Expand All @@ -177,7 +177,7 @@ public static function addInlineExtensionScript($extensionRelativeScript, $optio
$document->addScriptDeclaration($scriptDeclaration);

// Alternative XT Html Asset Tags Builder
$inlineScriptTag = InlineScriptTag::create($scriptDeclaration);
$inlineScriptTag = new InlineScriptTag($scriptDeclaration);
HtmlAssetRepository::getInstance()->push($inlineScriptTag);

return true;
Expand Down Expand Up @@ -209,7 +209,7 @@ public static function addInlineExtensionStylesheet($extensionRelativeStylesheet
$document->addStyleDeclaration($styleDeclaration);

// Alternative XT Html Asset Tags Builder
$inlineStyleTag = InlineStyleTag::create($styleDeclaration);
$inlineStyleTag = new InlineStyleTag($styleDeclaration);
HtmlAssetRepository::getInstance()->push($inlineStyleTag);

return true;
Expand Down Expand Up @@ -246,7 +246,7 @@ public static function addClient($uriRelative, $options = [])
$uriBase = CMSUri::root();
}

return UrlHelper::create()->combine($uriBase, $uriRelative);
return (new UrlHelper())->combine($uriBase, $uriRelative);
}

// Alias addInlineExtensionScript
Expand Down

0 comments on commit 5ad7931

Please sign in to comment.