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:
parent
3066fea2aa
commit
d71caf0c75
@ -53,6 +53,12 @@ class Row implements \ArrayAccess, \IteratorAggregate, \Countable
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function __isset(string $key): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/********************* interfaces ArrayAccess, Countable & IteratorAggregate ****************d*g**/
|
/********************* interfaces ArrayAccess, Countable & IteratorAggregate ****************d*g**/
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,6 +35,10 @@ Assert::error(function () use ($row) {
|
|||||||
Assert::false(isset($row->missing));
|
Assert::false(isset($row->missing));
|
||||||
Assert::false(isset($row['missing']));
|
Assert::false(isset($row['missing']));
|
||||||
|
|
||||||
|
// ??
|
||||||
|
Assert::same(123, $row->missing ?? 123);
|
||||||
|
Assert::same(123, $row['missing'] ?? 123);
|
||||||
|
|
||||||
|
|
||||||
// suggestions
|
// suggestions
|
||||||
Assert::error(function () use ($row) {
|
Assert::error(function () use ($row) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user