File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1313use DirectoryTree \ImapEngine \Connection \Tokens \Crlf ;
1414use DirectoryTree \ImapEngine \Connection \Tokens \ListClose ;
1515use DirectoryTree \ImapEngine \Connection \Tokens \ListOpen ;
16+ use DirectoryTree \ImapEngine \Connection \Tokens \Number ;
1617use DirectoryTree \ImapEngine \Connection \Tokens \ResponseCodeClose ;
1718use DirectoryTree \ImapEngine \Connection \Tokens \ResponseCodeOpen ;
1819use DirectoryTree \ImapEngine \Connection \Tokens \Token ;
@@ -54,8 +55,8 @@ public function next(): Data|Token|Response|null
5455 return $ this ->parseList ();
5556 }
5657
57- // If the token is an ATOM , check its value for special markers.
58- if ($ this ->currentToken instanceof Atom) {
58+ // If the token is an Atom or Number , check its value for special markers.
59+ if ($ this ->currentToken instanceof Atom || $ this -> currentToken instanceof Number ) {
5960 // '*' marks an untagged response.
6061 if ($ this ->currentToken ->value === '* ' ) {
6162 return $ this ->parseUntaggedResponse ();
Original file line number Diff line number Diff line change 33namespace DirectoryTree \ImapEngine \Connection \Responses ;
44
55use DirectoryTree \ImapEngine \Connection \Tokens \Atom ;
6+ use DirectoryTree \ImapEngine \Connection \Tokens \Number ;
7+ use DirectoryTree \ImapEngine \Connection \Tokens \Token ;
68
79class TaggedResponse extends Response
810{
911 /**
1012 * Get the response tag.
1113 */
12- public function tag (): Atom
14+ public function tag (): Atom | Number
1315 {
1416 return $ this ->tokens [0 ];
1517 }
@@ -25,7 +27,7 @@ public function status(): Atom
2527 /**
2628 * Get the response data tokens.
2729 *
28- * @return Atom []
30+ * @return Token []
2931 */
3032 public function data (): array
3133 {
Original file line number Diff line number Diff line change 33namespace DirectoryTree \ImapEngine \Connection \Responses ;
44
55use DirectoryTree \ImapEngine \Connection \Tokens \Atom ;
6+ use DirectoryTree \ImapEngine \Connection \Tokens \Number ;
67
78class UntaggedResponse extends Response
89{
910 /**
1011 * Get the response type token.
1112 */
12- public function type (): Atom
13+ public function type (): Atom | Number
1314 {
1415 return $ this ->tokens [1 ];
1516 }
You can’t perform that action at this time.
0 commit comments