Some code cleanup.

This commit is contained in:
James Cole
2016-02-05 15:41:40 +01:00
parent 4ef840e210
commit f5b89ca783
32 changed files with 183 additions and 72 deletions

View File

@@ -111,9 +111,9 @@ class Amount
}
/**
* @param string $symbol
* @param float $amount
* @param bool $coloured
* @param string $symbol
* @param float|string $amount
* @param bool $coloured
*
* @return string
*/

View File

@@ -323,6 +323,7 @@ class TestData
}
/**
* @param User $user
* @param Carbon $date
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*/
@@ -651,9 +652,10 @@ class TestData
}
/**
* @param $description
* @param User $user
* @param string $description
* @param Carbon $date
* @param $amount
* @param string $amount
*
* @return TransactionJournal
*/
@@ -848,6 +850,7 @@ class TestData
}
/**
* @param User $user
* @param Carbon $date
*
* @return TransactionJournal
@@ -985,7 +988,7 @@ class TestData
* @param Carbon $date
* @param string $amount
*
* @return static
* @return TransactionJournal|static
*/
public static function createWater(User $user, string $description, Carbon $date, string $amount): TransactionJournal
{

View File

@@ -184,7 +184,7 @@ class Steam
if (!(strpos($string, 'm') === false)) {
// has a M in it, remove the M and multiply by 1048576.
$bytes = bcmul(rtrim($string, 'm'),'1048576');
$bytes = bcmul(rtrim($string, 'm'), '1048576');
return intval($bytes);
}