1
0
mirror of https://github.com/dg/dibi.git synced 2025-02-22 18:02:25 +01:00

Row: fixed ?? usage

This commit is contained in:
David Grudl 2021-04-21 13:54:37 +02:00
parent 3066fea2aa
commit d71caf0c75
2 changed files with 10 additions and 0 deletions

View File

@ -53,6 +53,12 @@ class Row implements \ArrayAccess, \IteratorAggregate, \Countable
}
public function __isset(string $key): bool
{
return false;
}
/********************* interfaces ArrayAccess, Countable & IteratorAggregate ****************d*g**/

View File

@ -35,6 +35,10 @@ Assert::error(function () use ($row) {
Assert::false(isset($row->missing));
Assert::false(isset($row['missing']));
// ??
Assert::same(123, $row->missing ?? 123);
Assert::same(123, $row['missing'] ?? 123);
// suggestions
Assert::error(function () use ($row) {