@@ -67,7 +67,9 @@ public function start(): bool
67
67
}
68
68
$ this ->running = true ;
69
69
if (!$ this ->resume ()) {
70
+ // @codeCoverageIgnoreStart
70
71
throw new AssertionError ("Could not resume! " );
72
+ // @codeCoverageIgnoreEnd
71
73
}
72
74
$ this ->startedLoop ();
73
75
return true ;
@@ -104,10 +106,14 @@ abstract protected function loop(): ?float;
104
106
private function loopInternal (): void
105
107
{
106
108
if (!$ this ->running ) {
109
+ // @codeCoverageIgnoreStart
107
110
throw new AssertionError ("Already running! " );
111
+ // @codeCoverageIgnoreEnd
108
112
}
109
113
if (!$ this ->paused ) {
114
+ // @codeCoverageIgnoreStart
110
115
throw new AssertionError ("Already paused! " );
116
+ // @codeCoverageIgnoreEnd
111
117
}
112
118
$ this ->paused = false ;
113
119
try {
@@ -132,7 +138,9 @@ private function loopInternal(): void
132
138
} else {
133
139
if (!$ this ->resumeImmediate ) {
134
140
if ($ this ->resumeTimer !== null ) {
141
+ // @codeCoverageIgnoreStart
135
142
throw new AssertionError ("Already have a resume timer! " );
143
+ // @codeCoverageIgnoreEnd
136
144
}
137
145
$ this ->resumeTimer = EventLoop::delay ($ timeout , function (): void {
138
146
$ this ->resumeTimer = null ;
@@ -148,10 +156,14 @@ private function exitedLoopInternal(): void
148
156
$ this ->running = false ;
149
157
$ this ->paused = true ;
150
158
if ($ this ->resumeTimer !== null ) {
159
+ // @codeCoverageIgnoreStart
151
160
throw new AssertionError ("Already have a resume timer! " );
161
+ // @codeCoverageIgnoreEnd
152
162
}
153
163
if ($ this ->resumeTimer !== null ) {
164
+ // @codeCoverageIgnoreStart
154
165
throw new AssertionError ("Already have a resume immediate timer! " );
166
+ // @codeCoverageIgnoreEnd
155
167
}
156
168
$ this ->exitedLoop ();
157
169
}
0 commit comments