File tree Expand file tree Collapse file tree 1 file changed +8
-16
lines changed
exercises/practice/circular-buffer Expand file tree Collapse file tree 1 file changed +8
-16
lines changed Original file line number Diff line number Diff line change 2424
2525declare (strict_types=1 );
2626
27- class BufferFullError extends Exception
28- {
29- }
30-
31- class BufferEmptyError extends Exception
32- {
33- }
34-
3527class CircularBuffer
3628{
29+ // You need to add more methods yourself!
30+
3731 public function read ()
3832 {
3933 throw new \BadMethodCallException (sprintf ('Implement the %s method ' , __FUNCTION__ ));
@@ -43,14 +37,12 @@ public function write($item): void
4337 {
4438 throw new \BadMethodCallException (sprintf ('Implement the %s method ' , __FUNCTION__ ));
4539 }
40+ }
4641
47- public function forceWrite ($ item ): void
48- {
49- throw new \BadMethodCallException (sprintf ('Implement the %s method ' , __FUNCTION__ ));
50- }
42+ class BufferFullError extends Exception
43+ {
44+ }
5145
52- public function clear (): void
53- {
54- throw new \BadMethodCallException (sprintf ('Implement the %s method ' , __FUNCTION__ ));
55- }
46+ class BufferEmptyError extends Exception
47+ {
5648}
You can’t perform that action at this time.
0 commit comments