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

tempestphp / tempest-framework / 11310141859

12 Oct 2024 06:15PM UTC coverage: 82.1% (-0.03%) from 82.134%
11310141859

push

github

web-flow
chore: local defined variables cleanup (#580)

1 of 1 new or added line in 1 file covered. (100.0%)

62 existing lines in 6 files now uncovered.

6770 of 8246 relevant lines covered (82.1%)

38.42 hits per line

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

85.71
/src/Tempest/View/src/IsView.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Tempest\View;
6

7
/** @phpstan-require-implements \Tempest\View\View */
8
trait IsView
9
{
10
    public string $path;
11

12
    public array $data = [];
13

14
    public function __construct(
48✔
15
        string $path,
16
        array $data = [],
17
    ) {
18
        $this->path = $path;
48✔
19
        $this->data = $data;
48✔
20
    }
21

22
    public function getPath(): string
50✔
23
    {
24
        return $this->path;
50✔
25
    }
26

27
    public function getData(): array
49✔
28
    {
29
        return $this->data;
49✔
30
    }
31

32
    public function get(string $key): mixed
14✔
33
    {
34
        return $this->{$key} ?? $this->data[$key] ?? null;
14✔
35
    }
36

UNCOV
37
    public function has(string $key): bool
×
38
    {
UNCOV
39
        return array_key_exists($key, $this->data) || property_exists($this, $key);
×
40
    }
41

42
    public function data(mixed ...$params): self
51✔
43
    {
44
        $this->data = [...$this->data, ...$params];
51✔
45

46
        return $this;
51✔
47
    }
48
}
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