Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

feature: Add method `$microplateSet->positionFromLocation($location, … #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

simbig
Copy link
Collaborator

@simbig simbig commented Sep 22, 2023

…$direction)`

  • Added automated tests
  • Documented for all relevant versions
  • Updated the changelog

Changes

  • Add method $microplateSet->positionFromLocation($location, $direction)


- Add method `$microplateSet->positionFromLocation($location, $direction)`

- ## v6.3.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- ## v6.3.0
## v6.3.0


### Added

- Add method `$microplateSet->positionFromLocation($location, $direction)`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Add method `$microplateSet->positionFromLocation($location, $direction)`
- Add method `MicroplateSet::positionFromLocation`

Comment on lines +54 to +56
/**
* @param Location<TCoordinateSystem> $location
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/**
* @param Location<TCoordinateSystem> $location
*/
/** @param Location<TCoordinateSystem> $location */

@@ -20,7 +20,7 @@ public function __construct(CoordinateSystem $coordinateSystem)
$this->coordinateSystem = $coordinateSystem;
}

/** @return list<string> */
/** @return array<int,string> */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list is a stronger guarantee, why weaken it?

Comment on lines +62 to +63
$positionOnSet = $positionOnPlate * array_keys($this->plateIDs())[$location->plateID];
assert(is_int($positionOnSet));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes no sense to me, array_keys($this->plateIDs()) will be something like [0, 1, ..] - then you index into this with another plateID? Maybe you need array_search?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants