for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Base daft objects.
*
* @author SignpostMarv
*/
declare(strict_types=1);
namespace SignpostMarv\DaftObject;
abstract class DaftWriteableObjectMemoryTree extends DaftObjectMemoryTree implements DaftNestedWriteableObjectTree
{
use TraitRememberDaftObject;
use TraitWriteableTree;
protected function RememberDaftObjectData(DefinesOwnIdPropertiesInterface $object) : void
static::ThrowIfNotType($object, DaftNestedWriteableObject::class, 1, __METHOD__);
parent::RememberDaftObjectData($object);
}
* @param DaftObject|string $object
protected static function ThrowIfNotType(
$object,
string $type,
int $argument,
string $function
) : void {
if ( ! is_a($object, DaftNestedWriteableObject::class, is_string($object))) {
throw new DaftObjectRepositoryTypeByClassMethodAndTypeException(
$argument,
static::class,
$function,
DaftNestedWriteableObject::class,
is_string($object) ? $object : get_class($object)
);
parent::ThrowIfNotType($object, $type, $argument, $function);