Skip to content
Snippets Groups Projects
Commit 82933b5d authored by Girish G's avatar Girish G
Browse files

Issue #3514294: Fix issues reported by PHPCS

parent f069d9cb
No related branches found
No related tags found
1 merge request!8Issue #3514294: Fix issues reported by PHPCS
......@@ -9,4 +9,4 @@
* - text: The button label.
*/
#}
<a{{ attributes }}><span>{{ text }}</span></a>
\ No newline at end of file
<a{{ attributes }}><span>{{ text }}</span></a>
......@@ -9,4 +9,4 @@
* - text: The content.
*/
#}
<{{ type }}{{ attributes }}>{{ text | raw }}</{{ type }}>
\ No newline at end of file
<{{ type }}{{ attributes }}>{{ text | raw }}</{{ type }}>
......@@ -8,4 +8,4 @@
* - text: The quoted text.
*/
#}
<span class="{{ class }}">{{ text }}</span>
\ No newline at end of file
<span class="{{ class }}">{{ text }}</span>
......@@ -9,4 +9,4 @@
* - alt: The alt text.
*/
#}
<img src="{{ src }}" class="{{ class }}" alt="{{ alt }}">
\ No newline at end of file
<img src="{{ src }}" class="{{ class }}" alt="{{ alt }}">
......@@ -9,4 +9,4 @@
* - text: The content.
*/
#}
<{{ type }}{{ attributes }}>{{ text | raw }}</{{ type }}>
\ No newline at end of file
<{{ type }}{{ attributes }}>{{ text | raw }}</{{ type }}>
......@@ -9,4 +9,4 @@
* - text: The link label.
*/
#}
<a{{ attributes }}>{{ text }}</a>
\ No newline at end of file
<a{{ attributes }}>{{ text }}</a>
......@@ -15,4 +15,4 @@
<span class="quote-author">{{ author | trans }} wrote: </span>
{% endif %}
{{ text | raw }}
</span>
\ No newline at end of file
</span>
......@@ -86,7 +86,7 @@ class ShortcodeService {
* @return array
* Array of shortcode plugin definitions, keyed by token, not id.
*/
public function getShortcodePlugins(FilterInterface $filter = NULL, bool $reset = FALSE): array {
public function getShortcodePlugins(?FilterInterface $filter = NULL, bool $reset = FALSE): array {
$shortcodes = &drupal_static(__FUNCTION__);
// Prime plugin cache.
......@@ -212,7 +212,7 @@ class ShortcodeService {
* @return string
* The processed string.
*/
public function process($text, string $langcode = Language::LANGCODE_NOT_SPECIFIED, FilterInterface $filter = NULL): string {
public function process($text, string $langcode = Language::LANGCODE_NOT_SPECIFIED, ?FilterInterface $filter = NULL): string {
$shortcodes = $this->getShortcodePlugins($filter);
// Processing recursively, now embedding tags within other tags is
......@@ -357,7 +357,7 @@ class ShortcodeService {
* @return string
* The processed string.
*/
public function postprocessText($text, string $langcode, FilterInterface $filter = NULL): string {
public function postprocessText($text, string $langcode, ?FilterInterface $filter = NULL): string {
// preg_match_all('/<p>s.*<!--.*-->.*<div/isU', $text, $r);
// dpm($r, '$r');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment