-
Notifications
You must be signed in to change notification settings - Fork 5
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
[PHP Academy] - Challenge 1 by Fernando Alvarez #2
base: develop
Are you sure you want to change the base?
[PHP Academy] - Challenge 1 by Fernando Alvarez #2
Conversation
$this->info('Getting Info to start to import'); | ||
$paginationMetadata = $this->eventDataProvider->getPaginationMetadataByLocation($location); | ||
|
||
for ($page = 1; $page <= $paginationMetadata->page_count; $page++) { |
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.
it's fine, we could improve this using a do while
or even return an iterator from the data provider to handle the iteration over the pagination.
$lastPage = ceil($total/$size); | ||
$items = $pageCursor->toArray(); | ||
|
||
return response()->json([ |
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.
@@ -3,6 +3,7 @@ | |||
namespace App\Jobs; | |||
|
|||
use MongoDB\Client as MongoClient; | |||
use App\Importer\Contracts\VenueDataProvider as IVenueDataProvider; |
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.
C# interface naming convention :baia-baia:
Implementation of the First Challenge