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

Cecilapp / Cecil / 7142649554

08 Dec 2023 02:37PM UTC coverage: 83.0% (+0.5%) from 82.534%
7142649554

push

github

web-flow
8.x (#1676)

186 of 231 new or added lines in 31 files covered. (80.52%)

17 existing lines in 6 files now uncovered.

2861 of 3447 relevant lines covered (83.0%)

0.83 hits per line

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

71.43
/src/Renderer/Config.php
1
<?php
2

3
declare(strict_types=1);
4

5
/*
6
 * This file is part of Cecil.
7
 *
8
 * Copyright (c) Arnaud Ligny <arnaud@ligny.fr>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13

14
namespace Cecil\Renderer;
15

16
use Cecil\Builder;
17

18
/**
19
 * Class Config.
20
 */
21
class Config implements \ArrayAccess
22
{
23
    /** @var Builder Builder object. */
24
    protected $builder;
25

26
    /** @var \Cecil\Config */
27
    protected $config;
28

29
    /** @var string Current language. */
30
    protected $language;
31

32
    public function __construct(Builder $builder, string $language)
33
    {
34
        $this->builder = $builder;
1✔
35
        $this->config = $this->builder->getConfig();
1✔
36
        $this->language = $language;
1✔
37
    }
38

39
    /**
40
     * Implement ArrayAccess.
41
     *
42
     * @param mixed $offset
43
     *
44
     * @return bool
45
     */
46
    #[\ReturnTypeWillChange]
47
    public function offsetExists($offset): bool
48
    {
49
        return $this->config->has($offset);
1✔
50
    }
51

52
    /**
53
     * Implements \ArrayAccess.
54
     *
55
     * @param mixed $offset
56
     *
57
     * @return mixed|null
58
     */
59
    #[\ReturnTypeWillChange]
60
    public function offsetGet($offset)
61
    {
62
        return $this->config->get($offset, $this->language);
1✔
63
    }
64

65
    /**
66
     * Implements \ArrayAccess.
67
     *
68
     * @param mixed $offset
69
     * @param mixed $value
70
     *
71
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
72
     */
73
    #[\ReturnTypeWillChange]
74
    public function offsetSet($offset, $value): void
75
    {
NEW
76
    }
×
77

78
    /**
79
     * Implements \ArrayAccess.
80
     *
81
     * @param mixed $offset
82
     *
83
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
84
     */
85
    #[\ReturnTypeWillChange]
86
    public function offsetUnset($offset): void
87
    {
NEW
88
    }
×
89
}
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