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

tempestphp / tempest-framework / 11924655642

19 Nov 2024 12:37PM UTC coverage: 81.705% (-0.2%) from 81.946%
11924655642

push

github

web-flow
chore(core): framework installer improvements (#752)

1 of 17 new or added lines in 2 files covered. (5.88%)

56 existing lines in 5 files now uncovered.

7869 of 9631 relevant lines covered (81.7%)

51.76 hits per line

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

60.0
/src/Tempest/Core/src/Environment.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Tempest\Core;
6

7
use function Tempest\env;
8

9
enum Environment: string
10
{
11
    case LOCAL = 'local';
12
    case STAGING = 'staging';
13
    case PRODUCTION = 'production';
14
    case CI = 'ci';
15
    case TESTING = 'testing';
16
    case OTHER = 'other';
17

18
    public function isProduction(): bool
10✔
19
    {
20
        return $this === self::PRODUCTION;
10✔
21
    }
22

23
    public function isStaging(): bool
9✔
24
    {
25
        return $this === self::STAGING;
9✔
26
    }
27

28
    public function isLocal(): bool
×
29
    {
UNCOV
30
        return $this === self::LOCAL;
×
31
    }
32

33
    public function isCI(): bool
×
34
    {
UNCOV
35
        return $this === self::CI;
×
36
    }
37

38
    public function isTesting(): bool
381✔
39
    {
40
        return $this === self::TESTING;
381✔
41
    }
42

43
    public function isOther(): bool
×
44
    {
UNCOV
45
        return $this === self::OTHER;
×
46
    }
47

48
    public static function fromEnv(): self
381✔
49
    {
50
        $value = env('ENVIRONMENT', 'local');
381✔
51

52
        return self::tryFrom($value) ?? throw new InvalidEnvironment($value);
381✔
53
    }
54
}
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