Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public function getBucketIdsByState(int $state): array
protected function saveObserver(Bucket $bucket): void
{
// If the instance has a known container we use it, otherwise we create a new container.
if ($this->bucketHashToObserverContainerId->contains($bucket)) {
if ($this->bucketHashToObserverContainerId->offsetExists($bucket)) {
$bucketContainer = new BucketContainer($this->bucketHashToObserverContainerId[$bucket], $this->connector);
} else {
$bucketContainer = new BucketContainer(0, $this->connector);
Expand Down Expand Up @@ -243,7 +243,7 @@ protected function saveObserver(Bucket $bucket): void
protected function saveTask(Task $task, int $bucketId): void
{
// If the instance has a known container we use it, otherwise we create a new container.
if ($this->taskHashToTaskContainerId->contains($task)) {
if ($this->taskHashToTaskContainerId->offsetExists($task)) {
$taskContainer = new TaskContainer($this->taskHashToTaskContainerId[$task]);
} else {
$taskContainer = new TaskContainer(0);
Expand Down Expand Up @@ -306,7 +306,7 @@ protected function saveValueToTask(Task $task, TaskContainer $taskContainer, int
protected function saveValue(Value $value, int $bucketId, int $position): void
{
// If we have previous values to task associations we delete them.
if ($this->valueHashToValueContainerId->contains($value)) {
if ($this->valueHashToValueContainerId->offsetExists($value)) {
$valueContainer = new ValueContainer($this->valueHashToValueContainerId[$value], $this->connector);
} else {
$valueContainer = new ValueContainer(0, $this->connector);
Expand Down Expand Up @@ -339,7 +339,7 @@ protected function saveValue(Value $value, int $bucketId, int $position): void
*/
public function getBucketContainerId(Bucket $bucket): int
{
if (!$this->bucketHashToObserverContainerId->contains($bucket)) {
if (!$this->bucketHashToObserverContainerId->offsetExists($bucket)) {
throw new SerializationException("Could not resolve container id of task: "
. print_r($bucket, true));
}
Expand All @@ -353,7 +353,7 @@ public function getBucketContainerId(Bucket $bucket): int
*/
protected function getTaskContainerId(Task $task): int
{
if (!$this->taskHashToTaskContainerId->contains($task)) {
if (!$this->taskHashToTaskContainerId->offsetExists($task)) {
throw new SerializationException("Could not resolve container id of task: "
. print_r($task, true));
}
Expand All @@ -366,7 +366,7 @@ protected function getTaskContainerId(Task $task): int
*/
protected function getValueContainerId(Value $value): int
{
if (!$this->valueHashToValueContainerId->contains($value)) {
if (!$this->valueHashToValueContainerId->offsetExists($value)) {
throw new SerializationException("Could not resolve container id of value: "
. print_r($value, true));
}
Expand Down
Loading