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

move-elevator / composer-translation-validator / 16003190446

01 Jul 2025 03:09PM UTC coverage: 90.062% (-2.5%) from 92.521%
16003190446

Pull #13

github

jackd248
feat: introduce ResultType enum for improved validation result handling
Pull Request #13: feat: introduce ResultType enum for improved validation result handling

13 of 26 new or added lines in 3 files covered. (50.0%)

12 existing lines in 1 file now uncovered.

435 of 483 relevant lines covered (90.06%)

2.78 hits per line

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

0.0
/src/Validator/ResultType.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace MoveElevator\ComposerTranslationValidator\Validator;
6

7
use Symfony\Component\Console\Command\Command;
8

9
enum ResultType: int
10
{
11
    case SUCCESS = 0;
12
    case WARNING = 1;
13
    case ERROR = 2;
14

NEW
15
    public function max(self $other): self
×
16
    {
NEW
17
        return $this->value >= $other->value ? $this : $other;
×
18
    }
19

NEW
20
    public function notFullySuccessful(): bool
×
21
    {
NEW
22
        return self::SUCCESS !== $this;
×
23
    }
24

NEW
25
    public function resolveErrorToCommandExitCode(bool $dryRun, bool $strict): int
×
26
    {
NEW
27
        if (self::ERROR === $this && !$dryRun) {
×
NEW
28
            return Command::FAILURE;
×
29
        }
30

NEW
31
        if (self::WARNING === $this && $strict) {
×
NEW
32
            return Command::FAILURE;
×
33
        }
34

NEW
35
        return Command::SUCCESS;
×
36
    }
37
}
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