types
This commit is contained in:
@@ -37,6 +37,10 @@ use Espo\Core\Repositories\Database;
|
||||
|
||||
use Espo\Core\Di;
|
||||
|
||||
/**
|
||||
* @template T of PhoneNumberEntity
|
||||
* @extends Database<PhoneNumberEntity>
|
||||
*/
|
||||
class PhoneNumber extends Database implements
|
||||
|
||||
Di\ApplicationStateAware,
|
||||
@@ -131,6 +135,7 @@ class PhoneNumber extends Database implements
|
||||
|
||||
public function getByNumber(string $number): ?PhoneNumberEntity
|
||||
{
|
||||
/** @var ?PhoneNumberEntity */
|
||||
return $this->where(['name' => $number])->findOne();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user