Update Composer packages
This commit is contained in:
parent
67c3d8b307
commit
83cb211fe6
219 changed files with 6487 additions and 4444 deletions
|
@ -16,7 +16,7 @@ use TypeError;
|
|||
* @copyright Bastian Allgeier
|
||||
* @license https://opensource.org/licenses/MIT
|
||||
*
|
||||
* // TODO: include in test coverage in 3.9
|
||||
* // TODO: include in test coverage 3.10
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Collection extends BaseCollection
|
||||
|
@ -45,21 +45,22 @@ class Collection extends BaseCollection
|
|||
|
||||
/**
|
||||
* Validate the type of every item that is being
|
||||
* added to the collection. They cneed to have
|
||||
* added to the collection. They need to have
|
||||
* the class defined by static::TYPE.
|
||||
*/
|
||||
public function __set(string $key, $value): void
|
||||
{
|
||||
if (
|
||||
is_a($value, static::TYPE) === false
|
||||
) {
|
||||
if (is_a($value, static::TYPE) === false) {
|
||||
throw new TypeError('Each value in the collection must be an instance of ' . static::TYPE);
|
||||
}
|
||||
|
||||
parent::__set($key, $value);
|
||||
}
|
||||
|
||||
public static function factory(array $items)
|
||||
/**
|
||||
* Creates a collection from a nested array structure
|
||||
*/
|
||||
public static function factory(array $items): static
|
||||
{
|
||||
$collection = new static();
|
||||
$className = static::TYPE;
|
||||
|
@ -77,7 +78,11 @@ class Collection extends BaseCollection
|
|||
return $collection;
|
||||
}
|
||||
|
||||
public function render(ModelWithContent $model)
|
||||
/**
|
||||
* Renders each item with a model and returns
|
||||
* an array of all rendered results
|
||||
*/
|
||||
public function render(ModelWithContent $model): array
|
||||
{
|
||||
$props = [];
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ use Kirby\Filesystem\F;
|
|||
* @copyright Bastian Allgeier
|
||||
* @license https://opensource.org/licenses/MIT
|
||||
*
|
||||
* // TODO: include in test coverage in 3.9
|
||||
* // TODO: include in test coverage in 3.10
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Config
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace Kirby\Blueprint;
|
|||
* @copyright Bastian Allgeier
|
||||
* @license https://opensource.org/licenses/MIT
|
||||
*
|
||||
* // TODO: include in test coverage in 3.9
|
||||
* // TODO: include in test coverage in 3.10
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Extension
|
||||
|
|
|
@ -16,7 +16,7 @@ use ReflectionUnionType;
|
|||
* @copyright Bastian Allgeier
|
||||
* @license https://opensource.org/licenses/MIT
|
||||
*
|
||||
* // TODO: include in test coverage in 3.9
|
||||
* // TODO: include in test coverage in 3.10
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Factory
|
||||
|
@ -95,7 +95,7 @@ class Factory
|
|||
}
|
||||
|
||||
// union types
|
||||
if (is_a($propType, ReflectionUnionType::class) === true) {
|
||||
if ($propType instanceof ReflectionUnionType) {
|
||||
return static::forUnionType($propType, $value);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ use Kirby\Cms\ModelWithContent;
|
|||
* @copyright Bastian Allgeier
|
||||
* @license https://opensource.org/licenses/MIT
|
||||
*
|
||||
* // TODO: include in test coverage in 3.9
|
||||
* // TODO: include in test coverage in 3.10
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Node
|
||||
|
@ -53,7 +53,6 @@ class Node
|
|||
return Factory::make(static::class, $props);
|
||||
}
|
||||
|
||||
|
||||
public static function load(string|array $props): static
|
||||
{
|
||||
// load by path
|
||||
|
|
|
@ -14,7 +14,7 @@ use Kirby\Toolkit\I18n;
|
|||
* @copyright Bastian Allgeier
|
||||
* @license https://opensource.org/licenses/MIT
|
||||
*
|
||||
* // TODO: include in test coverage in 3.9
|
||||
* // TODO: include in test coverage in 3.10
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class NodeI18n extends NodeProperty
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace Kirby\Blueprint;
|
|||
* @copyright Bastian Allgeier
|
||||
* @license https://opensource.org/licenses/MIT
|
||||
*
|
||||
* // TODO: include in test coverage in 3.9
|
||||
* // TODO: include in test coverage in 3.10
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class NodeIcon extends NodeString
|
||||
|
|
|
@ -13,7 +13,7 @@ use Kirby\Cms\ModelWithContent;
|
|||
* @copyright Bastian Allgeier
|
||||
* @license https://opensource.org/licenses/MIT
|
||||
*
|
||||
* // TODO: include in test coverage in 3.9
|
||||
* // TODO: include in test coverage in 3.10
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
abstract class NodeProperty
|
||||
|
|
|
@ -13,7 +13,7 @@ use Kirby\Cms\ModelWithContent;
|
|||
* @copyright Bastian Allgeier
|
||||
* @license https://opensource.org/licenses/MIT
|
||||
*
|
||||
* // TODO: include in test coverage in 3.9
|
||||
* // TODO: include in test coverage in 3.10
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class NodeString extends NodeProperty
|
||||
|
|
|
@ -14,7 +14,7 @@ use Kirby\Cms\ModelWithContent;
|
|||
* @copyright Bastian Allgeier
|
||||
* @license https://opensource.org/licenses/MIT
|
||||
*
|
||||
* // TODO: include in test coverage in 3.9
|
||||
* // TODO: include in test coverage in 3.10
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class NodeText extends NodeI18n
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue