mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Reformat various code.
This commit is contained in:
		| @@ -50,7 +50,7 @@ class ChartJsGenerator implements GeneratorInterface | ||||
|         $amounts  = array_column($data, 'amount'); | ||||
|         $next     = next($amounts); | ||||
|         $sortFlag = SORT_ASC; | ||||
|         if (!is_bool($next) && 1 === bccomp((string)$next, '0')) { | ||||
|         if (!is_bool($next) && 1 === bccomp((string) $next, '0')) { | ||||
|             $sortFlag = SORT_DESC; | ||||
|         } | ||||
|         array_multisort($amounts, $sortFlag, $data); | ||||
| @@ -59,7 +59,7 @@ class ChartJsGenerator implements GeneratorInterface | ||||
|         $index = 0; | ||||
|         foreach ($data as $key => $valueArray) { | ||||
|             // make larger than 0 | ||||
|             $chartData['datasets'][0]['data'][]            = (float)app('steam')->positive((string)$valueArray['amount']); | ||||
|             $chartData['datasets'][0]['data'][]            = (float) app('steam')->positive((string) $valueArray['amount']); | ||||
|             $chartData['datasets'][0]['backgroundColor'][] = ChartColour::getColour($index); | ||||
|             $chartData['datasets'][0]['currency_symbol'][] = $valueArray['currency_symbol']; | ||||
|             $chartData['labels'][]                         = $key; | ||||
| @@ -165,7 +165,7 @@ class ChartJsGenerator implements GeneratorInterface | ||||
|         // different sort when values are positive and when they're negative. | ||||
|         asort($data); | ||||
|         $next = next($data); | ||||
|         if (!is_bool($next) && 1 === bccomp((string)$next, '0')) { | ||||
|         if (!is_bool($next) && 1 === bccomp((string) $next, '0')) { | ||||
|             // next is positive, sort other way around. | ||||
|             arsort($data); | ||||
|         } | ||||
| @@ -174,7 +174,7 @@ class ChartJsGenerator implements GeneratorInterface | ||||
|         $index = 0; | ||||
|         foreach ($data as $key => $value) { | ||||
|             // make larger than 0 | ||||
|             $chartData['datasets'][0]['data'][]            = (float)app('steam')->positive((string)$value); | ||||
|             $chartData['datasets'][0]['data'][]            = (float) app('steam')->positive((string) $value); | ||||
|             $chartData['datasets'][0]['backgroundColor'][] = ChartColour::getColour($index); | ||||
|  | ||||
|             $chartData['labels'][] = $key; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user