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

api-platform / core / 9710836697

28 Jun 2024 09:35AM UTC coverage: 63.285% (+1.2%) from 62.122%
9710836697

push

github

soyuka
docs: changelog v3.3.7

11104 of 17546 relevant lines covered (63.29%)

52.26 hits per line

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

0.0
/src/Metadata/UriVariablesConverterInterface.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\Metadata;
15

16
use ApiPlatform\Metadata\Exception\InvalidIdentifierException;
17

18
if (interface_exists(\ApiPlatform\Api\UriVariablesConverterInterface::class)) {
×
19
    class_alias(
×
20
        \ApiPlatform\Api\UriVariablesConverterInterface::class,
×
21
        __NAMESPACE__.'\UriVariablesConverterInterface'
×
22
    );
×
23

24
    if (false) { // @phpstan-ignore-line
×
25
        interface UriVariablesConverterInterface extends \ApiPlatform\Api\UriVariablesConverterInterface
26
        {
27
        }
28
    }
29
} else {
30
    /**
31
     * Identifier converter.
32
     *
33
     * @author Antoine Bluchet <soyuka@gmail.com>
34
     */
35
    interface UriVariablesConverterInterface
36
    {
37
        /**
38
         * Takes an array of strings representing URI variables (identifiers) and transform their values to the expected type.
39
         *
40
         * @param array  $data  URI variables to convert to PHP values
41
         * @param string $class The class to which the URI variables belong to
42
         *
43
         * @throws InvalidIdentifierException
44
         *
45
         * @return array Array indexed by identifiers properties with their values denormalized
46
         */
47
        public function convert(array $data, string $class, array $context = []): array;
48
    }
49
}
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