mam interfejs:
<?php interface UserDAO { public function findUsersByFornameSurnameOrEmail( string $queryStr ); } ?>
i implementację w MySQLUserDAO. testuję to sobie i dostaję taki błąd:
Cytat
Argument 1 passed to MySQLUserDAO::findUsersByFornameSurnameOrEmail() must be an instance
of string, string given, called in (...)
of string, string given, called in (...)
wywołanie w teście wygląda tak:
<?php $queryStr = "jan"; $actualUsers = $this->dao->findUsersByFornameSurnameOrEmail( $queryStr ); ?>
czy te typy argumentów to muszą być typy zdefiniowane przeze mnie, a nie wbudowane w PHP?