aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/league/html-to-markdown/src/Converter/DivConverter.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/league/html-to-markdown/src/Converter/DivConverter.php')
-rw-r--r--vendor/league/html-to-markdown/src/Converter/DivConverter.php24
1 files changed, 8 insertions, 16 deletions
diff --git a/vendor/league/html-to-markdown/src/Converter/DivConverter.php b/vendor/league/html-to-markdown/src/Converter/DivConverter.php
index 656a0ba4d..6453a2a27 100644
--- a/vendor/league/html-to-markdown/src/Converter/DivConverter.php
+++ b/vendor/league/html-to-markdown/src/Converter/DivConverter.php
@@ -1,5 +1,7 @@
<?php
+declare(strict_types=1);
+
namespace League\HTMLToMarkdown\Converter;
use League\HTMLToMarkdown\Configuration;
@@ -8,38 +10,28 @@ use League\HTMLToMarkdown\ElementInterface;
class DivConverter implements ConverterInterface, ConfigurationAwareInterface
{
- /**
- * @var Configuration
- */
+ /** @var Configuration */
protected $config;
- /**
- * @param Configuration $config
- */
- public function setConfig(Configuration $config)
+ public function setConfig(Configuration $config): void
{
$this->config = $config;
}
- /**
- * @param ElementInterface $element
- *
- * @return string
- */
- public function convert(ElementInterface $element)
+ public function convert(ElementInterface $element): string
{
if ($this->config->getOption('strip_tags', false)) {
return $element->getValue() . "\n\n";
}
- return html_entity_decode($element->getChildrenAsString());
+ return \html_entity_decode($element->getChildrenAsString());
}
/**
* @return string[]
*/
- public function getSupportedTags()
+ public function getSupportedTags(): array
{
- return array('div');
+ return ['div'];
}
}