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

ICanBoogie / bind-event / 6190658950

14 Sep 2023 08:39PM UTC coverage: 60.87% (-4.5%) from 65.385%
6190658950

push

github

olvlvl
Add ConfigBuilder::use_attributes()

2 of 2 new or added lines in 1 file covered. (100.0%)

14 of 23 relevant lines covered (60.87%)

0.61 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
     * @uses Event\ConfigBuilder::attach()
42
     *
43
     * @param class-string<Event> $event_class
44
     * @param callable $listener
45
     *
46
     * @return $this
47
     */
48
    public function attach(string $event_class, callable $listener): self
49
    {
50
        $this->inner_builder->attach($event_class, $listener);
×
51

52
        return $this;
×
53
    }
54

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

68
        return $this;
×
69
    }
70

71
    /**
72
     * @uses Event\ConfigBuilder::use_attributes()
73
     *
74
     * @return $this
75
     */
76
    public function use_attributes(): self
77
    {
78
        $this->inner_builder->use_attributes();
×
79

80
        return $this;
×
81
    }
82
}
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

© 2025 Coveralls, Inc