• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ICanBoogie / bind-event / 4260779252

pending completion
4260779252

push

github

Olivier Laviale
Add PHPCS and PHPStan

26 of 26 new or added lines in 3 files covered. (100.0%)

17 of 26 relevant lines covered (65.38%)

0.69 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lib/ConfigBuilder.php
1
<?php
2

3
/*
4
 * This file is part of the ICanBoogie package.
5
 *
6
 * (c) Olivier Laviale <olivier.laviale@gmail.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11

12
namespace ICanBoogie\Binding\Event;
13

14
use ICanBoogie\Config\Builder;
15
use ICanBoogie\Event;
16
use ICanBoogie\Event\Config;
17

18
/**
19
 * @implements Builder<Config>
20
 */
21
final class ConfigBuilder implements Builder
22
{
23
    public static function get_fragment_filename(): string
24
    {
25
        return 'event';
×
26
    }
27

28
    private readonly Event\ConfigBuilder $inner_builder;
29

30
    public function __construct()
31
    {
32
        $this->inner_builder = new Event\ConfigBuilder();
×
33
    }
34

35
    public function build(): Config
36
    {
37
        return $this->inner_builder->build();
×
38
    }
39

40
    /**
41
     * @param class-string<Event> $event_class
42
     * @param callable $listener
43
     *
44
     * @return $this
45
     */
46
    public function attach(string $event_class, callable $listener): self
47
    {
48
        $this->inner_builder->attach($event_class, $listener);
×
49

50
        return $this;
×
51
    }
52

53
    /**
54
     * @param class-string $sender_class
55
     * @param class-string<Event> $event_class
56
     * @param callable $listener
57
     *
58
     * @return $this
59
     */
60
    public function attach_to(string $sender_class, string $event_class, callable $listener): self
61
    {
62
        $this->inner_builder->attach_to($sender_class, $event_class, $listener);
×
63

64
        return $this;
×
65
    }
66
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc