Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Rename variables and properties. #145

Merged
merged 2 commits into from
Jul 16, 2021

Conversation

drupol
Copy link
Collaborator

@drupol drupol commented Jul 14, 2021

This PR:

  • Update variable names
  • Change the constructor type in TypedIterator
  • Break backward compatibility

@@ -29,7 +29,7 @@ public function it_allows_array_of_any_type(): void
{
$data = [self::MAP_DATA, self::LIST_DATA];

$this->beConstructedWith($data);
$this->beConstructedWith(new ArrayIterator($data));
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we not want to allow this to be constructed from array?

Copy link
Collaborator Author

@drupol drupol Jul 15, 2021

Choose a reason for hiding this comment

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

  1. We avoid mixing types.
  2. I rather use the composition (decorator pattern) like every other iterators.

(cherry picked from commit 5c831ece40ea320308de5f04fd85a5634cc64f22)
@drupol drupol force-pushed the refactor/update-variables-names-and-types branch from e527b60 to a7cfc8c Compare July 15, 2021 16:30
@drupol drupol marked this pull request as ready for review July 16, 2021 09:21
@drupol drupol self-assigned this Jul 16, 2021
@drupol drupol merged commit e044a88 into master Jul 16, 2021
@drupol drupol deleted the refactor/update-variables-names-and-types branch July 16, 2021 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants