final public function recycle($record = null): Record
    {
        if (!$this->destroyKeys) {
            throw new SimplesValidationError(
                ['destroyKeys' => 'requires'],
                "Recycle needs the `destroyKeys`"
            );
        }

        $record = Record::parse($record);
        foreach ($this->destroyKeys as $deletedKey) {
            $record->set($deletedKey, __NULL__);
        }

        return $this->update($record, 'recycle', true);
    }
final public function recycle($record = null): Record
    {
        if (!$this->destroyKeys) {
            throw new SimplesValidationError(
                ['destroyKeys' => 'requires'],
                "Recycle needs the `destroyKeys`"
            );
        }

        $record = Record::parse($record);
        foreach ($this->destroyKeys as $deletedKey) {
            $record->set($deletedKey, __NULL__);
        }

        return $this->update($record, 'recycle', true);
    }
final public function recycle ( $ record = null ) : Record { if ( ! $ this -> destroyKeys ) { throw new SimplesValidationError ( [ 'destroyKeys' => 'requires' ] , "Recycle needs the `destroyKeys`" ) ; } $ record = Record :: parse ( $ record ) ; foreach ( $ this -> destroyKeys as $ deletedKey ) { $ record -> set ( $ deletedKey , __NULL__ ) ; } return $ this -> update ( $ record , 'recycle' , true ) ; }
Recycle a destroyed record
@param array|Record $record (null)
@return Record
@throws SimplesActionError
@throws SimplesHookError
@throws SimplesResourceError
@throws SimplesRunTimeError
@throws SimplesValidationError
Recycle a destroyed record