| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 13 | 
| Code Lines | 8 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 8 | 
| CRAP Score | 1 | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 15 | 2 | public function buildFromJson(string $json): PayoutInfo  | 
            |
| 16 |     { | 
            ||
| 17 | 2 | $data = json_decode($json, true)['data'];  | 
            |
| 18 | |||
| 19 | 2 | $currency = new Currency($data['currencyId']);  | 
            |
| 20 | |||
| 21 | 2 | return new PayoutInfo(  | 
            |
| 22 | 2 | new Money($data['totalBalance'], $currency),  | 
            |
| 23 | 2 | new Money($data['nextPayoutAmount'], $currency),  | 
            |
| 24 | 2 | new Money($data['discountRemaining'], $currency),  | 
            |
| 25 | 2 | Periodicity::get($data['periodicity'])  | 
            |
| 26 | );  | 
            ||
| 27 | }  | 
            ||
| 28 | }  | 
            ||
| 29 |