Skip to content

Commit cdead2f

Browse files
committed
Add ability to determine atom values
1 parent 412b545 commit cdead2f

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/Connection/Tokens/Atom.php

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,21 @@
22

33
namespace DirectoryTree\ImapEngine\Connection\Tokens;
44

5-
class Atom extends Token {}
5+
class Atom extends Token
6+
{
7+
/**
8+
* Determine if the token is the given value.
9+
*/
10+
public function is(string $value): bool
11+
{
12+
return $this->value === $value;
13+
}
14+
15+
/**
16+
* Determine if the token is not the given value.
17+
*/
18+
public function isNot(string $value): bool
19+
{
20+
return ! $this->is($value);
21+
}
22+
}

0 commit comments

Comments
 (0)