Skip to content

Commit

Permalink
Cleanup constructor.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Leppanen committed Nov 14, 2018
1 parent ecee5c6 commit a11bf3f
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/MemoryAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,13 @@ class MemoryAdapter implements AdapterInterface
*
* @var array
*/
protected $storage;
protected $storage = ['' => ['type' => 'dir']];

public function __construct(Config $config = null)
{
$this->storage = [
'' => [
'type' => 'dir',
'timestamp' => $config ? $config->get('timestamp', time()) : time(),
],
];
$config = $config ?: new Config();

$this->storage['']['timestamp'] = $config->get('timestamp', time());
}

/**
Expand Down

0 comments on commit a11bf3f

Please sign in to comment.