Skip to content

Commit 2081bf8

Browse files
committed
Rem. unused strict param from isPlaceholderType
Boyscout: This parameter was not used by any callers, and should always be true anyway, so might aswell clean it up.
1 parent 97e3ed0 commit 2081bf8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/Caxy/HtmlDiff/HtmlDiff.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ protected function getAttributeFromTag($text, $attribute)
452452
*/
453453
protected function isListPlaceholder($text)
454454
{
455-
return $this->isPlaceholderType($text, array('ol', 'dl', 'ul'));
455+
return $this->isPlaceholderType($text, ['ol', 'dl', 'ul']);
456456
}
457457

458458
/**
@@ -478,26 +478,26 @@ public function isImagePlaceholder($text)
478478
/**
479479
* @param string $text
480480
* @param array|string $types
481-
* @param bool $strict
482481
*
483482
* @return bool
484483
*/
485-
protected function isPlaceholderType($text, $types, $strict = true)
484+
protected function isPlaceholderType($text, $types)
486485
{
487-
if (!is_array($types)) {
488-
$types = array($types);
486+
if (is_array($types) === false) {
487+
$types = [$types];
489488
}
490489

491-
$criteria = array();
490+
$criteria = [];
491+
492492
foreach ($types as $type) {
493-
if ($this->config->isIsolatedDiffTag($type)) {
493+
if ($this->config->isIsolatedDiffTag($type) === true) {
494494
$criteria[] = $this->config->getIsolatedDiffTagPlaceholder($type);
495495
} else {
496496
$criteria[] = $type;
497497
}
498498
}
499499

500-
return in_array($text, $criteria, $strict);
500+
return in_array($text, $criteria, true);
501501
}
502502

503503
/**

0 commit comments

Comments
 (0)