Skip to content

Commit

Permalink
open type of content to assign
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Bigelmayr committed Aug 6, 2024
1 parent 317fc80 commit 4f0c2c1
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/Tecan/Rack/BaseRack.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ public function toString(): string
]);
}

public function assignFirstEmptyPosition(string $name): int
/** @param string|int|object|null $content */
public function assignFirstEmptyPosition($content): int
{
return $this->assignPosition($name, $this->findFirstEmptyPosition());
return $this->assignPosition($content, $this->findFirstEmptyPosition());
}

public function assignLastEmptyPosition(string $name): int
/** @param string|int|object|null $content */
public function assignLastEmptyPosition($content): int
{
return $this->assignPosition($name, $this->findLastEmptyPosition());
return $this->assignPosition($content, $this->findLastEmptyPosition());
}

public function findFirstEmptyPosition(): int
Expand Down Expand Up @@ -69,13 +71,14 @@ public function findLastEmptyPosition(): int
return $lastEmpty;
}

public function assignPosition(string $name, int $position): int
/** @param string|int|object|null $content */
public function assignPosition($content, int $position): int
{
if (! $this->positions->has($position)) {
throw new InvalidPositionOnRack($position, $this);
}

$this->positions[$position] = $name;
$this->positions[$position] = $content;

return $position;
}
Expand Down

0 comments on commit 4f0c2c1

Please sign in to comment.