src/Ridvanbaluyos/Mmda/MMDA.php
final private function convertToStatus(Array $data)
    {
        $statusMatrix = [
            'L' => 'Light',
            'ML' => 'Light to Moderate',
            'M' => 'Moderate',
            'MH' => 'Moderate to Heavy',
            'H' => 'Heavy'
        ];

        $status = [
            'NB' => [
                'name' => $data['NB'],
                'label' => $statusMatrix[$data['NB']] . ' Traffic',
                'last_updated' => $data['pubDate']
            ],
            'SB' => [
                'name' => $data['SB'],
                'label' => $statusMatrix[$data['SB']] . ' Traffic',
                'last_updated' => $data['pubDate']
            ]
        ];

        return $status;
    }
final private function convertToStatus(Array $data)
    {
        $statusMatrix = [
            'L' => 'Light',
            'ML' => 'Light to Moderate',
            'M' => 'Moderate',
            'MH' => 'Moderate to Heavy',
            'H' => 'Heavy'
        ];

        $status = [
            'NB' => [
                'name' => $data['NB'],
                'label' => $statusMatrix[$data['NB']] . ' Traffic',
                'last_updated' => $data['pubDate']
            ],
            'SB' => [
                'name' => $data['SB'],
                'label' => $statusMatrix[$data['SB']] . ' Traffic',
                'last_updated' => $data['pubDate']
            ]
        ];

        return $status;
    }
final private function convertToStatus ( Array $ data ) { $ statusMatrix = [ 'L' => 'Light' , 'ML' => 'Light to Moderate' , 'M' => 'Moderate' , 'MH' => 'Moderate to Heavy' , 'H' => 'Heavy' ] ; $ status = [ 'NB' => [ 'name' => $ data [ 'NB' ] , 'label' => $ statusMatrix [ $ data [ 'NB' ] ] . ' Traffic' , 'last_updated' => $ data [ 'pubDate' ] ] , 'SB' => [ 'name' => $ data [ 'SB' ] , 'label' => $ statusMatrix [ $ data [ 'SB' ] ] . ' Traffic' , 'last_updated' => $ data [ 'pubDate' ] ] ] ; return $ status ; }
This function converts traffic data status to readable format.

@param array $data
@return array
This function converts traffic data status to readable format .