-
Notifications
You must be signed in to change notification settings - Fork 0
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
Crypto monitor josantonius #9
base: master
Are you sure you want to change the base?
Conversation
|
||
$apiKey = 'your-coin-api-key'; | ||
$apiKey = '4E861687-19D6-4894-87B9-E785B1EE3900'; |
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.
Is this API key free-trial? If it's, I think it's fine to expose this key here.
|
||
$params = self::$providers[$config->provider][$config->type]; | ||
|
||
switch ($config->type) { |
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.
How about enhancing this type
condition?
I think using the switch...case
is not the proper way to do.
If we have the many types to do the different action, the swittch
condition will be very long.
@@ -12,14 +13,11 @@ | |||
|
|||
class GetAllRate implements ProviderResource | |||
{ | |||
private $apiKey; | |||
public $config; |
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.
Let $config
be public and it means we can modify this at any time from this class instance.
How about using the private/protected $config
?
And we can also add the setConfig
and getConfig
to allow us to modify this private/protected $config
:).
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.
Most of changes aree good for me, but the Travis CI build is broken.
This build work need to be fixed and I also have some request chnages.
Please review them at your available time 😄 .
This is the new branch that @josantonius creates.
I just create this PR for helping us to do the code review :).
@josantonius, can you fix the Travis CI build and
README.md
conflicts? Thanks.