public function getObjects(array $whereColumnsInfo = null): array 
    {
        $roles = [];

        if (null !== $records = $this->select("*", $whereColumnsInfo)) {
            foreach ($records as $record) {
                $roles[] = $this->buildRole((int) $record['id'], $record['role'], new \DateTimeImmutable($record['created']));
            }
        }

        return $roles;
    }
public function getObjects(array $whereColumnsInfo = null): array 
    {
        $roles = [];

        if (null !== $records = $this->select("*", $whereColumnsInfo)) {
            foreach ($records as $record) {
                $roles[] = $this->buildRole((int) $record['id'], $record['role'], new \DateTimeImmutable($record['created']));
            }
        }

        return $roles;
    }
public function getObjects ( array $ whereColumnsInfo = null ) : array { $ roles = [ ] ; if ( null !== $ records = $ this -> select ( "*" , $ whereColumnsInfo ) ) { foreach ( $ records as $ record ) { $ roles [ ] = $ this -> buildRole ( ( int ) $ record [ 'id' ] , $ record [ 'role' ] , new \ DateTimeImmutable ( $ record [ 'created' ] ) ) ; } } return $ roles ; }
selects roles and converts recordset to array of objects and return
selects roles and converts recordset to array of objects and return