PHP API change the values of the url metrics constants to ints #11

Closed
jmadden opened this Issue Mar 12, 2013 · 1 comment

Comments

Projects
None yet
2 participants

jmadden commented Mar 12, 2013

Just a thought, but you may want to consider changing the constants defined in php/complete/constants/url_metrics_constants.php to integers instead of strings. Should make something like the following easier to use:

$cols = URLMETRICS_COL_EXTERNAL_LINKS + URLMETRICS_COL_LINKS + URLMETRICS_COL_MOZRANK;
Contributor

kennethlmartin commented Mar 18, 2013

Updated.

You could have also done the below but you are correct and they should totally be integers.

$urlMetrics = array(
    URLMETRICS_COL_TITLE,
    URLMETRICS_COL_URL,
    URLMETRICS_COL_PAGE_AUTHORITY
);
$cols = array_sum($urlMetrics);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment