PHP < 5.6 compatibility and StyleCI recommendations

This commit is contained in:
El RIDO 2017-10-08 11:31:41 +02:00
parent 4f06feef81
commit 9f26894b2e
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
6 changed files with 24 additions and 25 deletions

View file

@ -51,4 +51,17 @@ class DataStore extends AbstractPersistence
return false;
}
}
/**
* get the data
*
* @access public
* @static
* @param string $filename
* @return array $data
*/
public static function get($filename)
{
return json_decode(substr(file_get_contents($filename), strlen(self::PROTECTION_LINE . PHP_EOL)));
}
}