1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-09 14:46:53 +02:00

refactor(markdown): update code according to coding doctrine coding standard

This commit is contained in:
Awilum
2020-09-08 21:26:07 +03:00
parent 2d33999fdd
commit 22055468ab

View File

@@ -9,7 +9,6 @@ declare(strict_types=1);
namespace Flextype\Support\Parsers;
use function md5;
use Flextype\Component\Strings\Strings;
class Markdown
@@ -47,7 +46,7 @@ class Markdown
*
* @return mixed The MARKDOWN converted to a PHP value
*/
public function parse(string $input, bool $cache = true) : string
public function parse(string $input, bool $cache = true): string
{
if ($cache === true && flextype('registry')->get('flextype.settings.cache.enabled') === true) {
$key = $this->getCacheID($input);
@@ -68,13 +67,13 @@ class Markdown
/**
* @see parse()
*/
protected function _parse(string $input) : string
protected function _parse(string $input): string
{
return $this->markdown->text($input);
}
public function getCacheID($input)
public function getCacheID($input): string
{
Strings::hash('markdown' . $input);
return Strings::hash('markdown' . $input);
}
}