Skip to content

Commit

Permalink
adjusting implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
SignpostMarv committed Aug 18, 2019
1 parent b128a42 commit e0c965a
Showing 1 changed file with 2 additions and 26 deletions.
28 changes: 2 additions & 26 deletions Tests/Fixtures/DaftTypedObjectMemoryRepository.php
Expand Up @@ -86,31 +86,7 @@ public function UpdateTypedObject(

parent::UpdateTypedObject($object);

/**
* @var array<int, string>
*/
$properties = $object::TYPED_PROPERTIES;

/**
* @var array{id:int, name:string}
*/
$data = array_combine(
$properties,
array_map(
/**
* @return scalar|array|object|null
*/
function (string $property) use ($object) {
/**
* @var scalar|array|object|null
*/
return $object->$property;
},
$properties
)
);

$this->data[$hash] = $data;
$this->data[$hash] = $object->__toArray();
}

public function RemoveTypedObject(array $id) : void
Expand Down Expand Up @@ -153,7 +129,7 @@ public function MaybeRecallTypedObject(
/**
* @var T1
*/
$object = new $type($row);
$object = $type::__fromArray($row);

$this->UpdateTypedObject($object);

Expand Down

0 comments on commit e0c965a

Please sign in to comment.