cakephp/cakephp — pull request #658 by dereuromark (2012-05-20 14:37:43+00:00)
Title: 2.2 signed numbers

fixing a test case
and adding `signed` for CakeNumber::format()

more often you just want to display the values as signed values in the view than first figuring out the sign and passing this on to the format() method.

So

$sign = ($value > 0 ? '+', '');
echo $this->Number->format($value, array('before'=>$sign);

becomes

echo $this->Number->format($value, array('signed'=>true);

it also keeps any existing `before` values (currently they would get lost) and is therefore more powerful without losing any of previous functionality - also 100% BC

test cases attached