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

The-oGlow / ezlogging / 20661849471

02 Jan 2026 04:18PM UTC coverage: 80.84% (-0.1%) from 80.965%
20661849471

push

github

ollily
#1: add  / tested

6 of 8 new or added lines in 1 file covered. (75.0%)

308 of 381 relevant lines covered (80.84%)

12.62 hits per line

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

75.0
/src/Tools/Reflection/ChildClazzesHelper.php
1
<?php
2

3
declare(strict_types=1);
4

5
/*
6
 * This file is part of ezlogging
7
 *
8
 * (c) 2025 Oliver Glowa, coding.glowa.com
9
 *
10
 * This source file is subject to the Apache-2.0 license that is bundled
11
 * with this source code in the file LICENSE.
12
 */
13

14
namespace ollily\Tools\Reflection;
15

16
final class ChildClazzesHelper
17
{
NEW
18
    private function __construct()
×
19
    {
NEW
20
    }
×
21

22
    /**
23
     * Retrieve all child classes of a given class.
24
     *
25
     * @param mixed $clazzName
26
     *
27
     * @return string[]
28
     */
29
    public static function getAllChildren($clazzName): array
3✔
30
    {
31
        $children = [];
3✔
32
        foreach (get_declared_classes() as $currentClazz) {
3✔
33
            if (is_subclass_of($currentClazz, $clazzName)) {
3✔
34
                $children[] = $currentClazz;
1✔
35
            }
36
        }
37

38
        return $children;
3✔
39
    }
40
}
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