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

nette / latte / 15809643126

22 Jun 2025 06:35PM UTC coverage: 93.67% (+0.09%) from 93.583%
15809643126

push

github

dg
added {include?} {import?} {embed?} {sandbox?}

34 of 36 new or added lines in 7 files covered. (94.44%)

164 existing lines in 43 files now uncovered.

5164 of 5513 relevant lines covered (93.67%)

0.94 hits per line

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

92.31
/src/Latte/Extension.php
1
<?php
2

3
/**
4
 * This file is part of the Latte (https://latte.nette.org)
5
 * Copyright (c) 2008 David Grudl (https://davidgrudl.com)
6
 */
7

8
declare(strict_types=1);
9

10
namespace Latte;
11

12
use function get_defined_vars;
13

14

15
/**
16
 * Latte extension.
17
 */
18
abstract class Extension
19
{
20
        /**
21
         * Initializes before template is compiler.
22
         */
23
        public function beforeCompile(Engine $engine): void
1✔
24
        {
25
        }
1✔
26

27

28
        /**
29
         * Returns a list of parsers for Latte tags.
30
         * @return array<string, callable(Compiler\Tag, Compiler\TemplateParser): (Compiler\Node|\Generator|void)|\stdClass>
31
         */
32
        public function getTags(): array
33
        {
UNCOV
34
                return [];
×
35
        }
36

37

38
        /**
39
         * Returns a list of parsers for Latte tags.
40
         * @return array<string, callable(Compiler\Nodes\TemplateNode): void|\stdClass>
41
         */
42
        public function getPasses(): array
43
        {
44
                return [];
1✔
45
        }
46

47

48
        /**
49
         * Returns a list of |filters.
50
         * @return array<string, callable>
51
         */
52
        public function getFilters(): array
53
        {
54
                return [];
1✔
55
        }
56

57

58
        /**
59
         * Returns a list of functions used in templates.
60
         * @return array<string, callable>
61
         */
62
        public function getFunctions(): array
63
        {
64
                return [];
1✔
65
        }
66

67

68
        /**
69
         * Returns a list of providers.
70
         * @return array<mixed>
71
         */
72
        public function getProviders(): array
73
        {
74
                return [];
1✔
75
        }
76

77

78
        /**
79
         * Returns a value to distinguish multiple versions of the template.
80
         */
81
        public function getCacheKey(Engine $engine): mixed
1✔
82
        {
83
                return null;
1✔
84
        }
85

86

87
        /**
88
         * Initializes before template is rendered.
89
         */
90
        public function beforeRender(Runtime\Template $template): void
1✔
91
        {
92
        }
1✔
93

94

95
        public static function order(callable $subject, array|string $before = [], array|string $after = []): \stdClass
1✔
96
        {
97
                return (object) get_defined_vars();
1✔
98
        }
99
}
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