protected static function generateIfRequired() { if (!isset(static::$values) || !isset(static::$records)) { static::$values = json_decode(file_get_contents(static::$dataLocations['values']), true)[0]; static::$records = json_decode(file_get_contents(static::$dataLocations['records']), true); } }
protected static function generateIfRequired() { $fs = new Filesystem(); if (!isset(static::$values) || !isset(static::$records)) { static::$values = json_decode($fs->get(Path::join(__DIR__, 'data/values.json')), true)[0]; static::$records = json_decode($fs->get(Path::join(__DIR__, 'data/records.json')), true); } }