Lines 100.00% 2 / 2
Methods 100.00% 2 / 2
Classes 100.00% 1 / 1
Name Lines Methods CRAP
 stopPropagation 100.00% 1 / 1 100.00% 1 / 1 1
 isPropagationStopped 100.00% 1 / 1 100.00% 1 / 1 1
23abstract class StoppableEvent implements StoppableEventInterface
24{
25    /**
26     * Whether propagation has been stopped.
27     *
28     * @var bool
29     */
30    private bool $propagationStopped = false;
31
32    /**
33     * Stop further listeners from being invoked for this event.
34     *
35     * @return void
36     */
37    public function stopPropagation(): void
38    {
39        $this->propagationStopped = true;
40    }
41
42    /**
43     * Whether propagation has been stopped.
44     *
45     * @return bool True if no further listeners should be invoked
46     */
47    public function isPropagationStopped(): bool
48    {
49        return $this->propagationStopped;
50    }
51}