From 2a4fd545681f694daae5b6810d5dae552ce9381c Mon Sep 17 00:00:00 2001 From: peter279k Date: Fri, 27 Mar 2020 02:45:52 +0800 Subject: [PATCH] Resolves issue #6 --- composer.json | 2 +- src/Word.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index fcfb5af..93e667a 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "type": "library", "require": { "php": "^7.0", - "rapidwebltd/rw-file-cache": "^1.2", + "divineomega/do-file-cache": "^2.0", "divineomega/is_offensive": "^1.0", "davechild/textstatistics": "^1.0", "doctrine/inflector": "^1.2" diff --git a/src/Word.php b/src/Word.php index e5539ca..e518911 100644 --- a/src/Word.php +++ b/src/Word.php @@ -3,14 +3,14 @@ namespace DivineOmega\WordInfo; use DaveChild\TextStatistics\Syllables; -use rapidweb\RWFileCache\RWFileCache; +use DivineOmega\DOFileCache\DOFileCache; class Word { /** @var string|null */ private $word; - /** @var RWFileCache|null */ + /** @var DOFileCache|null */ private $cache; /** @@ -43,7 +43,7 @@ public function __toString() */ private function setupCache() { - $this->cache = new RWFileCache(); + $this->cache = new DOFileCache(); $this->cache->changeConfig(['cacheDirectory' => '/tmp/php-word-info-cache/']); } @@ -164,7 +164,7 @@ public function portmanteaus() foreach ($responseItems as $responseItem) { $responseItemPortmanteaus = array_map(function ($portmanteauString) { - return new Word($portmanteauString); + return new self($portmanteauString); }, explode(',', $responseItem->combined)); $portmanteaus = array_merge($portmanteaus, $responseItemPortmanteaus);