From b4a4b60871235ad721725917846ea734a0ff6ff3 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Wed, 13 Mar 2019 16:00:00 +0200 Subject: [PATCH] Fixed phpdoc generation --- CHANGELOG.md | 6 ++++++ .../src/Grav/Framework/Cache/Adapter/FileCache.php | 12 ++++++------ system/src/Grav/Framework/Session/Session.php | 3 --- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 088dd4195..869da7829 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v1.5.9 +## mm/dd/2019 + +1. [](#improved) + * Fixed phpdoc generation + # v1.5.8 ## 02/07/2019 diff --git a/system/src/Grav/Framework/Cache/Adapter/FileCache.php b/system/src/Grav/Framework/Cache/Adapter/FileCache.php index 389b626e1..801ec2ae1 100644 --- a/system/src/Grav/Framework/Cache/Adapter/FileCache.php +++ b/system/src/Grav/Framework/Cache/Adapter/FileCache.php @@ -27,9 +27,11 @@ class FileCache extends AbstractCache /** * @inheritdoc */ - public function __construct($namespace = '', $defaultLifetime = null) + public function __construct($namespace = '', $defaultLifetime = null, $folder = null) { parent::__construct($namespace, $defaultLifetime ?: 31557600); // = 1 year + + $this->initFileCache($namespace, $folder ?? ''); } /** @@ -136,9 +138,9 @@ class FileCache extends AbstractCache /** * @param string $namespace * @param string $directory - * @throws \Psr\SimpleCache\InvalidArgumentException + * @throws \Psr\SimpleCache\InvalidArgumentException|InvalidArgumentException */ - private function init($namespace, $directory) + protected function initFileCache($namespace, $directory) { if (!isset($directory[0])) { $directory = sys_get_temp_dir() . '/grav-cache'; @@ -153,9 +155,7 @@ class FileCache extends AbstractCache $directory .= DIRECTORY_SEPARATOR . $namespace; } - if (!file_exists($directory)) { - @mkdir($directory, 0777, true); - } + $this->mkdir($directory); $directory .= DIRECTORY_SEPARATOR; // On Windows the whole path is limited to 258 chars diff --git a/system/src/Grav/Framework/Session/Session.php b/system/src/Grav/Framework/Session/Session.php index f6133d336..429809309 100644 --- a/system/src/Grav/Framework/Session/Session.php +++ b/system/src/Grav/Framework/Session/Session.php @@ -38,9 +38,6 @@ class Session implements SessionInterface return self::$instance; } - /** - * @inheritdoc - */ public function __construct(array $options = []) { // Session is a singleton.