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

The-oGlow / ya-corapi / 20730329328

05 Jan 2026 09:54PM UTC coverage: 50.144% (+3.8%) from 46.354%
20730329328

push

github

oglowa
#3: Update files / tested

522 of 537 new or added lines in 20 files covered. (97.21%)

153 existing lines in 8 files now uncovered.

1048 of 2090 relevant lines covered (50.14%)

8.43 hits per line

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

73.68
/src/Yacorapi/Extension/AbstractExtension.php
1
<?php
2

3
declare(strict_types=1);
4

5
/*
6
 * This file is part of ezlogging
7
 *
8
 * (c) 2024 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 oglowa\tools\Yacorapi\Extension;
15

16
use Ds\Map;
17
use Ds\Vector;
18
use Monolog\ConsoleLogger;
19
use oglowa\tools\Yacorapi\ConstData;
20
use oglowa\tools\Yacorapi\Macro\IAddon;
21
use Psr\Log\LoggerInterface;
22

23
abstract class AbstractExtension implements IExtension
24
{
25
    /** @var LoggerInterface */
26
    protected $logger;
27

28
    /** @var ConstData */
29
    protected $constData;
30

31
    /** @var null|IAddon */
32
    protected $addons;
33

34
    public function __construct(ConstData $constData)
25✔
35
    {
36
        $this->logger = new ConsoleLogger(get_class($this));
25✔
37
        $this->logger->debug('START');
25✔
38
        $this->constData = $constData;
25✔
39
        $this->init();
25✔
40
        $this->logger->debug('Is initiated', [get_class($this)]);
25✔
41
        $this->logger->debug('END');
25✔
42
    }
43

44
    /**
45
     * @inheritdoc
46
     */
47
    abstract public static function getName(): string;
48

49
    /**
50
     * @inheritdoc
51
     */
52
    abstract public static function getId(): int;
53

54
    protected function init(): void
27✔
55
    {
56
    }
27✔
57

58
    /**
59
     * @inheritdoc
60
     */
61
    public function getAddons(): Map
19✔
62
    {
63
        /** @var Map<mixed,Vector<mixed>> */
64
        $addonsTmp = new Map();
19✔
65
        if (!is_null($this->addons)) {
19✔
66
            $addonsTmp = $this->addons->getAddons();
19✔
67
        }
68

69
        return $addonsTmp;
19✔
70
    }
71

72
    /**
73
     * @inheritdoc
74
     */
NEW
75
    public function getMacros(): Vector
×
76
    {
77
        /** @var Vector<mixed> */
NEW
78
        $macrosTmp = new Vector();
×
NEW
79
        if (!is_null($this->addons)) {
×
NEW
80
            $macrosTmp = $this->addons->getMacros();
×
81
        }
82

NEW
83
        return $macrosTmp;
×
84
    }
85
}
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