Skip to content

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
$provider = 'coinapi';

$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.

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.

3 participants