diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e59b587..60223e19 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ * Content: Markdown(Parsedown) parser removed! From now we are using plain HTML + Shortcodes * Theme Simple: Cross-site scripting Vulnerabilities fixes * Improving main .htaccess - +* Code cleanup and refactoring #5 # Flextype 0.5.0, 2018-06-03 * Delete folders: site/data and site/accounts diff --git a/flextype/Content.php b/flextype/Content.php index fa8772c4..b3596718 100755 --- a/flextype/Content.php +++ b/flextype/Content.php @@ -20,7 +20,7 @@ use Thunder\Shortcode\Shortcode\ShortcodeInterface; class Content { /** - * An instance of the Cache class + * An instance of the Content class * * @var object * @access protected @@ -110,8 +110,8 @@ class Content * Content::updateCurrentPage('title', 'New page title'); * * @access public - * @param string $path Array path - * @param mixed $value Value to set + * @param string $path Array path + * @param mixed $value Value to set * @return void */ public static function updateCurrentPage(string $path, $value) : void @@ -190,11 +190,11 @@ class Content * $pages = Content::getPages('projects'); * * @access public - * @param string $url Page url - * @param bool $raw Raw or not raw content - * @param string $order_by Order type - * @param int $offset Offset - * @param int $length Length + * @param string $url Page url + * @param bool $raw Raw or not raw content + * @param string $order_by Order type + * @param int $offset Offset + * @param int $length Length * @return array */ public static function getPages(string $url = '', bool $raw = false, string $order_by = 'date', string $order_type = 'DESC', int $offset = null, int $length = null) : array @@ -376,8 +376,7 @@ class Content */ public static function processContent(string $content) : string { - $content = Content::processShortcodes($content); - return $content; + return Content::processShortcodes($content); } /** diff --git a/flextype/Flextype.php b/flextype/Flextype.php index 9b212d2e..9249d9e3 100755 --- a/flextype/Flextype.php +++ b/flextype/Flextype.php @@ -17,6 +17,13 @@ use Symfony\Component\Yaml\Yaml; class Flextype { + /** + * The version of Flextype + * + * @var string + */ + const VERSION = '0.5.0'; + /** * An instance of the Flextype class * @@ -35,13 +42,6 @@ class Flextype // Nothing here. } - /** - * The version of Flextype - * - * @var string - */ - const VERSION = '0.5.0'; - /** * Constructor. *