Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 0106cc1

Browse files
committed
Import internal functions and constants
1 parent 45203c5 commit 0106cc1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+187
-0
lines changed

src/Exception/InvalidObjectException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
use InvalidArgumentException;
1111
use Zend\Expressive\Hal\HalResource;
1212

13+
use function gettype;
14+
use function sprintf;
15+
1316
class InvalidObjectException extends InvalidArgumentException implements ExceptionInterface
1417
{
1518
/**

src/Exception/InvalidResourceValueException.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
use RuntimeException;
1111
use Zend\Expressive\Hal\HalResource;
1212

13+
use function get_class;
14+
use function gettype;
15+
use function is_object;
16+
use function sprintf;
17+
1318
class InvalidResourceValueException extends RuntimeException implements ExceptionInterface
1419
{
1520
public static function fromValue($value) : self

src/Exception/InvalidStrategyException.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
use InvalidArgumentException;
1111
use Zend\Expressive\Hal\ResourceGenerator\StrategyInterface;
1212

13+
use function get_class;
14+
use function gettype;
15+
use function is_object;
16+
use function sprintf;
17+
1318
class InvalidStrategyException extends InvalidArgumentException implements ExceptionInterface
1419
{
1520
public static function forType(string $strategy) : self

src/Exception/UnknownMetadataTypeException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
use RuntimeException;
1111
use Zend\Expressive\Hal\Metadata\AbstractMetadata;
1212

13+
use function get_class;
14+
use function sprintf;
15+
1316
class UnknownMetadataTypeException extends RuntimeException implements ExceptionInterface
1417
{
1518
public static function forMetadata(AbstractMetadata $metadata) : self

src/HalResource.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,23 @@
1313
use Psr\Link\LinkInterface;
1414
use RuntimeException;
1515

16+
use function array_key_exists;
17+
use function array_keys;
18+
use function array_map;
19+
use function array_merge;
20+
use function array_push;
21+
use function array_reduce;
22+
use function array_shift;
23+
use function array_walk;
24+
use function count;
25+
use function get_class;
26+
use function gettype;
27+
use function in_array;
28+
use function is_array;
29+
use function is_object;
30+
use function sort;
31+
use function sprintf;
32+
1633
/**
1734
* Object representation of Hypertext Application Language resource.
1835
*

src/HalResponseFactory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
use Psr\Http\Message\ResponseInterface;
1212
use Psr\Http\Message\ServerRequestInterface;
1313

14+
use function strstr;
15+
1416
class HalResponseFactory
1517
{
1618
/**

src/Link.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@
1010
use InvalidArgumentException;
1111
use Psr\Link\EvolvableLinkInterface;
1212

13+
use function array_filter;
14+
use function array_reduce;
15+
use function get_class;
16+
use function gettype;
17+
use function in_array;
18+
use function is_array;
19+
use function is_object;
20+
use function is_scalar;
21+
use function is_string;
22+
use function method_exists;
23+
use function sprintf;
24+
1325
class Link implements EvolvableLinkInterface
1426
{
1527
const AS_COLLECTION = '__FORCE_COLLECTION__';

src/LinkCollection.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
use Psr\Link\EvolvableLinkProviderInterface;
1212
use Traversable;
1313

14+
use function array_filter;
15+
use function in_array;
16+
1417
/**
1518
* Properties and methods suitable for an
1619
* EvolvableLinkProviderInterface implementation.

src/LinkGenerator/ExpressiveUrlGeneratorFactory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
use Zend\Expressive\Helper\ServerUrlHelper;
1313
use Zend\Expressive\Helper\UrlHelper;
1414

15+
use function sprintf;
16+
1517
class ExpressiveUrlGeneratorFactory
1618
{
1719
public function __invoke(ContainerInterface $container) : ExpressiveUrlGenerator

src/Metadata/Exception/DuplicateMetadataException.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
use DomainException;
1111

12+
use function sprintf;
13+
1214
class DuplicateMetadataException extends DomainException implements ExceptionInterface
1315
{
1416
public static function create(string $class)

0 commit comments

Comments
 (0)