Upgrade to 3.8.0

This commit is contained in:
Bastian Allgeier
2022-10-06 10:11:54 +02:00
parent a9ed4e45ca
commit 7d168aae58
332 changed files with 26337 additions and 21977 deletions

View File

@@ -21,26 +21,17 @@ abstract class Handler
/**
* Parses an encoded string and returns a multi-dimensional array
*
* Needs to throw an Exception if the file can't be parsed.
*
* @param mixed $string
* @return array
* @throws \Exception if the file can't be parsed
*/
abstract public static function decode($string): array;
/**
* Converts an array to an encoded string
*
* @param mixed $data
* @return string
*/
abstract public static function encode($data): string;
/**
* Reads data from a file
*
* @param string $file
* @return array
*/
public static function read(string $file): array
{
@@ -54,12 +45,8 @@ abstract class Handler
/**
* Writes data to a file
*
* @param string $file
* @param mixed $data
* @return bool
*/
public static function write(string $file = null, $data = []): bool
public static function write(string $file, $data = []): bool
{
return F::write($file, static::encode($data));
}