We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2925d55 commit b496e4dCopy full SHA for b496e4d
src/AbraFlexi/lock.php
@@ -23,12 +23,20 @@ trait lock
23
{
24
public function locked(): bool
25
26
- return $this->getDataValue('zamekK') === 'zamek.otevreno';
+ $lockValue = $this->getDataValue('zamekK');
27
+ if(is_null($lockValue)){
28
+ throw new \InvalidArgumentException('unset zamekK',1);
29
+ }
30
+ return $lockValue === 'zamek.otevreno';
31
}
32
33
public function getLockType(): string
34
- return str_replace('zamek.', '', (string) $this->getDataValue('zamekK'));
35
36
37
38
39
+ return str_replace('zamek.', '', $lockValue);
40
41
42
public function lock(): bool
0 commit comments