Skip to content

Commit

Permalink
Resolves issue DivineOmega#6
Browse files Browse the repository at this point in the history
  • Loading branch information
peter279k committed Mar 26, 2020
1 parent 570c19e commit 2a4fd54
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions src/Word.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -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/']);
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 2a4fd54

Please sign in to comment.