Conversation
1on
requested changes
Jul 20, 2020
Service/ModuleManager.php
Outdated
Comment on lines
135
to
139
| public function checkAccess(): bool | ||
| { | ||
| throw new \LogicException('Method should be implemented'); | ||
| } | ||
|
|
Owner
There was a problem hiding this comment.
Его можно сделать абстрактным. Таким образом я кидал исключения для методов которые можно реализовать или не реализовать (например save, его в некоторых модулях нет), а этот метод вполне можно сделаьт обязательным
Contributor
Author
There was a problem hiding this comment.
Сделал обязательным для реализации
Comment on lines
16
to
30
| private const REQUIRED_METHODS = [ | ||
| '/api/integration-modules/{code}', | ||
| '/api/integration-modules/{code}/edit', | ||
| '/api/delivery/generic/setting/{code}', | ||
| '/api/delivery/generic/setting/{code}/edit', | ||
| '/api/delivery/generic/{code}/tracking', | ||
| '/api/delivery/shipments', | ||
| '/api/delivery/shipments/{id}', | ||
| '/api/delivery/shipments/create', | ||
| '/api/delivery/shipments/{id}/edit', | ||
| '/api/reference/sites', | ||
| '/api/reference/stores', | ||
| '/api/reference/payment-types', | ||
| '/api/reference/statuses', | ||
| ]; |
Owner
There was a problem hiding this comment.
С этим проблема - не всем модулям нужны все эти методы, некоторые модули работают только на трекинг например, в некоторых не реализована передача сеттингов и не нужен доступ к спаровчникам и т.д.
Contributor
Author
There was a problem hiding this comment.
Перенес список обязательных методов в аннотацию RetailCrmAccess
11e84eb to
9d43331
Compare
Update gitignore file
* Update composer.json * Added LICENSE file
Refactoring dependencies
9d43331 to
b9bbce7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.