File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,10 @@ public function is(Folder $folder): bool
8282 */
8383 public function messages (): MessageQuery
8484 {
85- return new MessageQuery (tap ($ this )->select (true ), new ImapQueryBuilder );
85+ // Ensure the folder is selected.
86+ $ this ->select (true );
87+
88+ return new MessageQuery ($ this , new ImapQueryBuilder );
8689 }
8790
8891 /**
Original file line number Diff line number Diff line change @@ -185,9 +185,10 @@ public function inbox(): Folder
185185 */
186186 public function folders (): FolderRepository
187187 {
188- return new FolderRepository (
189- tap ($ this )->connection ()
190- );
188+ // Ensure the connection is established.
189+ $ this ->connection ();
190+
191+ return new FolderRepository ($ this );
191192 }
192193
193194 /**
You can’t perform that action at this time.
0 commit comments