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.
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
v3.6.0 #61
v3.6.0 #61
Changes from 4 commits
dc14a3f
f92c86e
ebf99a6
965bfe5
5e8c748
bd034fa
70f1da7
2b389b6
dd58b0b
1247707
7d78e54
b2337a7
0a851c7
082c1c9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 12 in Nhl.Api.Common/Http/NhlApiWebHttpClient.cs
Check warning on line 11 in Nhl.Api.Common/Http/NhlCmsHttpClient.cs
Check warning on line 11 in Nhl.Api.Common/Http/NhlEApiHttpClient.cs
Check warning on line 13 in Nhl.Api.Common/Http/NhlScoresHtmlReportsApiHttpClient.cs
Check warning on line 11 in Nhl.Api.Common/Http/NhlShiftChartHttpClient.cs
Check warning on line 11 in Nhl.Api.Common/Http/NhlStaticAssetsApiHttpClient.cs
Check warning on line 11 in Nhl.Api.Common/Http/NhlSuggestionApiHttpClient.cs
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.
🛠️ Refactor suggestion
Inject the HTTP client via dependency injection.
The
_nhlScoresHtmlReportsApiHttpClient
is instantiated directly within theNhlGameService
class. This tight coupling makes unit testing more difficult and violates the Dependency Inversion Principle.Consider injecting the
NhlScoresHtmlReportsApiHttpClient
through the constructor or using an interface to allow for better testability and adherence to SOLID principles.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.
🛠️ Refactor suggestion
Improve documentation and extract magic numbers in CalculateMultiplier.
The method's documentation is incomplete, and the formula uses magic numbers without explanation.
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.
🛠️ Refactor suggestion
Improve time parsing robustness
The current implementation assumes all times are PM, which may not always be correct. To improve robustness, consider the following approaches:
Example implementation:
This approach would provide more accurate time representations for games spanning different times of day.
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.
🛠️ Refactor suggestion
Consider adding error handling and validation
While the overall structure of the method is sound and the changes improve type safety, consider adding the following enhancements:
Example:
These additions would make the method more robust and easier to debug in case of unexpected data or parsing issues.