Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
ConfiguredPrioritizedListener
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5/**
6 * This file is part of php-fast-forward/event-dispatcher.
7 *
8 * This source file is subject to the license bundled
9 * with this source code in the file LICENSE.
10 *
11 * @copyright Copyright (c) 2025-2026 Felipe SayĆ£o Lobato Abreu <github@mentordosnerds.com>
12 * @license   https://opensource.org/licenses/MIT MIT License
13 *
14 * @see       https://github.com/php-fast-forward/event-dispatcher
15 * @see       https://github.com/php-fast-forward
16 * @see       https://datatracker.ietf.org/doc/html/rfc2119
17 */
18
19namespace FastForward\EventDispatcher\ServiceProvider\Configuration;
20
21/**
22 * Store one prioritized listener definition loaded from configuration.
23 *
24 * @internal
25 */
26  class ConfiguredPrioritizedListener
27{
28    /**
29     * Create a configured prioritized listener entry.
30     *
31     * @param object|string $listener listener instance or listener class name
32     * @param string $eventType event type handled by the listener
33     * @param string $method listener method to invoke
34     * @param int $priority Listener priority. Higher values run first.
35     */
36    public function __construct(
37        public object|string $listener,
38        public string $eventType,
39        public string $method,
40        public int $priority = 0,
41    ) {}
42}