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

rich-id / terms-module / #64

11 Oct 2023 03:35PM UTC coverage: 83.731%. First build
#64

push

web-flow
Merge b679837ca into b062eebb9

146 of 146 new or added lines in 12 files covered. (100.0%)

772 of 922 relevant lines covered (83.73%)

3.01 hits per line

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

0.0
/src/Domain/Guard/TermsGuardManager.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace RichId\TermsModuleBundle\Domain\Guard;
6

7
use RichId\TermsModuleBundle\Domain\Entity\TermsSubjectInterface;
8

9
class TermsGuardManager
10
{
11
    /** @var array<TermsGuardInterface> */
12
    protected $guards;
13

14
    /** @param array<TermsGuardInterface> $guards */
15
    public function setGuards(array $guards): void
16
    {
17
        $this->guards = $guards;
×
18
    }
×
19

20
    public function getGuardFor(string $termsSlug, TermsSubjectInterface $subject): ?TermsGuardInterface
21
    {
22
        foreach ($this->guards as $guard) {
×
23
            if ($guard->supports($termsSlug, $subject)) {
×
24
                return $guard;
×
25
            }
26
        }
27

28
        return null;
×
29
    }
30
}
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