• 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

17.24
/src/Yacorapi/Store/FileAdapter.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\Store;
15

16
use Monolog\ConsoleLogger;
17
use oglowa\tools\Yacorapi\ConstData;
18
use Psr\Log\LoggerInterface;
19

20
class FileAdapter extends AbstractStoreAdapter
21
{
22
    /** @var LoggerInterface */
23
    private $logger;
24

25
    public function __construct(string $outputFileName, string $fileSuffix = '', string $customTargetDir = '')
2✔
26
    {
27
        $this->logger    = new ConsoleLogger(FileAdapter::class);
2✔
28
        $this->logger->debug("START");
2✔
29

30
        parent::__construct($outputFileName, $fileSuffix, $customTargetDir);
2✔
31

32
        $this->logger->debug('END');
2✔
33
    }
34

35
    /**
36
     * @param mixed[] $resultsEntry
37
     */
UNCOV
38
    public function storeResults(array $resultsEntry): void
×
39
    {
UNCOV
40
        $this->logger->debug('START');
×
41

UNCOV
42
        $pageId      = $resultsEntry[self::KEY_KEY];
×
43
        $line        = sprintf(
×
44
            '%s;%s%s;%s',
×
45
            $pageId,
×
46
            $this->constData->c(ConstData::KEY_CONF_BASE_URL),
×
47
            $resultsEntry[self::KEY_LINKS][self::KEY_TINYUI],
×
48
            $resultsEntry[self::KEY_TITLE]
×
49
        );
×
50
        // $this->logger->debug('', [$line]);
51

UNCOV
52
        $this->logger->debug('Writing results to ', [$this->storeItem]);
×
53

UNCOV
54
        $this->writeData($this->storeItem, sprintf('%s', $line));
×
55

UNCOV
56
        $this->logger->debug('END');
×
57
    }
58

59
    /**
60
     * @param mixed $dataContent
61
     */
UNCOV
62
    public function storeData($dataContent): void
×
63
    {
UNCOV
64
        $this->logger->debug('START');
×
65
        $this->logger->debug('Writing data to ', [$this->storeItem]);
×
66

UNCOV
67
        $this->writeData($this->storeItem, $dataContent);
×
68

UNCOV
69
        $this->logger->debug('END');
×
70
    }
71

72
    /**
73
     * @param string|string[] $dataHeader
74
     */
UNCOV
75
    public function storeDataHeader($dataHeader): void
×
76
    {
UNCOV
77
        $this->logger->debug('START');
×
78

UNCOV
79
        if (!empty($dataHeader)) {
×
80
            $this->logger->debug('Writing header to', [$this->storeItem]);
×
81
            $this->writeData($this->storeItem, $this->flattenDataHeader($dataHeader));
×
82
        }
83

UNCOV
84
        $this->logger->debug('END');
×
85
    }
86
}
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