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

heimrichhannot / contao-utils-bundle / 15017483614

14 May 2025 09:41AM UTC coverage: 25.302% (-54.2%) from 79.482%
15017483614

Pull #96

github

koertho
backport anonymize utils
Pull Request #96: Backport anonymize utils

6 of 7 new or added lines in 2 files covered. (85.71%)

248 existing lines in 22 files now uncovered.

1488 of 5881 relevant lines covered (25.3%)

1.56 hits per line

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

0.0
/src/Util/ClassUtil.php
1
<?php
2

3
namespace HeimrichHannot\UtilsBundle\Util;
4

5
class ClassUtil
6
{
7
    /**
8
     * Return true if the given class or a parent class implements the given trait
9
     * @param object|string $class
10
     * @param string $trait
11
     * @return bool
12
     */
13
    public function classImplementsTrait($class, string $trait): bool
14
    {
15
        do {
16
            if (in_array($trait, class_uses($class))) {
×
UNCOV
17
                return true;
×
18
            }
19

UNCOV
20
        } while($class = get_parent_class($class));
×
21

UNCOV
22
        return false;
×
23
    }
24
}
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