Add blueprints and fake content

This commit is contained in:
Paul Nicoué 2021-11-18 17:44:47 +01:00
parent 1ff19bf38f
commit 8235816462
592 changed files with 22385 additions and 31535 deletions

View file

@ -3,7 +3,7 @@
namespace Kirby\Data;
use Kirby\Exception\Exception;
use Kirby\Toolkit\F;
use Kirby\Filesystem\F;
/**
* The `Data` class provides readers and

View file

@ -3,7 +3,7 @@
namespace Kirby\Data;
use Kirby\Exception\Exception;
use Kirby\Toolkit\F;
use Kirby\Filesystem\F;
/**
* Base handler abstract,

View file

@ -34,7 +34,7 @@ class Json extends Handler
*/
public static function decode($string): array
{
if ($string === null) {
if ($string === null || $string === '') {
return [];
}

View file

@ -4,7 +4,7 @@ namespace Kirby\Data;
use Kirby\Exception\BadMethodCallException;
use Kirby\Exception\Exception;
use Kirby\Toolkit\F;
use Kirby\Filesystem\F;
/**
* Reader and write of PHP files with data in a returned array
@ -49,10 +49,10 @@ class PHP extends Handler
/**
* PHP strings shouldn't be decoded manually
*
* @param mixed $array
* @param mixed $string
* @return array
*/
public static function decode($array): array
public static function decode($string): array
{
throw new BadMethodCallException('The PHP::decode() method is not implemented');
}

View file

@ -93,7 +93,7 @@ class Txt extends Handler
*/
public static function decode($string): array
{
if ($string === null) {
if ($string === null || $string === '') {
return [];
}

View file

@ -35,7 +35,7 @@ class Xml extends Handler
*/
public static function decode($string): array
{
if ($string === null) {
if ($string === null || $string === '') {
return [];
}

View file

@ -50,7 +50,7 @@ class Yaml extends Handler
*/
public static function decode($string): array
{
if ($string === null) {
if ($string === null || $string === '') {
return [];
}