-
Notifications
You must be signed in to change notification settings - Fork 27
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: changed types and annotations 3 #247
base: v3.x
Are you sure you want to change the base?
Conversation
*/ | ||
protected function referencesMany(string $entity, string $field, bool $cacheable = true): CursorInterface | ||
protected function referencesMany(string $entity, string $field, bool $cacheable = true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return type is missing here
*/ | ||
protected function embedsMany(string $entity, string $field): CursorInterface | ||
protected function embedsMany(string $entity, string $field) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return type is missing here, too.
*/ | ||
private function getDocumentFromCache(ModelInterface $entityInstance, string $referencedId): mixed | ||
private function getDocumentFromCache(ModelInterface $entityInstance, string $referencedId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return type is missing here, too.
@@ -267,7 +209,7 @@ public function getCollectionName(): string | |||
throw new NoCollectionNameException(); | |||
} | |||
|
|||
return $this->getSchema()->collection; | |||
return $this->collection ?: $this->getSchema()->collection; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return $this->collection ?: $this->getSchema()->collection; | |
return $this->getSchema()->collection; |
I think it's better to keep the actual implementation because getSchema
function can return a schema from fields too.
Este PR é o terceiro de um serie de PRs que tem por objetivo adicionar padroes de codigo ao mongolid.
As adições realizadas aqui estão sendo desmebradas do PR:
https://github.com/leroy-merlin-br/mongolid/pull/209/files#diff-44c6c764ba381928e3221e4690c18dc0fe596311af5b123d5d2089ffc4db52af
E são testadas no projeto : https://github.com/JoaoFerrazfs/Mongo-PHP-Docker_BaseProject