I have seen examples like the following:
$data = array( \'username\' => $user->getUsername(), \'userpass\' => $user->getPassword(), \'em
I'm always doing trailing comma because it helps to avoid syntax errors while adding new array elements... it's just a good practice.