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

Change method parameters declaration from Entity to EntityInterface. #7416

Merged
merged 3 commits into from
Sep 18, 2015

Conversation

skie
Copy link
Member

@skie skie commented Sep 18, 2015

No description provided.

@dereuromark
Copy link
Member

Sounds reasonable to code against the interface instead of the concrete class.

@dereuromark dereuromark added this to the 3.1.0 milestone Sep 18, 2015
* of this association
* @param array $targetEntities list of entities belonging to the `target` side
* of this association
* @return bool
* @throws \InvalidArgumentException
*/
protected function _checkPersistenceStatus($sourceEntity, array $targetEntities)
protected function _checkPersistenceStatus(EntityInterface $sourceEntity, array $targetEntities)
Copy link
Member

Choose a reason for hiding this comment

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

Please no annotation in the protected methods

@lorenzo
Copy link
Member

lorenzo commented Sep 18, 2015

Looks good to me except for the added hints to the protected methods

@lorenzo
Copy link
Member

lorenzo commented Sep 18, 2015

Thanks @skie!

lorenzo added a commit that referenced this pull request Sep 18, 2015
Change method parameters declaration from Entity to EntityInterface.
@lorenzo lorenzo merged commit 2bacf97 into cakephp:3.1 Sep 18, 2015
@ADmad
Copy link
Member

ADmad commented Sep 18, 2015

I believe the removal of use statement for Cake\ORM\Entity from the classes in which type hints were changed has been missed.

@markstory
Copy link
Member

👍

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

Successfully merging this pull request may close these issues.

5 participants