Skip to content

Commit

Permalink
Fix for PHP 7 issue (JWHennessey#30)
Browse files Browse the repository at this point in the history
The issue is that the rounding to 3 dp ignores the 4 placed many decimal
points down.

This puts the 4 within the 3dp, and allows neutral to be chosen again
  • Loading branch information
exussum12 committed Dec 26, 2017
1 parent eecb481 commit f73826e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/PHPInsight/Sentiment.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ class Sentiment {
* @var array
*/
private $prior = array(
'pos' => 0.333333333333,
'neg' => 0.333333333333,
'neu' => 0.333333333334
'pos' => 0.333,
'neg' => 0.333,
'neu' => 0.334,
);

/**
Expand Down

0 comments on commit f73826e

Please sign in to comment.