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

api-platform / core / 7358252084

29 Dec 2023 04:32PM UTC coverage: 37.248% (-0.1%) from 37.395%
7358252084

push

github

soyuka
Merge 3.2

6 of 8 new or added lines in 6 files covered. (75.0%)

44 existing lines in 2 files now uncovered.

10347 of 27779 relevant lines covered (37.25%)

28.62 hits per line

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

0.0
/src/Util/Inflector.php
1
<?php
2

3
/*
4
 * This file is part of the API Platform project.
5
 *
6
 * (c) Kévin Dunglas <dunglas@gmail.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11

12
declare(strict_types=1);
13

14
namespace ApiPlatform\Util;
15

16
use Doctrine\Inflector\Inflector as LegacyInflector;
17
use Doctrine\Inflector\InflectorFactory;
18

19
/**
20
 * @internal
21
 */
22
final class Inflector
23
{
24
    private static ?LegacyInflector $instance = null;
25

26
    private static function getInstance(): LegacyInflector
27
    {
UNCOV
28
        return self::$instance
×
UNCOV
29
            ?? self::$instance = InflectorFactory::create()->build();
×
30
    }
31

32
    /**
33
     * @see InflectorObject::tableize()
34
     */
35
    public static function tableize(string $word): string
36
    {
UNCOV
37
        return self::getInstance()->tableize($word);
×
38
    }
39

40
    /**
41
     * @see InflectorObject::pluralize()
42
     */
43
    public static function pluralize(string $word): string
44
    {
45
        return self::getInstance()->pluralize($word);
×
46
    }
47
}
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