Skip to content

Commit 88014d2

Browse files
frankmayerrdeutz
authored andcommitted
Replace unnecessary double quotes in libraries/cms (#13235)
* Replace unnecessary double quotes * Reverted some double quotes-replacements
1 parent 2f683e9 commit 88014d2

File tree

18 files changed

+25
-25
lines changed

18 files changed

+25
-25
lines changed

libraries/cms/editor/editor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ public function initialise()
261261

262262
$document = JFactory::getDocument();
263263

264-
if (method_exists($document, "addCustomTag") && !empty($return))
264+
if (method_exists($document, 'addCustomTag') && !empty($return))
265265
{
266266
$document->addCustomTag($return);
267267
}

libraries/cms/form/field/limitbox.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ protected function getOptions()
8080
asort($limits);
8181

8282
// Add an option to show all?
83-
$showAll = isset($this->element['showall']) ? ($this->element['showall'] == "true") : true;
83+
$showAll = isset($this->element['showall']) ? ($this->element['showall'] == 'true') : true;
8484

8585
if ($showAll)
8686
{

libraries/cms/form/rule/password.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function test(SimpleXMLElement $element, $value, $group = null, Registry
137137
// Minimum number of upper case ASCII characters required
138138
if (!empty($minimumUppercase))
139139
{
140-
$nUppercase = preg_match_all("/[A-Z]/", $value, $umatch);
140+
$nUppercase = preg_match_all('/[A-Z]/', $value, $umatch);
141141

142142
if ($nUppercase < $minimumUppercase)
143143
{

libraries/cms/helper/tags.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ public function getTagItemsQuery($tagId, $typesr = null, $includeChildren = fals
583583

584584
// Join over the users for the author and email
585585
->select("CASE WHEN c.core_created_by_alias > ' ' THEN c.core_created_by_alias ELSE ua.name END AS author")
586-
->select("ua.email AS author_email")
586+
->select('ua.email AS author_email')
587587

588588
->join('LEFT', '#__users AS ua ON ua.id = c.core_created_user_id')
589589

libraries/cms/html/jgrid.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public static function action($i, $task, $prefix = '', $text = '', $active_title
7979
$html[] = $tip ? ' title="' . $title . '"' : '';
8080
$html[] = '>';
8181

82-
if ($active_class == "protected")
82+
if ($active_class == 'protected')
8383
{
8484
$html[] = '<span class="icon-lock"></span>';
8585
}

libraries/cms/html/list.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ abstract class JHtmlList
3131
*
3232
* @since 1.5
3333
*/
34-
public static function images($name, $active = null, $javascript = null, $directory = null, $extensions = "bmp|gif|jpg|png")
34+
public static function images($name, $active = null, $javascript = null, $directory = null, $extensions = 'bmp|gif|jpg|png')
3535
{
3636
if (!$directory)
3737
{
@@ -109,7 +109,7 @@ public static function genericordering($query, $chop = 30)
109109

110110
if (StringHelper::strlen($items[$i]->text) > $chop)
111111
{
112-
$text = StringHelper::substr($items[$i]->text, 0, $chop) . "...";
112+
$text = StringHelper::substr($items[$i]->text, 0, $chop) . '...';
113113
}
114114
else
115115
{

libraries/cms/html/select.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ public static function options($arr, $optKey = 'value', $optText = 'text', $sele
686686
$splitText = explode(' - ', $text, 2);
687687
$text = $splitText[0];
688688

689-
if (isset($splitText[1]) && $splitText[1] != "" && !preg_match('/^[\s]+$/', $splitText[1]))
689+
if (isset($splitText[1]) && $splitText[1] != '' && !preg_match('/^[\s]+$/', $splitText[1]))
690690
{
691691
$text .= ' - ' . $splitText[1];
692692
}

libraries/cms/html/string.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public static function truncate($text, $length = 0, $noSplit = true, $allowHtml
9595
$openedTags = $result[1];
9696

9797
// Some tags self close so they do not need a separate close tag.
98-
$openedTags = array_diff($openedTags, array("img", "hr", "br"));
98+
$openedTags = array_diff($openedTags, array('img', 'hr', 'br'));
9999
$openedTags = array_values($openedTags);
100100

101101
// Put all closed tags into an array
@@ -118,7 +118,7 @@ public static function truncate($text, $length = 0, $noSplit = true, $allowHtml
118118
{
119119
if (!in_array($openedTags[$i], $closedTags))
120120
{
121-
$tmp .= "</" . $openedTags[$i] . ">";
121+
$tmp .= '</' . $openedTags[$i] . '>';
122122
}
123123
else
124124
{

libraries/cms/html/tabs.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ protected static function loadBehavior($group, $params = array())
8787
$opt['onActive'] = (isset($params['onActive'])) ? '\\' . $params['onActive'] : null;
8888
$opt['onBackground'] = (isset($params['onBackground'])) ? '\\' . $params['onBackground'] : null;
8989
$opt['display'] = (isset($params['startOffset'])) ? (int) $params['startOffset'] : null;
90-
$opt['titleSelector'] = "dt.tabs";
91-
$opt['descriptionSelector'] = "dd.tabs";
90+
$opt['titleSelector'] = 'dt.tabs';
91+
$opt['descriptionSelector'] = 'dd.tabs';
9292

9393
// When use storage is set and value is false - By default we allow to use storage
9494
$opt['useStorage'] = (isset($params['useCookie']) && !$params['useCookie']) ? false : true;

libraries/cms/html/tag.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ public static function tags($config = array('filter.published' => array(0, 1)))
164164
public static function ajaxfield($selector = '#jform_tags', $allowCustom = true)
165165
{
166166
// Get the component parameters
167-
$params = JComponentHelper::getParams("com_tags");
168-
$minTermLength = (int) $params->get("min_term_length", 3);
167+
$params = JComponentHelper::getParams('com_tags');
168+
$minTermLength = (int) $params->get('min_term_length', 3);
169169

170170
$displayData = array(
171171
'minTermLength' => $minTermLength,

0 commit comments

Comments
 (0)