Skip to content
Snippets Groups Projects

Fix the issues reported by phpcs

3 files
+ 20
0
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -2,6 +2,9 @@
namespace Drupal\http2_server_push\Asset;
/**
* Provides common methods for rendering HTML tag elements for assets.
*/
trait AssetHtmlTagRenderElementTrait {
/**
@@ -11,6 +14,7 @@ trait AssetHtmlTagRenderElementTrait {
* A render element.
*
* @return bool
* TRUE if the render element represents a <link rel=stylesheet>.
*/
protected static function isLinkRelStylesheet(array $element) {
return (isset($element['#type']) && $element['#type'] === 'html_tag')
@@ -27,6 +31,7 @@ trait AssetHtmlTagRenderElementTrait {
* A render element.
*
* @return bool
* TRUE if the render element represents a <script> tag.
*/
protected static function isScript(array $element) {
return (isset($element['#type']) && $element['#type'] === 'html_tag')
@@ -44,6 +49,7 @@ trait AssetHtmlTagRenderElementTrait {
* A render element.
*
* @return bool
* TRUE if the render element is unconditional, FALSE otherwise.
*
* @see \Drupal\Core\Render\Element\HtmlTag::preRenderConditionalComments
*/
@@ -60,6 +66,7 @@ trait AssetHtmlTagRenderElementTrait {
* The name of an attribute.
*
* @return bool
* TRUE if the attribute value is a root-relative URL.
*/
protected static function hasRootRelativeUrl(array $element, $attribute_name) {
$attribute_value = $element['#attributes'][$attribute_name];
Loading