aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/league/html-to-markdown/src/Environment.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-06-05 08:47:24 +0000
committerMario <mario@mariovavti.com>2021-06-05 08:47:24 +0000
commitfd8a5ff4c49fc1361f9928ea4d33e6d24d43a3a5 (patch)
tree7560147f31a273fb8f0e05476f99f1deea0e12de /vendor/league/html-to-markdown/src/Environment.php
parent4db384da34595adef68be6226e8b331b4d7b7f31 (diff)
downloadvolse-hubzilla-fd8a5ff4c49fc1361f9928ea4d33e6d24d43a3a5.tar.gz
volse-hubzilla-fd8a5ff4c49fc1361f9928ea4d33e6d24d43a3a5.tar.bz2
volse-hubzilla-fd8a5ff4c49fc1361f9928ea4d33e6d24d43a3a5.zip
composer update league/html-to-markdown
Diffstat (limited to 'vendor/league/html-to-markdown/src/Environment.php')
-rw-r--r--vendor/league/html-to-markdown/src/Environment.php38
1 files changed, 13 insertions, 25 deletions
diff --git a/vendor/league/html-to-markdown/src/Environment.php b/vendor/league/html-to-markdown/src/Environment.php
index 560cfe613..7ea19d410 100644
--- a/vendor/league/html-to-markdown/src/Environment.php
+++ b/vendor/league/html-to-markdown/src/Environment.php
@@ -1,5 +1,7 @@
<?php
+declare(strict_types=1);
+
namespace League\HTMLToMarkdown;
use League\HTMLToMarkdown\Converter\BlockquoteConverter;
@@ -22,34 +24,27 @@ use League\HTMLToMarkdown\Converter\TextConverter;
final class Environment
{
- /**
- * @var Configuration
- */
+ /** @var Configuration */
protected $config;
+ /** @var ConverterInterface[] */
+ protected $converters = [];
+
/**
- * @var ConverterInterface[]
+ * @param array<string, mixed> $config
*/
- protected $converters = array();
-
- public function __construct(array $config = array())
+ public function __construct(array $config = [])
{
$this->config = new Configuration($config);
$this->addConverter(new DefaultConverter());
}
- /**
- * @return Configuration
- */
- public function getConfig()
+ public function getConfig(): Configuration
{
return $this->config;
}
- /**
- * @param ConverterInterface $converter
- */
- public function addConverter(ConverterInterface $converter)
+ public function addConverter(ConverterInterface $converter): void
{
if ($converter instanceof ConfigurationAwareInterface) {
$converter->setConfig($this->config);
@@ -60,12 +55,7 @@ final class Environment
}
}
- /**
- * @param string $tag
- *
- * @return ConverterInterface
- */
- public function getConverterByTag($tag)
+ public function getConverterByTag(string $tag): ConverterInterface
{
if (isset($this->converters[$tag])) {
return $this->converters[$tag];
@@ -75,11 +65,9 @@ final class Environment
}
/**
- * @param array $config
- *
- * @return Environment
+ * @param array<string, mixed> $config
*/
- public static function createDefaultEnvironment(array $config = array())
+ public static function createDefaultEnvironment(array $config = []): Environment
{
$environment = new static($config);