Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

peter279k
Copy link
Member

@peter279k peter279k commented Oct 9, 2018

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.

@peter279k peter279k added the enhancement New feature or request label Oct 9, 2018

$apiKey = 'your-coin-api-key';
$apiKey = '4E861687-19D6-4894-87B9-E785B1EE3900';
Copy link
Member Author

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) {
Copy link
Member Author

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;
Copy link
Member Author

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 :).

Copy link
Member Author

@peter279k peter279k left a 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 😄 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants