Permalink
Browse files

make sort method non-static to make it easily overwritable

  • Loading branch information...
1 parent 7f9bbd0 commit 10b54aca4c05215a7d18c09259ffcd2c436f2184 @cweiske cweiske committed Jun 4, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Date/HumanDiff.php
View
@@ -148,7 +148,7 @@ public function clearFormats()
*/
public function sortFormats()
{
- usort($this->formats, __CLASS__ . '::sortFormatCompare');
+ usort($this->formats, array($this, 'sortFormatCompare'));
}
/**
@@ -159,7 +159,7 @@ public function sortFormats()
*
* @return integer <, = or > 0 - when $a is less, equal or greater than $b
*/
- public static function sortFormatCompare($a, $b)
+ public function sortFormatCompare($a, $b)
{
return $a[0] - $b[0];
}

0 comments on commit 10b54ac

Please sign in to comment.