Pull in edits to allow getData to take an array #2

Merged
merged 6 commits into from Nov 19, 2014

Projects

None yet

2 participants

@d3vit
Contributor
d3vit commented Nov 17, 2014

Updated everything per your requests. Not sure if I need to submit another pull request?

@bmarshall511 bmarshall511 commented on an outdated diff Nov 18, 2014
@@ -0,0 +1,10 @@
+php-stock-market-api
+====================
+Modification of the original script here: http://www.benmarshall.me/php-stock-market-api/
@bmarshall511
bmarshall511 Nov 18, 2014 Owner

@d3vit Can you update this file now that you're integrating your changes in the script vs. creating your own.

@bmarshall511 bmarshall511 commented on an outdated diff Nov 18, 2014
class.stockMarketAPI.php
* @license http://www.opensource.org/licenses/mit-license.html MIT License
- * @version 1.2
+ * @version 1.21
@bmarshall511
bmarshall511 Nov 18, 2014 Owner

@d3vit Can you update this to be 1.3 instead of 1.21?

@bmarshall511 bmarshall511 commented on an outdated diff Nov 18, 2014
class.stockMarketAPI.php
@@ -8,8 +8,9 @@
*
* @package StockMarketAPI
* @author Ben Marshall <me@benmarshall.me>
+ * @subauthor Ryan Allen <ryan@ndigit.co>
@bmarshall511
bmarshall511 Nov 18, 2014 Owner

@d3vit Please update this to @author instead of subauthor

@bmarshall511 bmarshall511 commented on an outdated diff Nov 18, 2014
class.stockMarketAPI.php
@@ -282,6 +301,9 @@ private function _convertStat($stat) {
case 'shortRatio':
return 's7';
break;
+ case 'name':
@bmarshall511
bmarshall511 Nov 18, 2014 Owner

@d3vit Sorry, know this is nit-picky but can you update this to match the other indentations of this file? Looks like it's got a couple of extra spaces.

@bmarshall511 bmarshall511 commented on an outdated diff Nov 18, 2014
class.stockMarketAPI.php
} else {
- $return = array($this->stat => $data[0]);
+ foreach ($data as $item)
@bmarshall511
bmarshall511 Nov 18, 2014 Owner

@d3vit Being nit-picky, but can you update this to match the other indentations of this file?

@bmarshall511 bmarshall511 commented on an outdated diff Nov 18, 2014
class.stockMarketAPI.php
- 'book_value' => strip_tags($data[6]),
- 'ebitda' => strip_tags($data[7]),
- 'dividend_per_share' => strip_tags($data[8]),
- 'dividend_yield' => strip_tags($data[9]),
- 'earnings_per_share' => strip_tags($data[10]),
- 'fiftytwo_week_high' => strip_tags($data[11]),
- 'fiftytwo_week_low' => strip_tags($data[12]),
- 'fiftyday_moving_avg' => strip_tags($data[13]),
- 'twohundredday_moving_avg' => strip_tags($data[14]),
- 'price_earnings_ratio' => strip_tags($data[15]),
- 'price_earnings_growth_ratio' => strip_tags($data[16]),
- 'price_sales_ratio' => strip_tags($data[17]),
- 'price_book_ratio' => strip_tags($data[18]),
- 'short_ratio' => strip_tags($data[19])
- );
+ if ($this->stat === 'all') {
@bmarshall511
bmarshall511 Nov 18, 2014 Owner

@d3vit Right now, this file uses 2 spaces for indentations. I'm all for to using 4, but want to stay consistent. Can you either update this to use 2 or update everything to use 4?

@bmarshall511 bmarshall511 added this to the 1.3.0 milestone Nov 18, 2014
@d3vit
Contributor
d3vit commented Nov 18, 2014

@bmarshall511 Updated everything per your requests. Not sure if I need to submit another pull request or if it auto-updates?

@bmarshall511
Owner

@d3vit Looks great, thanks!

@bmarshall511 bmarshall511 merged commit 46795f5 into bmarshall511:master Nov 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment