public function display(array $users = [])
    {
        $headers = ['Name', 'Account Name', 'UPN'];

        $data = [];

        array_map(function (User $user) use (&$data) {
            $data[] = [
                'name' => $user->getCommonName(),
                'account_name' => $user->getAccountName(),
                'upn' => $user->getUserPrincipalName(),
            ];
        }, $users);

        $this->table($headers, $data);
    }
public function display(array $users = [])
    {
        $headers = ['Name', 'Account Name', 'UPN'];

        $data = [];

        array_map(function (User $user) use (&$data) {
            $data[] = [
                'name' => $user->getCommonName(),
                'account_name' => $user->getAccountName(),
                'upn' => $user->getUserPrincipalName(),
            ];
        }, $users);

        $this->table($headers, $data);
    }
public function display ( array $ users = [ ] ) { $ headers = [ 'Name' , 'Account Name' , 'UPN' ] ; $ data = [ ] ; array_map ( function ( User $ user ) use ( & $ data ) { $ data [ ] = [ 'name' => $ user -> getCommonName ( ) , 'account_name' => $ user -> getAccountName ( ) , 'upn' => $ user -> getUserPrincipalName ( ) , ] ; } , $ users ) ; $ this -> table ( $ headers , $ data ) ; }
Displays the given users in a table.

@param array $users

@return void
Displays the given users in a table .