From d433d46fa3ccb2213d4f43a626c2d459554da57d Mon Sep 17 00:00:00 2001 From: ahocquard Date: Tue, 12 Feb 2019 17:24:32 +0100 Subject: [PATCH 1/3] Add typehint --- spec/Api/AssociationTypeApiSpec.php | 4 +- spec/Api/AttributeApiSpec.php | 4 +- spec/Api/AttributeGroupApiSpec.php | 4 +- spec/Api/AttributeOptionApiSpec.php | 4 +- spec/Api/CategoryApiSpec.php | 4 +- spec/Api/ChannelApiSpec.php | 4 +- spec/Api/CurrencyApiSpec.php | 4 +- spec/Api/FamilyApiSpec.php | 4 +- spec/Api/LocaleApiSpec.php | 4 +- spec/Api/MeasureFamilyApiSpec.php | 4 +- spec/Api/ProductApiSpec.php | 4 +- spec/Api/ProductMediaFileApiSpec.php | 4 +- src/AkeneoPimClient.php | 49 ++---- src/AkeneoPimClientBuilder.php | 33 ++-- src/AkeneoPimClientInterface.php | 142 ++++-------------- src/Api/AssociationTypeApi.php | 14 +- src/Api/AttributeApi.php | 14 +- src/Api/AttributeGroupApi.php | 16 +- src/Api/AttributeOptionApi.php | 14 +- src/Api/AttributeOptionApiInterface.php | 12 +- src/Api/AuthenticationApi.php | 6 +- src/Api/AuthenticationApiInterface.php | 4 +- src/Api/CategoryApi.php | 14 +- src/Api/ChannelApi.php | 14 +- src/Api/CurrencyApi.php | 8 +- src/Api/FamilyApi.php | 14 +- src/Api/FamilyVariantApi.php | 14 +- src/Api/FamilyVariantApiInterface.php | 12 +- src/Api/LocaleApi.php | 8 +- src/Api/MeasureFamilyApi.php | 8 +- src/Api/MediaFileApiInterface.php | 2 +- .../Operation/CreatableResourceInterface.php | 2 +- .../Operation/DeletableResourceInterface.php | 4 +- .../DownloadableResourceInterface.php | 3 +- .../Operation/GettableResourceInterface.php | 2 +- .../Operation/ListableResourceInterface.php | 4 +- .../Operation/UpsertableResourceInterface.php | 2 +- .../UpsertableResourceListInterface.php | 2 +- src/Api/ProductApi.php | 16 +- src/Api/ProductMediaFileApi.php | 13 +- src/Api/ProductModelApi.php | 16 +- src/Client/AuthenticatedHttpClient.php | 8 +- src/Client/HttpClient.php | 3 +- src/Client/HttpClientInterface.php | 2 +- src/Client/HttpExceptionHandler.php | 4 +- src/Client/ResourceClient.php | 29 ++-- src/Client/ResourceClientInterface.php | 20 +-- src/Exception/HttpException.php | 16 +- .../UnprocessableEntityHttpException.php | 4 +- src/FileSystem/FileSystemInterface.php | 2 +- src/FileSystem/LocalFileSystem.php | 2 +- src/Pagination/Page.php | 44 +++--- src/Pagination/PageFactory.php | 5 +- src/Pagination/PageFactoryInterface.php | 6 +- src/Pagination/PageInterface.php | 36 ++--- src/Pagination/ResourceCursor.php | 10 +- src/Pagination/ResourceCursorFactory.php | 4 +- .../ResourceCursorFactoryInterface.php | 7 +- src/Pagination/ResourceCursorInterface.php | 4 +- src/Search/SearchBuilder.php | 7 +- src/Security/Authentication.php | 64 ++------ src/Stream/LineStreamReader.php | 2 +- src/Stream/MultipartStreamBuilderFactory.php | 8 +- src/Stream/UpsertResourceListResponse.php | 4 - .../UpsertResourceListResponseFactory.php | 2 +- tests/Api/GetProductTest.php | 6 +- 66 files changed, 305 insertions(+), 504 deletions(-) diff --git a/spec/Api/AssociationTypeApiSpec.php b/spec/Api/AssociationTypeApiSpec.php index 0199df1f..776813c7 100644 --- a/spec/Api/AssociationTypeApiSpec.php +++ b/spec/Api/AssociationTypeApiSpec.php @@ -109,12 +109,12 @@ function it_returns_a_list_of_association_types_with_additional_query_parameters PageInterface $page ) { $resourceClient - ->getResources(AssociationTypeApi::ASSOCIATION_TYPES_URI, [], null, null, ['foo' => 'bar']) + ->getResources(AssociationTypeApi::ASSOCIATION_TYPES_URI, [], 10, false, ['foo' => 'bar']) ->willReturn([]); $pageFactory->createPage([])->willReturn($page); - $this->listPerPage(null, null, ['foo' => 'bar'])->shouldReturn($page); + $this->listPerPage(10, false, ['foo' => 'bar'])->shouldReturn($page); } function it_creates_an_association_type($resourceClient) diff --git a/spec/Api/AttributeApiSpec.php b/spec/Api/AttributeApiSpec.php index 2957b10b..b5db9c3c 100644 --- a/spec/Api/AttributeApiSpec.php +++ b/spec/Api/AttributeApiSpec.php @@ -101,12 +101,12 @@ function it_returns_a_cursor_on_the_list_of_attributes( function it_returns_a_list_of_attributes_with_additional_query_parameters($resourceClient, $pageFactory, PageInterface $page) { $resourceClient - ->getResources(AttributeApi::ATTRIBUTES_URI, [], null, null, ['foo' => 'bar']) + ->getResources(AttributeApi::ATTRIBUTES_URI, [], 10, false, ['foo' => 'bar']) ->willReturn([]); $pageFactory->createPage([])->willReturn($page); - $this->listPerPage(null, null, ['foo' => 'bar'])->shouldReturn($page); + $this->listPerPage(10, false, ['foo' => 'bar'])->shouldReturn($page); } function it_creates_an_attribute($resourceClient) diff --git a/spec/Api/AttributeGroupApiSpec.php b/spec/Api/AttributeGroupApiSpec.php index fceca441..aa021b8e 100644 --- a/spec/Api/AttributeGroupApiSpec.php +++ b/spec/Api/AttributeGroupApiSpec.php @@ -101,12 +101,12 @@ function it_returns_a_cursor_on_the_list_of_attribute_groups( function it_returns_a_list_of_attribute_groups_with_additional_query_parameters($resourceClient, $pageFactory, PageInterface $page) { $resourceClient - ->getResources(AttributeGroupApi::ATTRIBUTE_GROUPS_URI, [], null, null, ['foo' => 'bar']) + ->getResources(AttributeGroupApi::ATTRIBUTE_GROUPS_URI, [], 10, false, ['foo' => 'bar']) ->willReturn([]); $pageFactory->createPage([])->willReturn($page); - $this->listPerPage(null, null, ['foo' => 'bar'])->shouldReturn($page); + $this->listPerPage(10, false, ['foo' => 'bar'])->shouldReturn($page); } function it_creates_an_attribute_group($resourceClient) diff --git a/spec/Api/AttributeOptionApiSpec.php b/spec/Api/AttributeOptionApiSpec.php index c48e00cd..5ec000fa 100644 --- a/spec/Api/AttributeOptionApiSpec.php +++ b/spec/Api/AttributeOptionApiSpec.php @@ -101,12 +101,12 @@ function it_returns_a_list_of_attribute_options_with_additional_query_parameters $attributeCode = 'foo_1'; $resourceClient - ->getResources(sprintf(AttributeOptionApi::ATTRIBUTE_OPTIONS_URI, $attributeCode), [], null, null, ['foo' => 'bar']) + ->getResources(sprintf(AttributeOptionApi::ATTRIBUTE_OPTIONS_URI, $attributeCode), [], 10, false, ['foo' => 'bar']) ->willReturn([]); $pageFactory->createPage([])->willReturn($page); - $this->listPerPage($attributeCode, null, null, ['foo' => 'bar'])->shouldReturn($page); + $this->listPerPage($attributeCode, 10, false, ['foo' => 'bar'])->shouldReturn($page); } function it_creates_an_attribute_option($resourceClient) diff --git a/spec/Api/CategoryApiSpec.php b/spec/Api/CategoryApiSpec.php index f8117b96..66ae0e25 100644 --- a/spec/Api/CategoryApiSpec.php +++ b/spec/Api/CategoryApiSpec.php @@ -99,12 +99,12 @@ function it_returns_a_cursor_on_the_list_of_categories( function it_returns_a_list_of_categories_with_additional_query_parameters($resourceClient, $pageFactory, PageInterface $page) { $resourceClient - ->getResources(CategoryApi::CATEGORIES_URI, [], null, null, ['foo' => 'bar']) + ->getResources(CategoryApi::CATEGORIES_URI, [], 10, false, ['foo' => 'bar']) ->willReturn([]); $pageFactory->createPage([])->willReturn($page); - $this->listPerPage(null, null, ['foo' => 'bar'])->shouldReturn($page); + $this->listPerPage(10, false, ['foo' => 'bar'])->shouldReturn($page); } function it_creates_a_category($resourceClient) diff --git a/spec/Api/ChannelApiSpec.php b/spec/Api/ChannelApiSpec.php index 2ee1911d..a2baeeb6 100644 --- a/spec/Api/ChannelApiSpec.php +++ b/spec/Api/ChannelApiSpec.php @@ -100,12 +100,12 @@ function it_returns_a_cursor_on_the_list_of_channels( function it_returns_a_list_of_channels_with_additional_query_parameters($resourceClient, $pageFactory, PageInterface $page) { $resourceClient - ->getResources(ChannelApi::CHANNELS_URI, [], null, null, ['foo' => 'bar']) + ->getResources(ChannelApi::CHANNELS_URI, [], 10, false, ['foo' => 'bar']) ->willReturn([]); $pageFactory->createPage([])->willReturn($page); - $this->listPerPage(null, null, ['foo' => 'bar'])->shouldReturn($page); + $this->listPerPage(10, false, ['foo' => 'bar'])->shouldReturn($page); } function it_creates_a_channel($resourceClient) diff --git a/spec/Api/CurrencyApiSpec.php b/spec/Api/CurrencyApiSpec.php index 6e7e198f..cd74a84f 100644 --- a/spec/Api/CurrencyApiSpec.php +++ b/spec/Api/CurrencyApiSpec.php @@ -89,11 +89,11 @@ function it_returns_a_cursor_on_the_list_of_currencies( function it_returns_a_list_of_currencies_with_additional_query_parameters($resourceClient, $pageFactory, PageInterface $page) { $resourceClient - ->getResources(CurrencyApi::CURRENCIES_URI, [], null, null, ['foo' => 'bar']) + ->getResources(CurrencyApi::CURRENCIES_URI, [], 10, false, ['foo' => 'bar']) ->willReturn([]); $pageFactory->createPage([])->willReturn($page); - $this->listPerPage(null, null, ['foo' => 'bar'])->shouldReturn($page); + $this->listPerPage(10, false, ['foo' => 'bar'])->shouldReturn($page); } } diff --git a/spec/Api/FamilyApiSpec.php b/spec/Api/FamilyApiSpec.php index 1b74e374..58198ead 100644 --- a/spec/Api/FamilyApiSpec.php +++ b/spec/Api/FamilyApiSpec.php @@ -101,12 +101,12 @@ function it_returns_a_cursor_on_the_list_of_families( function it_returns_a_list_of_families_with_additional_query_parameters($resourceClient, $pageFactory, PageInterface $page) { $resourceClient - ->getResources(FamilyApi::FAMILIES_URI, [], null, null, ['foo' => 'bar']) + ->getResources(FamilyApi::FAMILIES_URI, [], 10, false, ['foo' => 'bar']) ->willReturn([]); $pageFactory->createPage([])->willReturn($page); - $this->listPerPage(null, null, ['foo' => 'bar'])->shouldReturn($page); + $this->listPerPage(10, false, ['foo' => 'bar'])->shouldReturn($page); } function it_creates_a_family($resourceClient) diff --git a/spec/Api/LocaleApiSpec.php b/spec/Api/LocaleApiSpec.php index ba6ad00b..3e82385e 100644 --- a/spec/Api/LocaleApiSpec.php +++ b/spec/Api/LocaleApiSpec.php @@ -87,11 +87,11 @@ function it_returns_a_cursor_on_the_list_of_locales( function it_returns_a_list_of_locales_with_additional_query_parameters($resourceClient, $pageFactory, PageInterface $page) { $resourceClient - ->getResources(LocaleApi::LOCALES_URI, [], null, null, ['foo' => 'bar']) + ->getResources(LocaleApi::LOCALES_URI, [], 10, false, ['foo' => 'bar']) ->willReturn([]); $pageFactory->createPage([])->willReturn($page); - $this->listPerPage(null, null, ['foo' => 'bar'])->shouldReturn($page); + $this->listPerPage(10, false, ['foo' => 'bar'])->shouldReturn($page); } } diff --git a/spec/Api/MeasureFamilyApiSpec.php b/spec/Api/MeasureFamilyApiSpec.php index 91255a11..2d0224ec 100644 --- a/spec/Api/MeasureFamilyApiSpec.php +++ b/spec/Api/MeasureFamilyApiSpec.php @@ -107,11 +107,11 @@ function it_returns_a_list_of_measure_families_with_additional_query_parameters( PageInterface $page ) { $resourceClient - ->getResources(MeasureFamilyApi::MEASURE_FAMILIES_URI, [], null, null, ['foo' => 'bar']) + ->getResources(MeasureFamilyApi::MEASURE_FAMILIES_URI, [], 10, false, ['foo' => 'bar']) ->willReturn([]); $pageFactory->createPage([])->willReturn($page); - $this->listPerPage(null, null, ['foo' => 'bar'])->shouldReturn($page); + $this->listPerPage(10, false, ['foo' => 'bar'])->shouldReturn($page); } } diff --git a/spec/Api/ProductApiSpec.php b/spec/Api/ProductApiSpec.php index 25a2e8b4..37491985 100644 --- a/spec/Api/ProductApiSpec.php +++ b/spec/Api/ProductApiSpec.php @@ -103,12 +103,12 @@ function it_returns_a_cursor_on_the_list_of_products( function it_returns_a_list_of_products_with_additional_query_parameters($resourceClient, $pageFactory, PageInterface $page) { $resourceClient - ->getResources(ProductApi::PRODUCTS_URI, [], null, null, ['foo' => 'bar']) + ->getResources(ProductApi::PRODUCTS_URI, [], 10, false, ['foo' => 'bar']) ->willReturn([]); $pageFactory->createPage([])->willReturn($page); - $this->listPerPage(null, null, ['foo' => 'bar'])->shouldReturn($page); + $this->listPerPage(10, false, ['foo' => 'bar'])->shouldReturn($page); } function it_creates_a_product($resourceClient) diff --git a/spec/Api/ProductMediaFileApiSpec.php b/spec/Api/ProductMediaFileApiSpec.php index e8f89930..c401b2f1 100644 --- a/spec/Api/ProductMediaFileApiSpec.php +++ b/spec/Api/ProductMediaFileApiSpec.php @@ -98,12 +98,12 @@ function it_returns_a_cursor_on_the_list_of_media_files( function it_returns_a_list_of_media_files_with_additional_query_parameters($resourceClient, $pageFactory, PageInterface $page) { $resourceClient - ->getResources(ProductMediaFileApi::MEDIA_FILES_URI, [], null, null, ['foo' => 'bar']) + ->getResources(ProductMediaFileApi::MEDIA_FILES_URI, [], 10, false, ['foo' => 'bar']) ->willReturn([]); $pageFactory->createPage([])->willReturn($page); - $this->listPerPage(null, null, ['foo' => 'bar'])->shouldReturn($page); + $this->listPerPage(10, false, ['foo' => 'bar'])->shouldReturn($page); } function it_creates_a_media_file_from_a_path($resourceClient, $fileSystem, ResponseInterface $response) diff --git a/src/AkeneoPimClient.php b/src/AkeneoPimClient.php index 9fa00ebf..28bfe07b 100644 --- a/src/AkeneoPimClient.php +++ b/src/AkeneoPimClient.php @@ -72,23 +72,6 @@ class AkeneoPimClient implements AkeneoPimClientInterface /** @var ProductModelApiInterface */ protected $productModelApi; - /** - * @param Authentication $authentication - * @param ProductApiInterface $productApi - * @param CategoryApiInterface $categoryApi - * @param AttributeApiInterface $attributeApi - * @param AttributeOptionApiInterface $attributeOptionApi - * @param AttributeGroupApiInterface $attributeGroupApi - * @param FamilyApiInterface $familyApi - * @param MediaFileApiInterface $productMediaFileApi - * @param LocaleApiInterface $localeApi - * @param ChannelApiInterface $channelApi - * @param CurrencyApiInterface $currencyApi - * @param MeasureFamilyApiInterface $measureFamilyApi - * @param AssociationTypeApiInterface $associationTypeApi - * @param FamilyVariantApiInterface $familyVariantApi - * @param ProductModelApiInterface $productModelApi - */ public function __construct( Authentication $authentication, ProductApiInterface $productApi, @@ -126,7 +109,7 @@ public function __construct( /** * {@inheritdoc} */ - public function getToken() + public function getToken(): ?string { return $this->authentication->getAccessToken(); } @@ -134,7 +117,7 @@ public function getToken() /** * {@inheritdoc} */ - public function getRefreshToken() + public function getRefreshToken(): ?string { return $this->authentication->getRefreshToken(); } @@ -142,7 +125,7 @@ public function getRefreshToken() /** * {@inheritdoc} */ - public function getProductApi() + public function getProductApi(): ProductApiInterface { return $this->productApi; } @@ -150,7 +133,7 @@ public function getProductApi() /** * {@inheritdoc} */ - public function getCategoryApi() + public function getCategoryApi(): CategoryApiInterface { return $this->categoryApi; } @@ -158,7 +141,7 @@ public function getCategoryApi() /** * {@inheritdoc} */ - public function getAttributeApi() + public function getAttributeApi(): AttributeApiInterface { return $this->attributeApi; } @@ -166,7 +149,7 @@ public function getAttributeApi() /** * {@inheritdoc} */ - public function getAttributeOptionApi() + public function getAttributeOptionApi(): AttributeOptionApiInterface { return $this->attributeOptionApi; } @@ -174,7 +157,7 @@ public function getAttributeOptionApi() /** * {@inheritdoc} */ - public function getAttributeGroupApi() + public function getAttributeGroupApi(): AttributeGroupApiInterface { return $this->attributeGroupApi; } @@ -182,7 +165,7 @@ public function getAttributeGroupApi() /** * {@inheritdoc} */ - public function getFamilyApi() + public function getFamilyApi(): FamilyApiInterface { return $this->familyApi; } @@ -190,7 +173,7 @@ public function getFamilyApi() /** * {@inheritdoc} */ - public function getProductMediaFileApi() + public function getProductMediaFileApi(): MediaFileApiInterface { return $this->productMediaFileApi; } @@ -198,7 +181,7 @@ public function getProductMediaFileApi() /** * {@inheritdoc} */ - public function getLocaleApi() + public function getLocaleApi(): LocaleApiInterface { return $this->localeApi; } @@ -206,7 +189,7 @@ public function getLocaleApi() /** * {@inheritdoc} */ - public function getChannelApi() + public function getChannelApi(): ChannelApiInterface { return $this->channelApi; } @@ -214,7 +197,7 @@ public function getChannelApi() /** * {@inheritdoc} */ - public function getCurrencyApi() + public function getCurrencyApi(): CurrencyApiInterface { return $this->currencyApi; } @@ -222,7 +205,7 @@ public function getCurrencyApi() /** * {@inheritdoc} */ - public function getMeasureFamilyApi() + public function getMeasureFamilyApi(): MeasureFamilyApiInterface { return $this->measureFamilyApi; } @@ -230,7 +213,7 @@ public function getMeasureFamilyApi() /** * {@inheritdoc} */ - public function getAssociationTypeApi() + public function getAssociationTypeApi(): AssociationTypeApiInterface { return $this->associationTypeApi; } @@ -238,7 +221,7 @@ public function getAssociationTypeApi() /** * {@inheritdoc} */ - public function getFamilyVariantApi() + public function getFamilyVariantApi(): FamilyVariantApiInterface { return $this->familyVariantApi; } @@ -246,7 +229,7 @@ public function getFamilyVariantApi() /** * {@inheritdoc} */ - public function getProductModelApi() + public function getProductModelApi(): ProductModelApiInterface { return $this->productModelApi; } diff --git a/src/AkeneoPimClientBuilder.php b/src/AkeneoPimClientBuilder.php index d18b1bb5..d77b2a45 100644 --- a/src/AkeneoPimClientBuilder.php +++ b/src/AkeneoPimClientBuilder.php @@ -63,7 +63,7 @@ class AkeneoPimClientBuilder /** * @param string $baseUri Base uri to request the API */ - public function __construct($baseUri) + public function __construct(string $baseUri) { $this->baseUri = $baseUri; } @@ -75,7 +75,7 @@ public function __construct($baseUri) * * @return AkeneoPimClientBuilder */ - public function setHttpClient(Client $httpClient) + public function setHttpClient(Client $httpClient): self { $this->httpClient = $httpClient; @@ -89,7 +89,7 @@ public function setHttpClient(Client $httpClient) * * @return AkeneoPimClientBuilder */ - public function setRequestFactory($requestFactory) + public function setRequestFactory(RequestFactory $requestFactory): self { $this->requestFactory = $requestFactory; @@ -103,7 +103,7 @@ public function setRequestFactory($requestFactory) * * @return AkeneoPimClientBuilder */ - public function setStreamFactory($streamFactory) + public function setStreamFactory(StreamFactory $streamFactory): self { $this->streamFactory = $streamFactory; @@ -117,7 +117,7 @@ public function setStreamFactory($streamFactory) * * @return AkeneoPimClientBuilder */ - public function setFileSystem($fileSystem) + public function setFileSystem(FileSystemInterface $fileSystem): self { $this->fileSystem = $fileSystem; @@ -134,7 +134,7 @@ public function setFileSystem($fileSystem) * * @return AkeneoPimClientInterface */ - public function buildAuthenticatedByPassword($clientId, $secret, $username, $password) + public function buildAuthenticatedByPassword(string $clientId, string $secret, string $username, string $password): AkeneoPimClientInterface { $authentication = Authentication::fromPassword($clientId, $secret, $username, $password); @@ -151,7 +151,7 @@ public function buildAuthenticatedByPassword($clientId, $secret, $username, $pas * * @return AkeneoPimClientInterface */ - public function buildAuthenticatedByToken($clientId, $secret, $token, $refreshToken) + public function buildAuthenticatedByToken(string $clientId, string $secret, string $token, string $refreshToken): AkeneoPimClientInterface { $authentication = Authentication::fromToken($clientId, $secret, $token, $refreshToken); @@ -163,7 +163,7 @@ public function buildAuthenticatedByToken($clientId, $secret, $token, $refreshTo * * @return AkeneoPimClientInterface */ - protected function buildAuthenticatedClient(Authentication $authentication) + protected function buildAuthenticatedClient(Authentication $authentication): AkeneoPimClientInterface { list($resourceClient, $pageFactory, $cursorFactory, $fileSystem) = $this->setUp($authentication); @@ -193,7 +193,7 @@ protected function buildAuthenticatedClient(Authentication $authentication) * * @return array */ - protected function setUp(Authentication $authentication) + protected function setUp(Authentication $authentication): array { $uriGenerator = new UriGenerator($this->baseUri); @@ -217,10 +217,7 @@ protected function setUp(Authentication $authentication) return [$resourceClient, $pageFactory, $cursorFactory, $fileSystem]; } - /** - * @return Client - */ - private function getHttpClient() + private function getHttpClient(): Client { if (null === $this->httpClient) { $this->httpClient = HttpClientDiscovery::find(); @@ -229,10 +226,7 @@ private function getHttpClient() return $this->httpClient; } - /** - * @return RequestFactory - */ - private function getRequestFactory() + private function getRequestFactory(): RequestFactory { if (null === $this->requestFactory) { $this->requestFactory = MessageFactoryDiscovery::find(); @@ -241,10 +235,7 @@ private function getRequestFactory() return $this->requestFactory; } - /** - * @return StreamFactory - */ - private function getStreamFactory() + private function getStreamFactory(): StreamFactory { if (null === $this->streamFactory) { $this->streamFactory = StreamFactoryDiscovery::find(); diff --git a/src/AkeneoPimClientInterface.php b/src/AkeneoPimClientInterface.php index f085af48..6b22f0ae 100644 --- a/src/AkeneoPimClientInterface.php +++ b/src/AkeneoPimClientInterface.php @@ -26,115 +26,35 @@ */ interface AkeneoPimClientInterface { - /** - * Gets the authentication access token - * - * @return null|string - */ - public function getToken(); - - /** - * Gets the authentication refresh token - * - * @return null|string - */ - public function getRefreshToken(); - - /** - * Gets the product API - * - * @return ProductApiInterface - */ - public function getProductApi(); - - /** - * Gets the category API. - * - * @return CategoryApiInterface - */ - public function getCategoryApi(); - - /** - * Gets the attribute API. - * - * @return AttributeApiInterface - */ - public function getAttributeApi(); - - /** - * Gets the attribute option API. - * - * @return AttributeOptionApiInterface - */ - public function getAttributeOptionApi(); - - /** - * Gets the attribute group API. - * - * @return AttributeGroupApiInterface - */ - public function getAttributeGroupApi(); - - /** - * Gets the family API. - * - * @return FamilyApiInterface - */ - public function getFamilyApi(); - - /** - * Gets the product media file API. - * - * @return MediaFileApiInterface - */ - public function getProductMediaFileApi(); - - /** - * Gets the locale API. - * - * @return LocaleApiInterface - */ - public function getLocaleApi(); - - /** - * Gets the channel API. - * - * @return ChannelApiInterface - */ - public function getChannelApi(); - - /** - * Gets the currency API. - * - * @return CurrencyApiInterface - */ - public function getCurrencyApi(); - - /** - * Gets the measure family API. - * - * @return MeasureFamilyApiInterface - */ - public function getMeasureFamilyApi(); - - /** - * Gets the association type API. - * - * @return AssociationTypeApiInterface - */ - public function getAssociationTypeApi(); - - /** - * Gets the family variant API. - * - * @return FamilyVariantApiInterface - */ - public function getFamilyVariantApi(); - - /** - * Gets the product model API. - * - * @return ProductModelApiInterface - */ - public function getProductModelApi(); + public function getToken(): ?string; + + public function getRefreshToken(): ?string; + + public function getProductApi(): ProductApiInterface; + + public function getCategoryApi(): CategoryApiInterface; + + public function getAttributeApi(): AttributeApiInterface; + + public function getAttributeOptionApi(): AttributeOptionApiInterface; + + public function getAttributeGroupApi(): AttributeGroupApiInterface; + + public function getFamilyApi(): FamilyApiInterface; + + public function getProductMediaFileApi(): MediaFileApiInterface; + + public function getLocaleApi(): LocaleApiInterface; + + public function getChannelApi(): ChannelApiInterface; + + public function getCurrencyApi(): CurrencyApiInterface; + + public function getMeasureFamilyApi(): MeasureFamilyApiInterface; + + public function getAssociationTypeApi(): AssociationTypeApiInterface; + + public function getFamilyVariantApi(): FamilyVariantApiInterface; + + public function getProductModelApi(): ProductModelApiInterface; } diff --git a/src/Api/AssociationTypeApi.php b/src/Api/AssociationTypeApi.php index 8bbeb76b..14da7447 100644 --- a/src/Api/AssociationTypeApi.php +++ b/src/Api/AssociationTypeApi.php @@ -5,7 +5,9 @@ use Akeneo\Pim\ApiClient\Client\ResourceClientInterface; use Akeneo\Pim\ApiClient\Exception\InvalidArgumentException; use Akeneo\Pim\ApiClient\Pagination\PageFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\PageInterface; use Akeneo\Pim\ApiClient\Pagination\ResourceCursorFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface; /** * @author Philippe Mossière @@ -43,7 +45,7 @@ public function __construct( /** * {@inheritdoc} */ - public function get($code) + public function get(string $code): array { return $this->resourceClient->getResource(static::ASSOCIATION_TYPE_URI, [$code]); } @@ -51,7 +53,7 @@ public function get($code) /** * {@inheritdoc} */ - public function listPerPage($limit = 10, $withCount = false, array $queryParameters = []) + public function listPerPage(int $limit = 10, bool $withCount = false, array $queryParameters = []): PageInterface { $data = $this->resourceClient->getResources(static::ASSOCIATION_TYPES_URI, [], $limit, $withCount, $queryParameters); @@ -61,7 +63,7 @@ public function listPerPage($limit = 10, $withCount = false, array $queryParamet /** * {@inheritdoc} */ - public function all($pageSize = 10, array $queryParameters = []) + public function all(int $pageSize = 10, array $queryParameters = []): ResourceCursorInterface { $firstPage = $this->listPerPage($pageSize, false, $queryParameters); @@ -71,7 +73,7 @@ public function all($pageSize = 10, array $queryParameters = []) /** * {@inheritdoc} */ - public function create($code, array $data = []) + public function create(string $code, array $data = []): int { if (array_key_exists('code', $data)) { throw new InvalidArgumentException('The parameter "code" should not be defined in the data parameter'); @@ -85,7 +87,7 @@ public function create($code, array $data = []) /** * {@inheritdoc} */ - public function upsert($code, array $data = []) + public function upsert(string $code, array $data = []): int { return $this->resourceClient->upsertResource(static::ASSOCIATION_TYPE_URI, [$code], $data); } @@ -93,7 +95,7 @@ public function upsert($code, array $data = []) /** * {@inheritdoc} */ - public function upsertList($associationTypes) + public function upsertList($associationTypes): \Traversable { return $this->resourceClient->upsertStreamResourceList(static::ASSOCIATION_TYPES_URI, [], $associationTypes); } diff --git a/src/Api/AttributeApi.php b/src/Api/AttributeApi.php index d7b0368f..d92455f4 100644 --- a/src/Api/AttributeApi.php +++ b/src/Api/AttributeApi.php @@ -5,7 +5,9 @@ use Akeneo\Pim\ApiClient\Client\ResourceClientInterface; use Akeneo\Pim\ApiClient\Exception\InvalidArgumentException; use Akeneo\Pim\ApiClient\Pagination\PageFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\PageInterface; use Akeneo\Pim\ApiClient\Pagination\ResourceCursorFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface; /** * API implementation to manage the attributes. @@ -46,7 +48,7 @@ public function __construct( /** * {@inheritdoc} */ - public function get($code) + public function get(string $code): array { return $this->resourceClient->getResource(static::ATTRIBUTE_URI, [$code]); } @@ -54,7 +56,7 @@ public function get($code) /** * {@inheritdoc} */ - public function listPerPage($limit = 10, $withCount = false, array $queryParameters = []) + public function listPerPage(int $limit = 10, bool $withCount = false, array $queryParameters = []): PageInterface { $data = $this->resourceClient->getResources(static::ATTRIBUTES_URI, [], $limit, $withCount, $queryParameters); @@ -64,7 +66,7 @@ public function listPerPage($limit = 10, $withCount = false, array $queryParamet /** * {@inheritdoc} */ - public function all($pageSize = 10, array $queryParameters = []) + public function all(int $pageSize = 10, array $queryParameters = []): ResourceCursorInterface { $firstPage = $this->listPerPage($pageSize, false, $queryParameters); @@ -74,7 +76,7 @@ public function all($pageSize = 10, array $queryParameters = []) /** * {@inheritdoc} */ - public function create($code, array $data = []) + public function create(string $code, array $data = []): int { if (array_key_exists('code', $data)) { throw new InvalidArgumentException('The parameter "code" should not be defined in the data parameter'); @@ -88,7 +90,7 @@ public function create($code, array $data = []) /** * {@inheritdoc} */ - public function upsert($code, array $data = []) + public function upsert(string $code, array $data = []): int { return $this->resourceClient->upsertResource(static::ATTRIBUTE_URI, [$code], $data); } @@ -96,7 +98,7 @@ public function upsert($code, array $data = []) /** * {@inheritdoc} */ - public function upsertList($attributes) + public function upsertList($attributes): \Traversable { return $this->resourceClient->upsertStreamResourceList(static::ATTRIBUTES_URI, [], $attributes); } diff --git a/src/Api/AttributeGroupApi.php b/src/Api/AttributeGroupApi.php index 882a9095..b0865cef 100644 --- a/src/Api/AttributeGroupApi.php +++ b/src/Api/AttributeGroupApi.php @@ -3,11 +3,11 @@ namespace Akeneo\Pim\ApiClient\Api; use Akeneo\Pim\ApiClient\Client\ResourceClientInterface; -use Akeneo\Pim\ApiClient\Exception\HttpException; use Akeneo\Pim\ApiClient\Exception\InvalidArgumentException; use Akeneo\Pim\ApiClient\Pagination\PageFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\PageInterface; use Akeneo\Pim\ApiClient\Pagination\ResourceCursorFactoryInterface; -use Psr\Http\Message\StreamInterface; +use Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface; /** * API implementation to manage attribute groups. @@ -48,7 +48,7 @@ public function __construct( /** * {@inheritdoc} */ - public function get($code) + public function get(string $code): array { return $this->resourceClient->getResource(static::ATTRIBUTE_GROUP_URI, [$code]); } @@ -56,7 +56,7 @@ public function get($code) /** * {@inheritdoc} */ - public function listPerPage($limit = 10, $withCount = false, array $queryParameters = []) + public function listPerPage(int $limit = 10, bool $withCount = false, array $queryParameters = []): PageInterface { $data = $this->resourceClient->getResources(static::ATTRIBUTE_GROUPS_URI, [], $limit, $withCount, $queryParameters); @@ -66,7 +66,7 @@ public function listPerPage($limit = 10, $withCount = false, array $queryParamet /** * {@inheritdoc} */ - public function all($pageSize = 10, array $queryParameters = []) + public function all(int $pageSize = 10, array $queryParameters = []): ResourceCursorInterface { $firstPage = $this->listPerPage($pageSize, false, $queryParameters); @@ -76,7 +76,7 @@ public function all($pageSize = 10, array $queryParameters = []) /** * {@inheritdoc} */ - public function create($code, array $data = []) + public function create(string $code, array $data = []): int { if (array_key_exists('code', $data)) { throw new InvalidArgumentException('The parameter "code" should not be defined in the data parameter'); @@ -90,7 +90,7 @@ public function create($code, array $data = []) /** * {@inheritdoc} */ - public function upsert($code, array $data = []) + public function upsert(string $code, array $data = []): int { return $this->resourceClient->upsertResource(static::ATTRIBUTE_GROUP_URI, [$code], $data); } @@ -98,7 +98,7 @@ public function upsert($code, array $data = []) /** * {@inheritdoc} */ - public function upsertList($attributeGroups) + public function upsertList($attributeGroups): \Traversable { return $this->resourceClient->upsertStreamResourceList(static::ATTRIBUTE_GROUPS_URI, [], $attributeGroups); } diff --git a/src/Api/AttributeOptionApi.php b/src/Api/AttributeOptionApi.php index 98b5680b..f818194a 100644 --- a/src/Api/AttributeOptionApi.php +++ b/src/Api/AttributeOptionApi.php @@ -5,7 +5,9 @@ use Akeneo\Pim\ApiClient\Client\ResourceClientInterface; use Akeneo\Pim\ApiClient\Exception\InvalidArgumentException; use Akeneo\Pim\ApiClient\Pagination\PageFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\PageInterface; use Akeneo\Pim\ApiClient\Pagination\ResourceCursorFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface; /** * API implementation to manage the attribute options. @@ -46,7 +48,7 @@ public function __construct( /** * {@inheritdoc} */ - public function get($attributeCode, $code) + public function get($attributeCode, $code): array { return $this->resourceClient->getResource(static::ATTRIBUTE_OPTION_URI, [$attributeCode, $code]); } @@ -54,7 +56,7 @@ public function get($attributeCode, $code) /** * {@inheritdoc} */ - public function listPerPage($attributeCode, $limit = 10, $withCount = false, array $queryParameters = []) + public function listPerPage($attributeCode, $limit = 10, $withCount = false, array $queryParameters = []): PageInterface { $uri = sprintf(static::ATTRIBUTE_OPTIONS_URI, $attributeCode); $data = $this->resourceClient->getResources($uri, [], $limit, $withCount, $queryParameters); @@ -65,7 +67,7 @@ public function listPerPage($attributeCode, $limit = 10, $withCount = false, arr /** * {@inheritdoc} */ - public function all($attributeCode, $pageSize = 10, array $queryParameters = []) + public function all($attributeCode, $pageSize = 10, array $queryParameters = []): ResourceCursorInterface { $firstPage = $this->listPerPage($attributeCode, $pageSize, false, $queryParameters); @@ -75,7 +77,7 @@ public function all($attributeCode, $pageSize = 10, array $queryParameters = []) /** * {@inheritdoc} */ - public function create($attributeCode, $attributeOptionCode, array $data = []) + public function create($attributeCode, $attributeOptionCode, array $data = []): int { if (array_key_exists('code', $data)) { throw new InvalidArgumentException('The parameter "code" should not be defined in the data parameter'); @@ -94,7 +96,7 @@ public function create($attributeCode, $attributeOptionCode, array $data = []) /** * {@inheritdoc} */ - public function upsert($attributeCode, $attributeOptionCode, array $data = []) + public function upsert($attributeCode, $attributeOptionCode, array $data = []): int { return $this->resourceClient->upsertResource(static::ATTRIBUTE_OPTION_URI, [$attributeCode, $attributeOptionCode], $data); } @@ -102,7 +104,7 @@ public function upsert($attributeCode, $attributeOptionCode, array $data = []) /** * {@inheritdoc} */ - public function upsertList($attributeCode, $attributeOptions) + public function upsertList($attributeCode, $attributeOptions): \Traversable { return $this->resourceClient->upsertStreamResourceList(static::ATTRIBUTE_OPTIONS_URI, [$attributeCode], $attributeOptions); } diff --git a/src/Api/AttributeOptionApiInterface.php b/src/Api/AttributeOptionApiInterface.php index c0884bff..9d56e5a5 100644 --- a/src/Api/AttributeOptionApiInterface.php +++ b/src/Api/AttributeOptionApiInterface.php @@ -26,7 +26,7 @@ interface AttributeOptionApiInterface * * @return array */ - public function get($attributeCode, $code); + public function get($attributeCode, $code): array; /** * Gets a list of attribute options by returning the first page. @@ -43,7 +43,7 @@ public function get($attributeCode, $code); * * @return PageInterface */ - public function listPerPage($attributeCode, $limit = 10, $withCount = false, array $queryParameters = []); + public function listPerPage($attributeCode, $limit = 10, $withCount = false, array $queryParameters = []): PageInterface; /** * Gets a cursor to iterate over a list of attribute options. @@ -57,7 +57,7 @@ public function listPerPage($attributeCode, $limit = 10, $withCount = false, arr * * @return ResourceCursorInterface */ - public function all($attributeCode, $pageSize = 10, array $queryParameters = []); + public function all($attributeCode, $pageSize = 10, array $queryParameters = []): ResourceCursorInterface; /** * Creates an attribute option. @@ -71,7 +71,7 @@ public function all($attributeCode, $pageSize = 10, array $queryParameters = []) * * @return int returns 201 if the attribute option has been created */ - public function create($attributeCode, $attributeOptionCode, array $data = []); + public function create($attributeCode, $attributeOptionCode, array $data = []): int; /** * Creates an attribute option if it does not exist yet, otherwise updates partially the attribute option. @@ -84,7 +84,7 @@ public function create($attributeCode, $attributeOptionCode, array $data = []); * * @return int returns either http code 201 if the attribute option has been created or 204 if it has been updated */ - public function upsert($attributeCode, $attributeOptionCode, array $data = []); + public function upsert($attributeCode, $attributeOptionCode, array $data = []): int; /** * Updates or creates several attribute options at once. @@ -96,5 +96,5 @@ public function upsert($attributeCode, $attributeOptionCode, array $data = []); * * @return \Traversable returns an iterable object, each entry corresponding to the response of the upserted attribute options */ - public function upsertList($attributeCode, $attributeOptions); + public function upsertList($attributeCode, $attributeOptions): \Traversable; } diff --git a/src/Api/AuthenticationApi.php b/src/Api/AuthenticationApi.php index 821e6796..c8ce743e 100644 --- a/src/Api/AuthenticationApi.php +++ b/src/Api/AuthenticationApi.php @@ -35,7 +35,7 @@ public function __construct(HttpClient $httpClient, UriGeneratorInterface $uriGe /** * {@inheritdoc} */ - public function authenticateByPassword($clientId, $secret, $username, $password) + public function authenticateByPassword($clientId, $secret, $username, $password): array { $requestBody = [ 'grant_type' => 'password', @@ -49,7 +49,7 @@ public function authenticateByPassword($clientId, $secret, $username, $password) /** * {@inheritdoc} */ - public function authenticateByRefreshToken($clientId, $secret, $refreshToken) + public function authenticateByRefreshToken($clientId, $secret, $refreshToken): array { $requestBody = [ 'grant_type' => 'refresh_token', @@ -68,7 +68,7 @@ public function authenticateByRefreshToken($clientId, $secret, $refreshToken) * * @return array returns the body of the response containing access token and refresh token */ - protected function authenticate($clientId, $secret, array $requestBody) + protected function authenticate($clientId, $secret, array $requestBody): array { $headers = [ 'Content-Type' => 'application/json', diff --git a/src/Api/AuthenticationApiInterface.php b/src/Api/AuthenticationApiInterface.php index 7a18ab7b..9ff02240 100644 --- a/src/Api/AuthenticationApiInterface.php +++ b/src/Api/AuthenticationApiInterface.php @@ -21,7 +21,7 @@ interface AuthenticationApiInterface * * @return array */ - public function authenticateByPassword($clientId, $secret, $username, $password); + public function authenticateByPassword($clientId, $secret, $username, $password): array; /** * Authenticates with the refresh token grant type. @@ -32,5 +32,5 @@ public function authenticateByPassword($clientId, $secret, $username, $password) * * @return array */ - public function authenticateByRefreshToken($clientId, $secret, $refreshToken); + public function authenticateByRefreshToken($clientId, $secret, $refreshToken): array; } diff --git a/src/Api/CategoryApi.php b/src/Api/CategoryApi.php index 257a76ca..0b43536a 100644 --- a/src/Api/CategoryApi.php +++ b/src/Api/CategoryApi.php @@ -5,7 +5,9 @@ use Akeneo\Pim\ApiClient\Client\ResourceClientInterface; use Akeneo\Pim\ApiClient\Exception\InvalidArgumentException; use Akeneo\Pim\ApiClient\Pagination\PageFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\PageInterface; use Akeneo\Pim\ApiClient\Pagination\ResourceCursorFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface; /** * API implementation to manage the categories. @@ -46,7 +48,7 @@ public function __construct( /** * {@inheritdoc} */ - public function get($code) + public function get(string $code): array { return $this->resourceClient->getResource(static::CATEGORY_URI, [$code]); } @@ -54,7 +56,7 @@ public function get($code) /** * {@inheritdoc} */ - public function listPerPage($limit = 10, $withCount = false, array $queryParameters = []) + public function listPerPage(int $limit = 10, bool $withCount = false, array $queryParameters = []): PageInterface { $data = $this->resourceClient->getResources(static::CATEGORIES_URI, [], $limit, $withCount, $queryParameters); @@ -64,7 +66,7 @@ public function listPerPage($limit = 10, $withCount = false, array $queryParamet /** * {@inheritdoc} */ - public function all($pageSize = 10, array $queryParameters = []) + public function all(int $pageSize = 10, array $queryParameters = []): ResourceCursorInterface { $firstPage = $this->listPerPage($pageSize, false, $queryParameters); @@ -74,7 +76,7 @@ public function all($pageSize = 10, array $queryParameters = []) /** * {@inheritdoc} */ - public function create($code, array $data = []) + public function create(string $code, array $data = []): int { if (array_key_exists('code', $data)) { throw new InvalidArgumentException('The parameter "code" should not be defined in the data parameter'); @@ -88,7 +90,7 @@ public function create($code, array $data = []) /** * {@inheritdoc} */ - public function upsert($code, array $data = []) + public function upsert(string $code, array $data = []): int { return $this->resourceClient->upsertResource(static::CATEGORY_URI, [$code], $data); } @@ -96,7 +98,7 @@ public function upsert($code, array $data = []) /** * {@inheritdoc} */ - public function upsertList($categories) + public function upsertList($categories): \Traversable { return $this->resourceClient->upsertStreamResourceList(static::CATEGORIES_URI, [], $categories); } diff --git a/src/Api/ChannelApi.php b/src/Api/ChannelApi.php index d260c122..a4d94336 100644 --- a/src/Api/ChannelApi.php +++ b/src/Api/ChannelApi.php @@ -5,7 +5,9 @@ use Akeneo\Pim\ApiClient\Client\ResourceClientInterface; use Akeneo\Pim\ApiClient\Exception\InvalidArgumentException; use Akeneo\Pim\ApiClient\Pagination\PageFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\PageInterface; use Akeneo\Pim\ApiClient\Pagination\ResourceCursorFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface; /** * API implementation to manage the channels. @@ -46,7 +48,7 @@ public function __construct( /** * {@inheritdoc} */ - public function get($code) + public function get(string $code): array { return $this->resourceClient->getResource(static::CHANNEL_URI, [$code]); } @@ -54,7 +56,7 @@ public function get($code) /** * {@inheritdoc} */ - public function listPerPage($limit = 10, $withCount = false, array $queryParameters = []) + public function listPerPage(int $limit = 10, bool $withCount = false, array $queryParameters = []): PageInterface { $data = $this->resourceClient->getResources(static::CHANNELS_URI, [], $limit, $withCount, $queryParameters); @@ -64,7 +66,7 @@ public function listPerPage($limit = 10, $withCount = false, array $queryParamet /** * {@inheritdoc} */ - public function all($pageSize = 10, array $queryParameters = []) + public function all(int $pageSize = 10, array $queryParameters = []): ResourceCursorInterface { $firstPage = $this->listPerPage($pageSize, false, $queryParameters); @@ -74,7 +76,7 @@ public function all($pageSize = 10, array $queryParameters = []) /** * {@inheritdoc} */ - public function create($code, array $data = []) + public function create(string $code, array $data = []): int { if (array_key_exists('code', $data)) { throw new InvalidArgumentException('The parameter "code" should not be defined in the data parameter'); @@ -88,7 +90,7 @@ public function create($code, array $data = []) /** * {@inheritdoc} */ - public function upsert($code, array $data = []) + public function upsert(string $code, array $data = []): int { return $this->resourceClient->upsertResource(static::CHANNEL_URI, [$code], $data); } @@ -96,7 +98,7 @@ public function upsert($code, array $data = []) /** * {@inheritdoc} */ - public function upsertList($channels) + public function upsertList($channels): \Traversable { return $this->resourceClient->upsertStreamResourceList(static::CHANNELS_URI, [], $channels); } diff --git a/src/Api/CurrencyApi.php b/src/Api/CurrencyApi.php index 04ac7347..7f4e4c66 100644 --- a/src/Api/CurrencyApi.php +++ b/src/Api/CurrencyApi.php @@ -4,7 +4,9 @@ use Akeneo\Pim\ApiClient\Client\ResourceClientInterface; use Akeneo\Pim\ApiClient\Pagination\PageFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\PageInterface; use Akeneo\Pim\ApiClient\Pagination\ResourceCursorFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface; /** * API implementation to manage currencies. @@ -45,7 +47,7 @@ public function __construct( /** * {@inheritdoc} */ - public function get($code) + public function get(string $code): array { return $this->resourceClient->getResource(static::CURRENCY_URI, [$code]); } @@ -53,7 +55,7 @@ public function get($code) /** * {@inheritdoc} */ - public function listPerPage($limit = 10, $withCount = false, array $queryParameters = []) + public function listPerPage(int $limit = 10, bool $withCount = false, array $queryParameters = []): PageInterface { $data = $this->resourceClient->getResources(static::CURRENCIES_URI, [], $limit, $withCount, $queryParameters); @@ -63,7 +65,7 @@ public function listPerPage($limit = 10, $withCount = false, array $queryParamet /** * {@inheritdoc} */ - public function all($pageSize = 10, array $queryParameters = []) + public function all(int $pageSize = 10, array $queryParameters = []): ResourceCursorInterface { $firstPage = $this->listPerPage($pageSize, false, $queryParameters); diff --git a/src/Api/FamilyApi.php b/src/Api/FamilyApi.php index aa42ea7f..bc175473 100644 --- a/src/Api/FamilyApi.php +++ b/src/Api/FamilyApi.php @@ -5,7 +5,9 @@ use Akeneo\Pim\ApiClient\Client\ResourceClientInterface; use Akeneo\Pim\ApiClient\Exception\InvalidArgumentException; use Akeneo\Pim\ApiClient\Pagination\PageFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\PageInterface; use Akeneo\Pim\ApiClient\Pagination\ResourceCursorFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface; /** * API implementation to manage the families. @@ -46,7 +48,7 @@ public function __construct( /** * {@inheritdoc} */ - public function get($code) + public function get(string $code): array { return $this->resourceClient->getResource(static::FAMILY_URI, [$code]); } @@ -54,7 +56,7 @@ public function get($code) /** * {@inheritdoc} */ - public function listPerPage($limit = 10, $withCount = false, array $queryParameters = []) + public function listPerPage(int $limit = 10, bool $withCount = false, array $queryParameters = []): PageInterface { $data = $this->resourceClient->getResources(static::FAMILIES_URI, [], $limit, $withCount, $queryParameters); @@ -64,7 +66,7 @@ public function listPerPage($limit = 10, $withCount = false, array $queryParamet /** * {@inheritdoc} */ - public function all($pageSize = 10, array $queryParameters = []) + public function all(int $pageSize = 10, array $queryParameters = []): ResourceCursorInterface { $firstPage = $this->listPerPage($pageSize, false, $queryParameters); @@ -74,7 +76,7 @@ public function all($pageSize = 10, array $queryParameters = []) /** * {@inheritdoc} */ - public function create($code, array $data = []) + public function create(string $code, array $data = []): int { if (array_key_exists('code', $data)) { throw new InvalidArgumentException('The parameter "code" should not be defined in the data parameter'); @@ -88,7 +90,7 @@ public function create($code, array $data = []) /** * {@inheritdoc} */ - public function upsert($code, array $data = []) + public function upsert(string $code, array $data = []): int { return $this->resourceClient->upsertResource(static::FAMILY_URI, [$code], $data); } @@ -96,7 +98,7 @@ public function upsert($code, array $data = []) /** * {@inheritdoc} */ - public function upsertList($families) + public function upsertList($families): \Traversable { return $this->resourceClient->upsertStreamResourceList(static::FAMILIES_URI, [], $families); } diff --git a/src/Api/FamilyVariantApi.php b/src/Api/FamilyVariantApi.php index 8a9db818..d3e6847d 100644 --- a/src/Api/FamilyVariantApi.php +++ b/src/Api/FamilyVariantApi.php @@ -5,7 +5,9 @@ use Akeneo\Pim\ApiClient\Client\ResourceClientInterface; use Akeneo\Pim\ApiClient\Exception\InvalidArgumentException; use Akeneo\Pim\ApiClient\Pagination\PageFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\PageInterface; use Akeneo\Pim\ApiClient\Pagination\ResourceCursorFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface; /** * Api implementation to manages Family Variants @@ -46,7 +48,7 @@ public function __construct( /** * {@inheritdoc} */ - public function get($familyCode, $familyVariantCode) + public function get($familyCode, $familyVariantCode): array { return $this->resourceClient->getResource(static::FAMILY_VARIANT_URI, [$familyCode, $familyVariantCode]); } @@ -54,7 +56,7 @@ public function get($familyCode, $familyVariantCode) /** * {@inheritdoc} */ - public function create($familyCode, $familyVariantCode, array $data = []) + public function create($familyCode, $familyVariantCode, array $data = []): int { if (array_key_exists('family', $data)) { throw new InvalidArgumentException('The parameter "family" must not be defined in the data parameter'); @@ -70,7 +72,7 @@ public function create($familyCode, $familyVariantCode, array $data = []) /** * {@inheritdoc} */ - public function upsert($familyCode, $familyVariantCode, array $data = []) + public function upsert($familyCode, $familyVariantCode, array $data = []): int { if (array_key_exists('family', $data)) { throw new InvalidArgumentException('The parameter "family" must not be defined in the data parameter'); @@ -86,7 +88,7 @@ public function upsert($familyCode, $familyVariantCode, array $data = []) /** * {@inheritdoc} */ - public function listPerPage($familyCode, $limit = 10, $withCount = false, array $queryParameters = []) + public function listPerPage($familyCode, $limit = 10, $withCount = false, array $queryParameters = []): PageInterface { $data = $this->resourceClient->getResources( static::FAMILY_VARIANTS_URI, @@ -102,7 +104,7 @@ public function listPerPage($familyCode, $limit = 10, $withCount = false, array /** * {@inheritdoc} */ - public function all($familyCode, $pageSize = 10, array $queryParameters = []) + public function all($familyCode, $pageSize = 10, array $queryParameters = []): ResourceCursorInterface { $firstPage = $this->listPerPage($familyCode, $pageSize, false, $queryParameters); @@ -112,7 +114,7 @@ public function all($familyCode, $pageSize = 10, array $queryParameters = []) /** * {@inheritdoc} */ - public function upsertList($familyCode, $familyVariants) + public function upsertList($familyCode, $familyVariants): \Traversable { return $this->resourceClient->upsertStreamResourceList(static::FAMILY_VARIANTS_URI, [$familyCode], $familyVariants); } diff --git a/src/Api/FamilyVariantApiInterface.php b/src/Api/FamilyVariantApiInterface.php index 457227cc..c62e2a19 100644 --- a/src/Api/FamilyVariantApiInterface.php +++ b/src/Api/FamilyVariantApiInterface.php @@ -28,7 +28,7 @@ interface FamilyVariantApiInterface * * @return array */ - public function get($familyCode, $familyVariantCode); + public function get($familyCode, $familyVariantCode): array; /** * Available since Akeneo PIM 2.0. @@ -43,7 +43,7 @@ public function get($familyCode, $familyVariantCode); * * @return int Status code 201 indicating that the family variant has been well created. */ - public function create($familyCode, $familyVariantCode, array $data = []); + public function create($familyCode, $familyVariantCode, array $data = []): int; /** * Available since Akeneo PIM 2.0. @@ -59,7 +59,7 @@ public function create($familyCode, $familyVariantCode, array $data = []); * @return int Status code 201 indicating that the family variant has been well created. * Status code 204 indicating that the family variant has been well updated. */ - public function upsert($familyCode, $familyVariantCode, array $data = []); + public function upsert($familyCode, $familyVariantCode, array $data = []): int; /** * Available since Akeneo PIM 2.0. @@ -77,7 +77,7 @@ public function upsert($familyCode, $familyVariantCode, array $data = []); * * @return PageInterface */ - public function listPerPage($familyCode, $limit = 10, $withCount = false, array $queryParameters = []); + public function listPerPage($familyCode, $limit = 10, $withCount = false, array $queryParameters = []): PageInterface; /** * Available since Akeneo PIM 2.0. @@ -92,7 +92,7 @@ public function listPerPage($familyCode, $limit = 10, $withCount = false, array * * @return ResourceCursorInterface */ - public function all($familyCode, $pageSize = 10, array $queryParameters = []); + public function all($familyCode, $pageSize = 10, array $queryParameters = []): ResourceCursorInterface; /** * Available since Akeneo PIM 2.0. @@ -105,5 +105,5 @@ public function all($familyCode, $pageSize = 10, array $queryParameters = []); * * @return \Traversable returns an iterable object, each entry corresponding to the response of the upserted resource */ - public function upsertList($familyCode, $familyVariants); + public function upsertList($familyCode, $familyVariants): \Traversable; } diff --git a/src/Api/LocaleApi.php b/src/Api/LocaleApi.php index 4589c230..8fb62737 100644 --- a/src/Api/LocaleApi.php +++ b/src/Api/LocaleApi.php @@ -4,7 +4,9 @@ use Akeneo\Pim\ApiClient\Client\ResourceClientInterface; use Akeneo\Pim\ApiClient\Pagination\PageFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\PageInterface; use Akeneo\Pim\ApiClient\Pagination\ResourceCursorFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface; /** * API implementation to manage the locales. @@ -45,7 +47,7 @@ public function __construct( /** * {@inheritdoc} */ - public function get($code) + public function get(string $code): array { return $this->resourceClient->getResource(static::LOCALE_URI, [$code]); } @@ -53,7 +55,7 @@ public function get($code) /** * {@inheritdoc} */ - public function listPerPage($limit = 10, $withCount = false, array $queryParameters = []) + public function listPerPage(int $limit = 10, bool $withCount = false, array $queryParameters = []): PageInterface { $data = $this->resourceClient->getResources(static::LOCALES_URI, [], $limit, $withCount, $queryParameters); @@ -63,7 +65,7 @@ public function listPerPage($limit = 10, $withCount = false, array $queryParamet /** * {@inheritdoc} */ - public function all($pageSize = 10, array $queryParameters = []) + public function all(int $pageSize = 10, array $queryParameters = []): ResourceCursorInterface { $firstPage = $this->listPerPage($pageSize, false, $queryParameters); diff --git a/src/Api/MeasureFamilyApi.php b/src/Api/MeasureFamilyApi.php index 58a56741..c0c117b4 100644 --- a/src/Api/MeasureFamilyApi.php +++ b/src/Api/MeasureFamilyApi.php @@ -4,7 +4,9 @@ use Akeneo\Pim\ApiClient\Client\ResourceClientInterface; use Akeneo\Pim\ApiClient\Pagination\PageFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\PageInterface; use Akeneo\Pim\ApiClient\Pagination\ResourceCursorFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface; /** * API implementation to manage measure families. @@ -45,7 +47,7 @@ public function __construct( /** * {@inheritdoc} */ - public function get($code) + public function get(string $code): array { return $this->resourceClient->getResource(static::MEASURE_FAMILY_URI, [$code]); } @@ -53,7 +55,7 @@ public function get($code) /** * {@inheritdoc} */ - public function listPerPage($limit = 10, $withCount = false, array $queryParameters = []) + public function listPerPage(int $limit = 10, bool $withCount = false, array $queryParameters = []): PageInterface { $data = $this->resourceClient->getResources(static::MEASURE_FAMILIES_URI, [], $limit, $withCount, $queryParameters); @@ -63,7 +65,7 @@ public function listPerPage($limit = 10, $withCount = false, array $queryParamet /** * {@inheritdoc} */ - public function all($pageSize = 10, array $queryParameters = []) + public function all(int $pageSize = 10, array $queryParameters = []): ResourceCursorInterface { $firstPage = $this->listPerPage($pageSize, false, $queryParameters); diff --git a/src/Api/MediaFileApiInterface.php b/src/Api/MediaFileApiInterface.php index 70307c13..5a1d22dc 100644 --- a/src/Api/MediaFileApiInterface.php +++ b/src/Api/MediaFileApiInterface.php @@ -31,5 +31,5 @@ interface MediaFileApiInterface extends * * @return string returns the code of created media file */ - public function create($mediaFile, array $data); + public function create($mediaFile, array $data): string; } diff --git a/src/Api/Operation/CreatableResourceInterface.php b/src/Api/Operation/CreatableResourceInterface.php index ee1b843a..5bd6c221 100644 --- a/src/Api/Operation/CreatableResourceInterface.php +++ b/src/Api/Operation/CreatableResourceInterface.php @@ -25,5 +25,5 @@ interface CreatableResourceInterface * * @return int Status code 201 indicating that the resource has been well created. */ - public function create($code, array $data = []); + public function create(string $code, array $data = []): int; } diff --git a/src/Api/Operation/DeletableResourceInterface.php b/src/Api/Operation/DeletableResourceInterface.php index 264c0be6..6a20d31e 100644 --- a/src/Api/Operation/DeletableResourceInterface.php +++ b/src/Api/Operation/DeletableResourceInterface.php @@ -2,6 +2,8 @@ namespace Akeneo\Pim\ApiClient\Api\Operation; +use Akeneo\Pim\ApiClient\Exception\HttpException; + /** * API that can delete a resource * @@ -20,5 +22,5 @@ interface DeletableResourceInterface * * @return int Status code 204 indicating that the resource has been well deleted. */ - public function delete($code); + public function delete(string $code): int; } diff --git a/src/Api/Operation/DownloadableResourceInterface.php b/src/Api/Operation/DownloadableResourceInterface.php index 29daffec..ca1a888d 100644 --- a/src/Api/Operation/DownloadableResourceInterface.php +++ b/src/Api/Operation/DownloadableResourceInterface.php @@ -2,6 +2,7 @@ namespace Akeneo\Pim\ApiClient\Api\Operation; +use Akeneo\Pim\ApiClient\Exception\HttpException; use Psr\Http\Message\StreamInterface; /** @@ -22,5 +23,5 @@ interface DownloadableResourceInterface * * @return StreamInterface */ - public function download($code); + public function download(string $code): StreamInterface; } diff --git a/src/Api/Operation/GettableResourceInterface.php b/src/Api/Operation/GettableResourceInterface.php index a449290d..71daf995 100644 --- a/src/Api/Operation/GettableResourceInterface.php +++ b/src/Api/Operation/GettableResourceInterface.php @@ -22,5 +22,5 @@ interface GettableResourceInterface * * @return array */ - public function get($code); + public function get(string $code): array; } diff --git a/src/Api/Operation/ListableResourceInterface.php b/src/Api/Operation/ListableResourceInterface.php index ef9938c8..5352227a 100644 --- a/src/Api/Operation/ListableResourceInterface.php +++ b/src/Api/Operation/ListableResourceInterface.php @@ -29,7 +29,7 @@ interface ListableResourceInterface * * @return PageInterface */ - public function listPerPage($limit = 10, $withCount = false, array $queryParameters = []); + public function listPerPage(int $limit = 10, bool $withCount = false, array $queryParameters = []): PageInterface; /** * Gets a cursor to iterate over a list of resources. @@ -42,5 +42,5 @@ public function listPerPage($limit = 10, $withCount = false, array $queryParamet * * @return ResourceCursorInterface */ - public function all($pageSize = 10, array $queryParameters = []); + public function all(int $pageSize = 10, array $queryParameters = []): ResourceCursorInterface; } diff --git a/src/Api/Operation/UpsertableResourceInterface.php b/src/Api/Operation/UpsertableResourceInterface.php index bb5e6c75..ab03e36b 100644 --- a/src/Api/Operation/UpsertableResourceInterface.php +++ b/src/Api/Operation/UpsertableResourceInterface.php @@ -24,5 +24,5 @@ interface UpsertableResourceInterface * @return int Status code 201 indicating that the resource has been well created. * Status code 204 indicating that the resource has been well updated. */ - public function upsert($code, array $data = []); + public function upsert(string $code, array $data = []): int; } diff --git a/src/Api/Operation/UpsertableResourceListInterface.php b/src/Api/Operation/UpsertableResourceListInterface.php index 5c3d8ec1..89f1323f 100644 --- a/src/Api/Operation/UpsertableResourceListInterface.php +++ b/src/Api/Operation/UpsertableResourceListInterface.php @@ -23,5 +23,5 @@ interface UpsertableResourceListInterface * * @return \Traversable returns an iterable object, each entry corresponding to the response of the upserted resource */ - public function upsertList($resources); + public function upsertList($resources): \Traversable; } diff --git a/src/Api/ProductApi.php b/src/Api/ProductApi.php index 29c1c81a..8f195799 100644 --- a/src/Api/ProductApi.php +++ b/src/Api/ProductApi.php @@ -5,7 +5,9 @@ use Akeneo\Pim\ApiClient\Client\ResourceClientInterface; use Akeneo\Pim\ApiClient\Exception\InvalidArgumentException; use Akeneo\Pim\ApiClient\Pagination\PageFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\PageInterface; use Akeneo\Pim\ApiClient\Pagination\ResourceCursorFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface; /** * API implementation to manage the products. @@ -46,7 +48,7 @@ public function __construct( /** * {@inheritdoc} */ - public function get($code) + public function get(string $code): array { return $this->resourceClient->getResource(static::PRODUCT_URI, [$code]); } @@ -54,7 +56,7 @@ public function get($code) /** * {@inheritdoc} */ - public function listPerPage($limit = 10, $withCount = false, array $queryParameters = []) + public function listPerPage(int $limit = 10, bool $withCount = false, array $queryParameters = []): PageInterface { $data = $this->resourceClient->getResources(static::PRODUCTS_URI, [], $limit, $withCount, $queryParameters); @@ -64,7 +66,7 @@ public function listPerPage($limit = 10, $withCount = false, array $queryParamet /** * {@inheritdoc} */ - public function all($pageSize = 10, array $queryParameters = []) + public function all(int $pageSize = 10, array $queryParameters = []): ResourceCursorInterface { $queryParameters['pagination_type'] = 'search_after'; @@ -76,7 +78,7 @@ public function all($pageSize = 10, array $queryParameters = []) /** * {@inheritdoc} */ - public function create($code, array $data = []) + public function create(string $code, array $data = []): int { if (array_key_exists('identifier', $data)) { throw new InvalidArgumentException('The parameter "identifier" should not be defined in the data parameter'); @@ -90,7 +92,7 @@ public function create($code, array $data = []) /** * {@inheritdoc} */ - public function upsert($code, array $data = []) + public function upsert(string $code, array $data = []): int { return $this->resourceClient->upsertResource(static::PRODUCT_URI, [$code], $data); } @@ -98,7 +100,7 @@ public function upsert($code, array $data = []) /** * {@inheritdoc} */ - public function delete($code) + public function delete(string $code): int { return $this->resourceClient->deleteResource(static::PRODUCT_URI, [$code]); } @@ -106,7 +108,7 @@ public function delete($code) /** * {@inheritdoc} */ - public function upsertList($products) + public function upsertList($products): \Traversable { return $this->resourceClient->upsertStreamResourceList(static::PRODUCTS_URI, [], $products); } diff --git a/src/Api/ProductMediaFileApi.php b/src/Api/ProductMediaFileApi.php index 2383b538..b0c4954f 100644 --- a/src/Api/ProductMediaFileApi.php +++ b/src/Api/ProductMediaFileApi.php @@ -6,8 +6,11 @@ use Akeneo\Pim\ApiClient\Exception\RuntimeException; use Akeneo\Pim\ApiClient\FileSystem\FileSystemInterface; use Akeneo\Pim\ApiClient\Pagination\PageFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\PageInterface; use Akeneo\Pim\ApiClient\Pagination\ResourceCursorFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface; use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\StreamInterface; /** * API implementation to manage the media files for the products. @@ -56,7 +59,7 @@ public function __construct( /** * {@inheritdoc} */ - public function get($code) + public function get(string $code): array { return $this->resourceClient->getResource(static::MEDIA_FILE_URI, [$code]); } @@ -64,7 +67,7 @@ public function get($code) /** * {@inheritdoc} */ - public function listPerPage($limit = 10, $withCount = false, array $queryParameters = []) + public function listPerPage(int $limit = 10, bool $withCount = false, array $queryParameters = []): PageInterface { $data = $this->resourceClient->getResources(static::MEDIA_FILES_URI, [], $limit, $withCount, $queryParameters); @@ -74,7 +77,7 @@ public function listPerPage($limit = 10, $withCount = false, array $queryParamet /** * {@inheritdoc} */ - public function all($pageSize = 10, array $queryParameters = []) + public function all(int $pageSize = 10, array $queryParameters = []): ResourceCursorInterface { $firstPage = $this->listPerPage($pageSize, false, $queryParameters); @@ -84,7 +87,7 @@ public function all($pageSize = 10, array $queryParameters = []) /** * {@inheritdoc} */ - public function create($mediaFile, array $data) + public function create($mediaFile, array $data): string { if (is_string($mediaFile)) { $mediaFile = $this->fileSystem->getResourceFromPath($mediaFile); @@ -111,7 +114,7 @@ public function create($mediaFile, array $data) /** * {@inheritdoc} */ - public function download($code) + public function download(string $code): StreamInterface { return $this->resourceClient->getStreamedResource(static::MEDIA_FILE_DOWNLOAD_URI, [$code])->getBody(); } diff --git a/src/Api/ProductModelApi.php b/src/Api/ProductModelApi.php index 8a659f2c..f2b7af2f 100644 --- a/src/Api/ProductModelApi.php +++ b/src/Api/ProductModelApi.php @@ -3,11 +3,11 @@ namespace Akeneo\Pim\ApiClient\Api; use Akeneo\Pim\ApiClient\Client\ResourceClientInterface; -use Akeneo\Pim\ApiClient\Exception\HttpException; use Akeneo\Pim\ApiClient\Exception\InvalidArgumentException; use Akeneo\Pim\ApiClient\Pagination\PageFactoryInterface; +use Akeneo\Pim\ApiClient\Pagination\PageInterface; use Akeneo\Pim\ApiClient\Pagination\ResourceCursorFactoryInterface; -use Psr\Http\Message\StreamInterface; +use Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface; /** * API implementation to manage the product models. @@ -50,7 +50,7 @@ public function __construct( * * {@inheritdoc} */ - public function get($code) + public function get(string $code): array { return $this->resourceClient->getResource(static::PRODUCT_MODEL_URI, [$code]); } @@ -60,7 +60,7 @@ public function get($code) * * {@inheritdoc} */ - public function create($code, array $data = []) + public function create(string $code, array $data = []): int { if (array_key_exists('code', $data)) { throw new InvalidArgumentException('The parameter "code" must not be defined in the data parameter'); @@ -76,7 +76,7 @@ public function create($code, array $data = []) * * {@inheritdoc} */ - public function upsert($code, array $data = []) + public function upsert(string $code, array $data = []): int { if (array_key_exists('code', $data)) { throw new InvalidArgumentException('The parameter "code" must not be defined in the data parameter'); @@ -92,7 +92,7 @@ public function upsert($code, array $data = []) * * {@inheritdoc} */ - public function listPerPage($limit = 10, $withCount = false, array $queryParameters = []) + public function listPerPage(int $limit = 10, bool $withCount = false, array $queryParameters = []): PageInterface { $data = $this->resourceClient->getResources(static::PRODUCT_MODELS_URI, [], $limit, $withCount, $queryParameters); @@ -104,7 +104,7 @@ public function listPerPage($limit = 10, $withCount = false, array $queryParamet * * {@inheritdoc} */ - public function all($pageSize = 10, array $queryParameters = []) + public function all(int $pageSize = 10, array $queryParameters = []): ResourceCursorInterface { $queryParameters['pagination_type'] = 'search_after'; @@ -118,7 +118,7 @@ public function all($pageSize = 10, array $queryParameters = []) * * {@inheritdoc} */ - public function upsertList($productModels) + public function upsertList($productModels): \Traversable { return $this->resourceClient->upsertStreamResourceList(static::PRODUCT_MODELS_URI, [], $productModels); } diff --git a/src/Client/AuthenticatedHttpClient.php b/src/Client/AuthenticatedHttpClient.php index 1b2937e1..a69f725e 100644 --- a/src/Client/AuthenticatedHttpClient.php +++ b/src/Client/AuthenticatedHttpClient.php @@ -5,6 +5,7 @@ use Akeneo\Pim\ApiClient\Api\AuthenticationApiInterface; use Akeneo\Pim\ApiClient\Exception\UnauthorizedHttpException; use Akeneo\Pim\ApiClient\Security\Authentication; +use Psr\Http\Message\ResponseInterface; /** * Http client to send an authenticated request. @@ -29,11 +30,6 @@ class AuthenticatedHttpClient implements HttpClientInterface /** @var Authentication */ protected $authentication; - /** - * @param HttpClient $basicHttpClient - * @param AuthenticationApiInterface $authenticationApi - * @param Authentication $authentication - */ public function __construct( HttpClient $basicHttpClient, AuthenticationApiInterface $authenticationApi, @@ -47,7 +43,7 @@ public function __construct( /** * {@inheritdoc} */ - public function sendRequest($httpMethod, $uri, array $headers = [], $body = null) + public function sendRequest(string $httpMethod, $uri, array $headers = [], $body = null): ResponseInterface { if (null === $this->authentication->getAccessToken()) { $tokens = $this->authenticationApi->authenticateByPassword( diff --git a/src/Client/HttpClient.php b/src/Client/HttpClient.php index 9d7c7d99..51cd12c3 100644 --- a/src/Client/HttpClient.php +++ b/src/Client/HttpClient.php @@ -4,6 +4,7 @@ use Http\Client\HttpClient as Client; use Http\Message\RequestFactory; +use Psr\Http\Message\ResponseInterface; /** * Http client to send a request without any authentication. @@ -39,7 +40,7 @@ public function __construct( /** * {@inheritdoc} */ - public function sendRequest($httpMethod, $uri, array $headers = [], $body = null) + public function sendRequest(string $httpMethod, $uri, array $headers = [], $body = null): ResponseInterface { $request = $this->requestFactory->createRequest($httpMethod, $uri, $headers, $body); $response = $this->httpClient->sendRequest($request); diff --git a/src/Client/HttpClientInterface.php b/src/Client/HttpClientInterface.php index dae496fd..c67761df 100644 --- a/src/Client/HttpClientInterface.php +++ b/src/Client/HttpClientInterface.php @@ -28,5 +28,5 @@ interface HttpClientInterface * * @return ResponseInterface */ - public function sendRequest($httpMethod, $uri, array $headers = [], $body = null); + public function sendRequest(string $httpMethod, $uri, array $headers = [], $body = null): ResponseInterface; } diff --git a/src/Client/HttpExceptionHandler.php b/src/Client/HttpExceptionHandler.php index 6dc0345e..313a79f5 100644 --- a/src/Client/HttpExceptionHandler.php +++ b/src/Client/HttpExceptionHandler.php @@ -36,7 +36,7 @@ class HttpExceptionHandler * * @return ResponseInterface */ - public function transformResponseToException(RequestInterface $request, ResponseInterface $response) + public function transformResponseToException(RequestInterface $request, ResponseInterface $response): ResponseInterface { if ($response->getStatusCode() >= 300 && $response->getStatusCode() < 400) { throw new RedirectionHttpException($this->getResponseMessage($response), $request, $response); @@ -76,7 +76,7 @@ public function transformResponseToException(RequestInterface $request, Response * * @return string */ - protected function getResponseMessage(ResponseInterface $response) + protected function getResponseMessage(ResponseInterface $response): string { $responseBody = $response->getBody(); diff --git a/src/Client/ResourceClient.php b/src/Client/ResourceClient.php index e25d1672..b1094150 100644 --- a/src/Client/ResourceClient.php +++ b/src/Client/ResourceClient.php @@ -9,6 +9,7 @@ use Akeneo\Pim\ApiClient\Routing\UriGeneratorInterface; use Akeneo\Pim\ApiClient\Stream\MultipartStreamBuilderFactory; use Akeneo\Pim\ApiClient\Stream\UpsertResourceListResponseFactory; +use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\StreamInterface; /** @@ -32,12 +33,6 @@ class ResourceClient implements ResourceClientInterface /** @var UpsertResourceListResponseFactory */ protected $upsertListResponseFactory; - /** - * @param HttpClientInterface $httpClient - * @param UriGeneratorInterface $uriGenerator - * @param MultipartStreamBuilderFactory $multipartStreamBuilderFactory - * @param UpsertResourceListResponseFactory $upsertListResponseFactory - */ public function __construct( HttpClientInterface $httpClient, UriGeneratorInterface $uriGenerator, @@ -53,7 +48,7 @@ public function __construct( /** * {@inheritdoc} */ - public function getResource($uri, array $uriParameters = [], array $queryParameters = []) + public function getResource(string $uri, array $uriParameters = [], array $queryParameters = []): array { $uri = $this->uriGenerator->generate($uri, $uriParameters, $queryParameters); $response = $this->httpClient->sendRequest('GET', $uri, ['Accept' => '*/*']); @@ -65,12 +60,12 @@ public function getResource($uri, array $uriParameters = [], array $queryParamet * {@inheritdoc} */ public function getResources( - $uri, + string $uri, array $uriParameters = [], - $limit = 10, - $withCount = false, + ?int $limit = 10, + ?bool $withCount = false, array $queryParameters = [] - ) { + ): array { if (array_key_exists('limit', $queryParameters)) { throw new InvalidArgumentException('The parameter "limit" should not be defined in the additional query parameters'); } @@ -93,7 +88,7 @@ public function getResources( /** * {@inheritdoc} */ - public function createResource($uri, array $uriParameters = [], array $body = []) + public function createResource(string $uri, array $uriParameters = [], array $body = []): int { unset($body['_links']); @@ -111,7 +106,7 @@ public function createResource($uri, array $uriParameters = [], array $body = [] /** * {@inheritdoc} */ - public function createMultipartResource($uri, array $uriParameters = [], array $requestParts = []) + public function createMultipartResource(string $uri, array $uriParameters = [], array $requestParts = []): ResponseInterface { $streamBuilder = $this->multipartStreamBuilderFactory->create(); @@ -135,7 +130,7 @@ public function createMultipartResource($uri, array $uriParameters = [], array $ /** * {@inheritdoc} */ - public function upsertResource($uri, array $uriParameters = [], array $body = []) + public function upsertResource(string $uri, array $uriParameters = [], array $body = []): int { unset($body['_links']); @@ -153,7 +148,7 @@ public function upsertResource($uri, array $uriParameters = [], array $body = [] /** * {@inheritdoc} */ - public function upsertStreamResourceList($uri, array $uriParameters = [], $resources = []) + public function upsertStreamResourceList(string $uri, array $uriParameters = [], $resources = []): \Traversable { if (!is_array($resources) && !$resources instanceof StreamInterface) { throw new InvalidArgumentException('The parameter "resources" must be an array or an instance of StreamInterface.'); @@ -209,7 +204,7 @@ public function upsertJsonResourceList(string $uri, array $uriParameters = [], a /** * {@inheritdoc} */ - public function deleteResource($uri, array $uriParameters = []) + public function deleteResource(string $uri, array $uriParameters = []): int { $uri = $this->uriGenerator->generate($uri, $uriParameters); @@ -221,7 +216,7 @@ public function deleteResource($uri, array $uriParameters = []) /** * {@inheritdoc} */ - public function getStreamedResource($uri, array $uriParameters = []) + public function getStreamedResource(string $uri, array $uriParameters = []): ResponseInterface { $uri = $this->uriGenerator->generate($uri, $uriParameters); $response = $this->httpClient->sendRequest('GET', $uri, ['Accept' => '*/*']); diff --git a/src/Client/ResourceClientInterface.php b/src/Client/ResourceClientInterface.php index c33a6159..4a7eed15 100644 --- a/src/Client/ResourceClientInterface.php +++ b/src/Client/ResourceClientInterface.php @@ -29,17 +29,17 @@ interface ResourceClientInterface * * @return array */ - public function getResource($uri, array $uriParameters = [], array $queryParameters = []); + public function getResource(string $uri, array $uriParameters = [], array $queryParameters = []): array; /** * Gets a list of resources. * * @param string $uri URI of the resource * @param array $uriParameters URI parameters of the resource - * @param int $limit The maximum number of resources to return. + * @param null|int $limit The maximum number of resources to return. * Do note that the server has a default value if you don't specify anything. * The server has a maximum limit allowed as well. - * @param bool $withCount Set to true to return the total count of resources. + * @param null|bool $withCount Set to true to return the total count of resources. * This parameter could decrease drastically the performance when set to true. * @param array $queryParameters Additional query parameters of the request * @@ -48,7 +48,7 @@ public function getResource($uri, array $uriParameters = [], array $queryParamet * * @return array */ - public function getResources($uri, array $uriParameters = [], $limit = 10, $withCount = false, array $queryParameters = []); + public function getResources(string $uri, array $uriParameters = [], ?int $limit = 10, ?bool $withCount = false, array $queryParameters = []): array; /** * Creates a resource. @@ -61,7 +61,7 @@ public function getResources($uri, array $uriParameters = [], $limit = 10, $with * * @return int Status code 201 indicating that the resource has been well created. */ - public function createResource($uri, array $uriParameters = [], array $body = []); + public function createResource(string $uri, array $uriParameters = [], array $body = []): int; /** * Creates a resource using a multipart request. @@ -75,7 +75,7 @@ public function createResource($uri, array $uriParameters = [], array $body = [] * * @return ResponseInterface the response of the creation request */ - public function createMultipartResource($uri, array $uriParameters = [], array $requestParts = []); + public function createMultipartResource(string $uri, array $uriParameters = [], array $requestParts = []): ResponseInterface; /** * Creates a resource if it does not exist yet, otherwise updates partially the resource. @@ -89,7 +89,7 @@ public function createMultipartResource($uri, array $uriParameters = [], array $ * @return int Status code 201 indicating that the resource has been well created. * Status code 204 indicating that the resource has been well updated. */ - public function upsertResource($uri, array $uriParameters = [], array $body = []); + public function upsertResource(string $uri, array $uriParameters = [], array $body = []): int; /** * Updates or creates several resources using a stream for the request and the response. @@ -104,7 +104,7 @@ public function upsertResource($uri, array $uriParameters = [], array $body = [] * * @return \Traversable returns an iterable object, each entry corresponding to the response of the upserted resource */ - public function upsertStreamResourceList($uri, array $uriParameters = [], $resources = []); + public function upsertStreamResourceList(string $uri, array $uriParameters = [], $resources = []) : \Traversable; /** * Updates or creates several resources using a single JSON string for the request and the response. @@ -130,7 +130,7 @@ public function upsertJsonResourceList(string $uri, array $uriParameters = [], a * * @return int Status code 204 indicating that the resource has been well deleted */ - public function deleteResource($uri, array $uriParameters = []); + public function deleteResource(string $uri, array $uriParameters = []): int; /** * Gets a streamed resource. @@ -142,5 +142,5 @@ public function deleteResource($uri, array $uriParameters = []); * * @return ResponseInterface The response of the streamed resource request */ - public function getStreamedResource($uri, array $uriParameters = []); + public function getStreamedResource(string $uri, array $uriParameters = []): ResponseInterface; } diff --git a/src/Exception/HttpException.php b/src/Exception/HttpException.php index f7a4a006..c475d962 100644 --- a/src/Exception/HttpException.php +++ b/src/Exception/HttpException.php @@ -20,13 +20,7 @@ class HttpException extends RuntimeException /** @var ResponseInterface */ protected $response; - /** - * @param string $message message of the exception - * @param RequestInterface $request failing request - * @param ResponseInterface $response response of the failing request - * @param \Exception|null $previous previous exception - */ - public function __construct($message, RequestInterface $request, ResponseInterface $response, \Exception $previous = null) + public function __construct(string $message, RequestInterface $request, ResponseInterface $response, ?\Exception $previous = null) { parent::__construct($message, $response->getStatusCode(), $previous); @@ -36,20 +30,16 @@ public function __construct($message, RequestInterface $request, ResponseInterfa /** * Returns the request. - * - * @return RequestInterface */ - public function getRequest() + public function getRequest(): RequestInterface { return $this->request; } /** * Returns the response. - * - * @return ResponseInterface */ - public function getResponse() + public function getResponse(): ResponseInterface { return $this->response; } diff --git a/src/Exception/UnprocessableEntityHttpException.php b/src/Exception/UnprocessableEntityHttpException.php index d383fa51..14989cfc 100644 --- a/src/Exception/UnprocessableEntityHttpException.php +++ b/src/Exception/UnprocessableEntityHttpException.php @@ -13,10 +13,8 @@ class UnprocessableEntityHttpException extends ClientErrorHttpException { /** * Returns the errors of the response if there are any - * - * @return array */ - public function getResponseErrors() + public function getResponseErrors(): array { $responseBody = $this->response->getBody(); diff --git a/src/FileSystem/FileSystemInterface.php b/src/FileSystem/FileSystemInterface.php index 60f75e23..dcb5338c 100644 --- a/src/FileSystem/FileSystemInterface.php +++ b/src/FileSystem/FileSystemInterface.php @@ -22,5 +22,5 @@ interface FileSystemInterface * * @return resource */ - public function getResourceFromPath($filePath); + public function getResourceFromPath(string $filePath); } diff --git a/src/FileSystem/LocalFileSystem.php b/src/FileSystem/LocalFileSystem.php index 17ba0a35..2c7f56fc 100644 --- a/src/FileSystem/LocalFileSystem.php +++ b/src/FileSystem/LocalFileSystem.php @@ -16,7 +16,7 @@ class LocalFileSystem implements FileSystemInterface /** * {@inheritdoc} */ - public function getResourceFromPath($filePath) + public function getResourceFromPath(string $filePath) { if (!is_readable($filePath)) { throw new UnreadableFileException(sprintf('The file "%s" could not be read.', $filePath)); diff --git a/src/Pagination/Page.php b/src/Pagination/Page.php index 4d63794e..a4a8cb28 100644 --- a/src/Pagination/Page.php +++ b/src/Pagination/Page.php @@ -34,17 +34,15 @@ class Page implements PageInterface /** @var array */ protected $items; - /** - * @param PageFactoryInterface $pageFactory - * @param HttpClientInterface $httpClient - * @param string $firstLink - * @param string|null $previousLink - * @param string|null $nextLink - * @param int|null $count - * @param array $items - */ - public function __construct(PageFactoryInterface $pageFactory, HttpClientInterface $httpClient, $firstLink, $previousLink, $nextLink, $count, array $items) - { + public function __construct( + PageFactoryInterface $pageFactory, + HttpClientInterface $httpClient, + string $firstLink, + ?string$previousLink, + ?string $nextLink, + ?int $count, + array $items + ) { $this->pageFactory = $pageFactory; $this->httpClient = $httpClient; $this->firstLink = $firstLink; @@ -57,7 +55,7 @@ public function __construct(PageFactoryInterface $pageFactory, HttpClientInterfa /** * {@inheritdoc} */ - public function getFirstPage() + public function getFirstPage(): PageInterface { return $this->getPage($this->firstLink); } @@ -65,7 +63,7 @@ public function getFirstPage() /** * {@inheritdoc} */ - public function getPreviousPage() + public function getPreviousPage(): ?PageInterface { return $this->hasPreviousPage() ? $this->getPage($this->previousLink) : null; } @@ -73,7 +71,7 @@ public function getPreviousPage() /** * {@inheritdoc} */ - public function getNextPage() + public function getNextPage(): ?PageInterface { return $this->hasNextPage() ? $this->getPage($this->nextLink) : null; } @@ -81,7 +79,7 @@ public function getNextPage() /** * {@inheritdoc} */ - public function getCount() + public function getCount(): ?int { return $this->count; } @@ -89,7 +87,7 @@ public function getCount() /** * {@inheritdoc} */ - public function getItems() + public function getItems(): array { return $this->items; } @@ -97,7 +95,7 @@ public function getItems() /** * {@inheritdoc} */ - public function hasNextPage() + public function hasNextPage(): bool { return null !== $this->nextLink; } @@ -105,7 +103,7 @@ public function hasNextPage() /** * {@inheritdoc} */ - public function hasPreviousPage() + public function hasPreviousPage(): bool { return null !== $this->previousLink; } @@ -113,7 +111,7 @@ public function hasPreviousPage() /** * {@inheritdoc} */ - public function getNextLink() + public function getNextLink(): ?string { return $this->nextLink; } @@ -121,19 +119,15 @@ public function getNextLink() /** * {@inheritdoc} */ - public function getPreviousLink() + public function getPreviousLink(): ?string { return $this->previousLink; } /** * Returns the page given a complete uri. - * - * @param string $uri - * - * @return PageInterface */ - protected function getPage($uri) + protected function getPage(string $uri): PageInterface { $response = $this->httpClient->sendRequest('GET', $uri, ['Accept' => '*/*']); $data = json_decode($response->getBody()->getContents(), true); diff --git a/src/Pagination/PageFactory.php b/src/Pagination/PageFactory.php index 0ae06e68..5ba2e826 100644 --- a/src/Pagination/PageFactory.php +++ b/src/Pagination/PageFactory.php @@ -16,9 +16,6 @@ class PageFactory implements PageFactoryInterface /** @var HttpClientInterface */ protected $httpClient; - /** - * @param HttpClientInterface $httpClient - */ public function __construct(HttpClientInterface $httpClient) { $this->httpClient = $httpClient; @@ -27,7 +24,7 @@ public function __construct(HttpClientInterface $httpClient) /** * {@inheritdoc} */ - public function createPage(array $data) + public function createPage(array $data): PageInterface { $nextLink = isset($data['_links']['next']['href']) ? $data['_links']['next']['href'] : null; $previousLink = isset($data['_links']['previous']['href']) ? $data['_links']['previous']['href'] : null; diff --git a/src/Pagination/PageFactoryInterface.php b/src/Pagination/PageFactoryInterface.php index 482ff554..1718f423 100644 --- a/src/Pagination/PageFactoryInterface.php +++ b/src/Pagination/PageFactoryInterface.php @@ -13,10 +13,6 @@ interface PageFactoryInterface { /** * Creates a page object from body. - * - * @param array $data body of the response - * - * @return PageInterface */ - public function createPage(array $data); + public function createPage(array $data): PageInterface; } diff --git a/src/Pagination/PageInterface.php b/src/Pagination/PageInterface.php index 30d07632..66d24016 100644 --- a/src/Pagination/PageInterface.php +++ b/src/Pagination/PageInterface.php @@ -13,67 +13,49 @@ interface PageInterface { /** * Returns the first page of the list of resources. - * - * @return PageInterface */ - public function getFirstPage(); + public function getFirstPage(): PageInterface; /** * Returns the previous page of the list of resources if it exists, null otherwise. - * - * @return PageInterface|null */ - public function getPreviousPage(); + public function getPreviousPage(): ?PageInterface; /** * Returns the previous page of the list of resources if it exists, null otherwise. - * - * @return PageInterface|null */ - public function getNextPage(); + public function getNextPage(): ?PageInterface; /** * Gets the total count of resources, not just the number of items in the page. * It returns null if the option to process it has not been send in the request. - * - * @return int|null */ - public function getCount(); + public function getCount(): ?int; /** * Returns the array of resources in the page. - * - * @return array */ - public function getItems(); + public function getItems(): array; /** * Returns true if a next page exists, false either. - * - * @return bool */ - public function hasNextPage(); + public function hasNextPage(): bool; /** * Returns true if a previous page exists, false either. - * - * @return bool */ - public function hasPreviousPage(); + public function hasPreviousPage(): bool; /** * Gets the link of the next page. * Returns null if there is not next page. - * - * @return string|null */ - public function getNextLink(); + public function getNextLink(): ?string; /** * Gets the link of the previous page. * Returns null if there is not previous page. - * - * @return string|null */ - public function getPreviousLink(); + public function getPreviousLink(): ?string; } diff --git a/src/Pagination/ResourceCursor.php b/src/Pagination/ResourceCursor.php index 71877ca5..ff1b46ee 100644 --- a/src/Pagination/ResourceCursor.php +++ b/src/Pagination/ResourceCursor.php @@ -17,7 +17,7 @@ class ResourceCursor implements ResourceCursorInterface /** @var PageInterface */ protected $firstPage; - /** @var int */ + /** @var null|int */ protected $pageSize; /** @var int */ @@ -26,11 +26,7 @@ class ResourceCursor implements ResourceCursorInterface /** @var int */ protected $totalIndex = 0; - /** - * @param int $pageSize - * @param PageInterface $firstPage - */ - public function __construct($pageSize, PageInterface $firstPage) + public function __construct(?int $pageSize, PageInterface $firstPage) { $this->firstPage = $firstPage; $this->currentPage = $firstPage; @@ -90,7 +86,7 @@ public function rewind() /** * {@inheritdoc} */ - public function getPageSize() + public function getPageSize(): ?int { return $this->pageSize; } diff --git a/src/Pagination/ResourceCursorFactory.php b/src/Pagination/ResourceCursorFactory.php index c6575dfc..4ee962cf 100644 --- a/src/Pagination/ResourceCursorFactory.php +++ b/src/Pagination/ResourceCursorFactory.php @@ -3,8 +3,6 @@ namespace Akeneo\Pim\ApiClient\Pagination; /** - * Class ResourceCursorFactory - * * @author Alexandre Hocquard * @copyright 2017 Akeneo SAS (http://www.akeneo.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) @@ -14,7 +12,7 @@ class ResourceCursorFactory implements ResourceCursorFactoryInterface /** * {@inheritdoc} */ - public function createCursor($pageSize, PageInterface $firstPage) + public function createCursor(?int $pageSize, PageInterface $firstPage): ResourceCursorInterface { return new ResourceCursor($pageSize, $firstPage); } diff --git a/src/Pagination/ResourceCursorFactoryInterface.php b/src/Pagination/ResourceCursorFactoryInterface.php index bf03f581..72ed9686 100644 --- a/src/Pagination/ResourceCursorFactoryInterface.php +++ b/src/Pagination/ResourceCursorFactoryInterface.php @@ -13,11 +13,6 @@ interface ResourceCursorFactoryInterface { /** * Creates a cursor from the first page of resources. - * - * @param int $pageSize - * @param PageInterface $firstPage - * - * @return ResourceCursorInterface */ - public function createCursor($pageSize, PageInterface $firstPage); + public function createCursor(?int $pageSize, PageInterface $firstPage): ResourceCursorInterface; } diff --git a/src/Pagination/ResourceCursorInterface.php b/src/Pagination/ResourceCursorInterface.php index d272947e..a742a662 100644 --- a/src/Pagination/ResourceCursorInterface.php +++ b/src/Pagination/ResourceCursorInterface.php @@ -13,8 +13,6 @@ interface ResourceCursorInterface extends \Iterator { /** * Get the number of resources per page. - * - * @return int */ - public function getPageSize(); + public function getPageSize(): ?int; } diff --git a/src/Search/SearchBuilder.php b/src/Search/SearchBuilder.php index 2718c9b5..22e411fc 100644 --- a/src/Search/SearchBuilder.php +++ b/src/Search/SearchBuilder.php @@ -27,7 +27,7 @@ class SearchBuilder * * @return SearchBuilder */ - public function addFilter($property, $operator, $value = null, array $options = []) + public function addFilter(string $property, string $operator, $value = null, array $options = []): self { $filter = ['operator'=> $operator]; @@ -40,10 +40,7 @@ public function addFilter($property, $operator, $value = null, array $options = return $this; } - /** - * @return array - */ - public function getFilters() + public function getFilters(): array { return $this->filters; } diff --git a/src/Security/Authentication.php b/src/Security/Authentication.php index 3689b756..915709aa 100644 --- a/src/Security/Authentication.php +++ b/src/Security/Authentication.php @@ -33,15 +33,7 @@ protected function __construct() { } - /** - * @param string $clientId - * @param string $secret - * @param string $username - * @param string $password - * - * @return Authentication - */ - public static function fromPassword($clientId, $secret, $username, $password) + public static function fromPassword(string $clientId, string $secret, string $username, string $password): Authentication { $authentication = new static(); $authentication->clientId = $clientId; @@ -52,15 +44,7 @@ public static function fromPassword($clientId, $secret, $username, $password) return $authentication; } - /** - * @param string $clientId - * @param string $secret - * @param string $accessToken - * @param string $refreshToken - * - * @return Authentication - */ - public static function fromToken($clientId, $secret, $accessToken, $refreshToken) + public static function fromToken(string $clientId, string $secret, string $accessToken, string $refreshToken): Authentication { $authentication = new static(); $authentication->clientId = $clientId; @@ -71,72 +55,44 @@ public static function fromToken($clientId, $secret, $accessToken, $refreshToken return $authentication; } - /** - * @return string - */ - public function getClientId() + public function getClientId(): string { return $this->clientId; } - /** - * @return string - */ - public function getSecret() + public function getSecret(): string { return $this->secret; } - /** - * @return string - */ - public function getUsername() + public function getUsername(): ?string { return $this->username; } - /** - * @return string - */ - public function getPassword() + public function getPassword(): ?string { return $this->password; } - /** - * @return null|string - */ - public function getAccessToken() + public function getAccessToken(): ?string { return $this->accessToken; } - /** - * @return null|string - */ - public function getRefreshToken() + public function getRefreshToken(): ?string { return $this->refreshToken; } - /** - * @param string $accessToken - * - * @return Authentication - */ - public function setAccessToken($accessToken) + public function setAccessToken(string $accessToken): self { $this->accessToken = $accessToken; return $this; } - /** - * @param string $refreshToken - * - * @return Authentication - */ - public function setRefreshToken($refreshToken) + public function setRefreshToken(string $refreshToken): self { $this->refreshToken = $refreshToken; diff --git a/src/Stream/LineStreamReader.php b/src/Stream/LineStreamReader.php index 8529bc52..4da3a989 100644 --- a/src/Stream/LineStreamReader.php +++ b/src/Stream/LineStreamReader.php @@ -20,7 +20,7 @@ class LineStreamReader * * @return string|null returns the line, or null if the stream is not readable or at the end */ - public function getNextLine(StreamInterface $stream) + public function getNextLine(StreamInterface $stream): ?string { if (!$stream->isReadable() || $stream->eof()) { return null; diff --git a/src/Stream/MultipartStreamBuilderFactory.php b/src/Stream/MultipartStreamBuilderFactory.php index dbf13fc5..5b9b0c2b 100644 --- a/src/Stream/MultipartStreamBuilderFactory.php +++ b/src/Stream/MultipartStreamBuilderFactory.php @@ -17,18 +17,12 @@ class MultipartStreamBuilderFactory /** @var StreamFactory */ protected $streamFactory; - /** - * @param StreamFactory $streamFactory - */ public function __construct(StreamFactory $streamFactory) { $this->streamFactory = $streamFactory; } - /** - * {@inheritdoc} - */ - public function create() + public function create(): MultipartStreamBuilder { return new MultipartStreamBuilder($this->streamFactory); } diff --git a/src/Stream/UpsertResourceListResponse.php b/src/Stream/UpsertResourceListResponse.php index 8342d0a3..a50df2e9 100644 --- a/src/Stream/UpsertResourceListResponse.php +++ b/src/Stream/UpsertResourceListResponse.php @@ -30,10 +30,6 @@ class UpsertResourceListResponse implements \Iterator /** @var string */ protected $line; - /** - * @param StreamInterface $bodyStream - * @param LineStreamReader $streamReader - */ public function __construct(StreamInterface $bodyStream, LineStreamReader $streamReader) { $this->bodyStream = $bodyStream; diff --git a/src/Stream/UpsertResourceListResponseFactory.php b/src/Stream/UpsertResourceListResponseFactory.php index 32bafee0..f2e82592 100644 --- a/src/Stream/UpsertResourceListResponseFactory.php +++ b/src/Stream/UpsertResourceListResponseFactory.php @@ -13,7 +13,7 @@ */ class UpsertResourceListResponseFactory { - public function create(StreamInterface $bodyStream) + public function create(StreamInterface $bodyStream): UpsertResourceListResponse { return new UpsertResourceListResponse($bodyStream, new LineStreamReader()); } diff --git a/tests/Api/GetProductTest.php b/tests/Api/GetProductTest.php index 005ac651..e3ee968a 100644 --- a/tests/Api/GetProductTest.php +++ b/tests/Api/GetProductTest.php @@ -52,10 +52,10 @@ private function getProduct() "identifier" : "black_sneakers", "family" : "sneakers", "groups": [], - "categories": ['summer_collection'], + "categories": ["summer_collection"], "values": [{ - 'color': {'locale': null, 'scope': null, 'data': 'black'} - }], + "color": {"locale": null, "scope": null, "data": "black"} + }] } ] JSON; From 3ffd4944406a8b16c4e75aff71bf70c59d86c20a Mon Sep 17 00:00:00 2001 From: ahocquard Date: Wed, 13 Feb 2019 11:21:36 +0100 Subject: [PATCH 2/3] Introduce a composer.lock --- .gitignore | 1 - composer.json | 2 +- composer.lock | 3450 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 3451 insertions(+), 2 deletions(-) create mode 100644 composer.lock diff --git a/.gitignore b/.gitignore index 01da3c63..474f23e0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ bin vendor -composer.lock docker-compose.yml tests/etc/parameters.yml phpspec.yml diff --git a/composer.json b/composer.json index 60e28e54..82a03042 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "psr/http-message": "^1.0", "php-http/httplug": "^2.0", "php-http/message": "^1.7", - "php-http/discovery": "^1.5", + "php-http/discovery": "^1.6", "php-http/message-factory": "^v1.0", "php-http/multipart-stream-builder": "^1.0", "php-http/client-implementation": "^1.0" diff --git a/composer.lock b/composer.lock new file mode 100644 index 00000000..7c061d99 --- /dev/null +++ b/composer.lock @@ -0,0 +1,3450 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "6db2187b9934fc1bd7e022ab4c2e3f52", + "packages": [ + { + "name": "clue/stream-filter", + "version": "v1.4.0", + "source": { + "type": "git", + "url": "https://github.com/clue/php-stream-filter.git", + "reference": "d80fdee9b3a7e0d16fc330a22f41f3ad0eeb09d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clue/php-stream-filter/zipball/d80fdee9b3a7e0d16fc330a22f41f3ad0eeb09d0", + "reference": "d80fdee9b3a7e0d16fc330a22f41f3ad0eeb09d0", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "^5.0 || ^4.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Clue\\StreamFilter\\": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@lueck.tv" + } + ], + "description": "A simple and modern approach to stream filtering in PHP", + "homepage": "https://github.com/clue/php-stream-filter", + "keywords": [ + "bucket brigade", + "callback", + "filter", + "php_user_filter", + "stream", + "stream_filter_append", + "stream_filter_register" + ], + "time": "2017-08-18T09:54:01+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "6.3.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "shasum": "" + }, + "require": { + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.3-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2018-04-22T15:46:56+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20T10:07:11+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.5.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "9f83dded91781a01c63574e387eaa769be769115" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115", + "reference": "9f83dded91781a01c63574e387eaa769be769115", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2018-12-04T20:46:45+00:00" + }, + { + "name": "php-http/discovery", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/discovery.git", + "reference": "02b7ea21eafa0757af04140890a67d8ed45f83b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/discovery/zipball/02b7ea21eafa0757af04140890a67d8ed45f83b2", + "reference": "02b7ea21eafa0757af04140890a67d8ed45f83b2", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0" + }, + "conflict": { + "nyholm/psr7": "<1.0" + }, + "require-dev": { + "php-http/httplug": "^1.0 || ^2.0", + "php-http/message-factory": "^1.0", + "phpspec/phpspec": "^2.4", + "puli/composer-plugin": "1.0.0-beta10" + }, + "suggest": { + "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories", + "puli/composer-plugin": "Sets up Puli which is recommended for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Discovery\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "Finds installed HTTPlug implementations and PSR-7 message factories", + "homepage": "http://php-http.org", + "keywords": [ + "adapter", + "client", + "discovery", + "factory", + "http", + "message", + "psr7" + ], + "time": "2019-01-23T12:41:22+00:00" + }, + { + "name": "php-http/guzzle6-adapter", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-http/guzzle6-adapter.git", + "reference": "6074a4b1f4d5c21061b70bab3b8ad484282fe31f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/guzzle6-adapter/zipball/6074a4b1f4d5c21061b70bab3b8ad484282fe31f", + "reference": "6074a4b1f4d5c21061b70bab3b8ad484282fe31f", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^6.0", + "php": "^7.1", + "php-http/httplug": "^2.0", + "psr/http-client": "^1.0" + }, + "provide": { + "php-http/async-client-implementation": "1.0", + "php-http/client-implementation": "1.0", + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "ext-curl": "*", + "php-http/client-integration-tests": "^2.0", + "phpunit/phpunit": "^7.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Adapter\\Guzzle6\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + }, + { + "name": "David de Boer", + "email": "david@ddeboer.nl" + } + ], + "description": "Guzzle 6 HTTP Adapter", + "homepage": "http://httplug.io", + "keywords": [ + "Guzzle", + "http" + ], + "time": "2018-12-16T14:44:03+00:00" + }, + { + "name": "php-http/httplug", + "version": "v2.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/httplug.git", + "reference": "b3842537338c949f2469557ef4ad4bdc47b58603" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/httplug/zipball/b3842537338c949f2469557ef4ad4bdc47b58603", + "reference": "b3842537338c949f2469557ef4ad4bdc47b58603", + "shasum": "" + }, + "require": { + "php": "^7.0", + "php-http/promise": "^1.0", + "psr/http-client": "^1.0", + "psr/http-message": "^1.0" + }, + "require-dev": { + "henrikbjorn/phpspec-code-coverage": "^1.0", + "phpspec/phpspec": "^2.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eric GELOEN", + "email": "geloen.eric@gmail.com" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "HTTPlug, the HTTP client abstraction for PHP", + "homepage": "http://httplug.io", + "keywords": [ + "client", + "http" + ], + "time": "2018-10-31T09:14:44+00:00" + }, + { + "name": "php-http/message", + "version": "1.7.2", + "source": { + "type": "git", + "url": "https://github.com/php-http/message.git", + "reference": "b159ffe570dffd335e22ef0b91a946eacb182fa1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/message/zipball/b159ffe570dffd335e22ef0b91a946eacb182fa1", + "reference": "b159ffe570dffd335e22ef0b91a946eacb182fa1", + "shasum": "" + }, + "require": { + "clue/stream-filter": "^1.4", + "php": "^5.4 || ^7.0", + "php-http/message-factory": "^1.0.2", + "psr/http-message": "^1.0" + }, + "provide": { + "php-http/message-factory-implementation": "1.0" + }, + "require-dev": { + "akeneo/phpspec-skip-example-extension": "^1.0", + "coduo/phpspec-data-provider-extension": "^1.0", + "ext-zlib": "*", + "guzzlehttp/psr7": "^1.0", + "henrikbjorn/phpspec-code-coverage": "^1.0", + "phpspec/phpspec": "^2.4", + "slim/slim": "^3.0", + "zendframework/zend-diactoros": "^1.0" + }, + "suggest": { + "ext-zlib": "Used with compressor/decompressor streams", + "guzzlehttp/psr7": "Used with Guzzle PSR-7 Factories", + "slim/slim": "Used with Slim Framework PSR-7 implementation", + "zendframework/zend-diactoros": "Used with Diactoros Factories" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Message\\": "src/" + }, + "files": [ + "src/filters.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "HTTP Message related tools", + "homepage": "http://php-http.org", + "keywords": [ + "http", + "message", + "psr-7" + ], + "time": "2018-11-01T09:32:41+00:00" + }, + { + "name": "php-http/message-factory", + "version": "v1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-http/message-factory.git", + "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1", + "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "Factory interfaces for PSR-7 HTTP Message", + "homepage": "http://php-http.org", + "keywords": [ + "factory", + "http", + "message", + "stream", + "uri" + ], + "time": "2015-12-19T14:08:53+00:00" + }, + { + "name": "php-http/multipart-stream-builder", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/multipart-stream-builder.git", + "reference": "1fa3c623fc813a43b39494b2a1612174e36e0fb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/multipart-stream-builder/zipball/1fa3c623fc813a43b39494b2a1612174e36e0fb0", + "reference": "1fa3c623fc813a43b39494b2a1612174e36e0fb0", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "php-http/discovery": "^1.0", + "php-http/message-factory": "^1.0.2", + "psr/http-message": "^1.0" + }, + "require-dev": { + "php-http/message": "^1.5", + "phpunit/phpunit": "^4.8 || ^5.4", + "zendframework/zend-diactoros": "^1.3.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.3-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Message\\MultipartStream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com" + } + ], + "description": "A builder class that help you create a multipart stream", + "homepage": "http://php-http.org", + "keywords": [ + "factory", + "http", + "message", + "multipart stream", + "stream" + ], + "time": "2017-05-21T17:45:25+00:00" + }, + { + "name": "php-http/promise", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/promise.git", + "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/promise/zipball/dc494cdc9d7160b9a09bd5573272195242ce7980", + "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980", + "shasum": "" + }, + "require-dev": { + "henrikbjorn/phpspec-code-coverage": "^1.0", + "phpspec/phpspec": "^2.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + }, + { + "name": "Joel Wurtz", + "email": "joel.wurtz@gmail.com" + } + ], + "description": "Promise used for asynchronous HTTP requests", + "homepage": "http://httplug.io", + "keywords": [ + "promise" + ], + "time": "2016-01-26T13:27:02+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "496a823ef742b632934724bf769560c2a5c7c44e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/496a823ef742b632934724bf769560c2a5c7c44e", + "reference": "496a823ef742b632934724bf769560c2a5c7c44e", + "shasum": "" + }, + "require": { + "php": "^7.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "time": "2018-10-30T23:29:13+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~3.7.0", + "satooshi/php-coveralls": ">=1.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2016-02-11T07:05:27+00:00" + } + ], + "packages-dev": [ + { + "name": "composer/semver", + "version": "1.4.2", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "c7cb9a2095a074d131b65a8a0cd294479d785573" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/c7cb9a2095a074d131b65a8a0cd294479d785573", + "reference": "c7cb9a2095a074d131b65a8a0cd294479d785573", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5 || ^5.0.5", + "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "time": "2016-08-30T16:08:34+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "1.3.2", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "d17708133b6c276d6e42ef887a877866b909d892" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/d17708133b6c276d6e42ef887a877866b909d892", + "reference": "d17708133b6c276d6e42ef887a877866b909d892", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0", + "psr/log": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "time": "2019-01-28T20:25:53+00:00" + }, + { + "name": "doctrine/annotations", + "version": "v1.6.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5", + "reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "php": "^7.1" + }, + "require-dev": { + "doctrine/cache": "1.*", + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "time": "2017-12-06T07:11:42+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "^6.2.3", + "squizlabs/php_codesniffer": "^3.0.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2017-07-22T11:58:36+00:00" + }, + { + "name": "doctrine/lexer", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Lexer\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "lexer", + "parser" + ], + "time": "2014-09-09T13:34:57+00:00" + }, + { + "name": "donatj/mock-webserver", + "version": "v2.0.0", + "source": { + "type": "git", + "url": "https://github.com/donatj/mock-webserver.git", + "reference": "0a124a2261fd99463267e82ca9c4eb37fb656cf7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/donatj/mock-webserver/zipball/0a124a2261fd99463267e82ca9c4eb37fb656cf7", + "reference": "0a124a2261fd99463267e82ca9c4eb37fb656cf7", + "shasum": "" + }, + "require": { + "ext-sockets": "*", + "php": ">=5.4", + "ralouphie/getallheaders": "~2.0" + }, + "require-dev": { + "donatj/drop": "^1.0", + "phpunit/phpunit": "4.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "donatj\\MockWebServer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jesse G. Donat", + "email": "donatj@gmail.com", + "homepage": "https://donatstudios.com", + "role": "Lead" + } + ], + "description": "Simple mock web server for unit testing", + "time": "2018-03-27T16:25:36+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v2.14.1", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", + "reference": "2e82abd1322897eb8aacb861e5ff551af3888349" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/2e82abd1322897eb8aacb861e5ff551af3888349", + "reference": "2e82abd1322897eb8aacb861e5ff551af3888349", + "shasum": "" + }, + "require": { + "composer/semver": "^1.4", + "composer/xdebug-handler": "^1.2", + "doctrine/annotations": "^1.2", + "ext-json": "*", + "ext-tokenizer": "*", + "php": "^5.6 || ^7.0", + "php-cs-fixer/diff": "^1.3", + "symfony/console": "^3.4.17 || ^4.1.6", + "symfony/event-dispatcher": "^3.0 || ^4.0", + "symfony/filesystem": "^3.0 || ^4.0", + "symfony/finder": "^3.0 || ^4.0", + "symfony/options-resolver": "^3.0 || ^4.0", + "symfony/polyfill-php70": "^1.0", + "symfony/polyfill-php72": "^1.4", + "symfony/process": "^3.0 || ^4.0", + "symfony/stopwatch": "^3.0 || ^4.0" + }, + "conflict": { + "hhvm": "*" + }, + "require-dev": { + "johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0", + "justinrainbow/json-schema": "^5.0", + "keradus/cli-executor": "^1.2", + "mikey179/vfsstream": "^1.6", + "php-coveralls/php-coveralls": "^2.1", + "php-cs-fixer/accessible-object": "^1.0", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.0.1", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.0.1", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1", + "phpunitgoodpractices/traits": "^1.5.1", + "symfony/phpunit-bridge": "^4.0" + }, + "suggest": { + "ext-mbstring": "For handling non-UTF8 characters in cache signature.", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", + "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "autoload": { + "psr-4": { + "PhpCsFixer\\": "src/" + }, + "classmap": [ + "tests/Test/AbstractFixerTestCase.php", + "tests/Test/AbstractIntegrationCaseFactory.php", + "tests/Test/AbstractIntegrationTestCase.php", + "tests/Test/Assert/AssertTokensTrait.php", + "tests/Test/IntegrationCase.php", + "tests/Test/IntegrationCaseFactory.php", + "tests/Test/IntegrationCaseFactoryInterface.php", + "tests/Test/InternalIntegrationCaseFactory.php", + "tests/TestCase.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dariusz Rumiński", + "email": "dariusz.ruminski@gmail.com" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "time": "2019-02-10T22:52:33+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.8.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2018-06-11T23:09:50+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v9.99.99", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "shasum": "" + }, + "require": { + "php": "^7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "time": "2018-07-02T15:55:56+00:00" + }, + { + "name": "php-cs-fixer/diff", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/diff.git", + "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/78bb099e9c16361126c86ce82ec4405ebab8e756", + "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.23 || ^6.4.3", + "symfony/process": "^3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "SpacePossum" + } + ], + "description": "sebastian/diff v2 backport support for PHP5.6", + "homepage": "https://github.com/PHP-CS-Fixer", + "keywords": [ + "diff" + ], + "time": "2018-02-15T16:58:55+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2017-09-11T18:02:19+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "4.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08", + "shasum": "" + }, + "require": { + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2017-11-30T07:14:17+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "time": "2017-07-14T14:27:02+00:00" + }, + { + "name": "phpspec/php-diff", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/php-diff.git", + "reference": "0464787bfa7cd13576c5a1e318709768798bec6a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/php-diff/zipball/0464787bfa7cd13576c5a1e318709768798bec6a", + "reference": "0464787bfa7cd13576c5a1e318709768798bec6a", + "shasum": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Diff": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Chris Boulton", + "homepage": "http://github.com/chrisboulton" + } + ], + "description": "A comprehensive library for generating differences between two hashable objects (strings or arrays).", + "time": "2016-04-07T12:29:16+00:00" + }, + { + "name": "phpspec/phpspec", + "version": "5.1.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/phpspec.git", + "reference": "4badea737c34a6c8e2921fca0f6a1cbe4f724f2f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/phpspec/zipball/4badea737c34a6c8e2921fca0f6a1cbe4f724f2f", + "reference": "4badea737c34a6c8e2921fca0f6a1cbe4f724f2f", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.5", + "ext-tokenizer": "*", + "php": "^7.1, <7.4", + "phpspec/php-diff": "^1.0.0", + "phpspec/prophecy": "^1.7", + "sebastian/exporter": "^1.0 || ^2.0 || ^3.0", + "symfony/console": "^3.4 || ^4.0", + "symfony/event-dispatcher": "^3.4 || ^4.0", + "symfony/finder": "^3.4 || ^4.0", + "symfony/process": "^3.4 || ^4.0", + "symfony/yaml": "^3.4 || ^4.0" + }, + "require-dev": { + "behat/behat": "^3.3", + "phpunit/phpunit": "^5.7 || ^6.0", + "symfony/filesystem": "^3.4 || ^4.0" + }, + "suggest": { + "phpspec/nyan-formatters": "Adds Nyan formatters" + }, + "bin": [ + "bin/phpspec" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1.x-dev" + } + }, + "autoload": { + "psr-0": { + "PhpSpec": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "homepage": "http://marcelloduarte.net/" + }, + { + "name": "Ciaran McNulty", + "homepage": "https://ciaranmcnulty.com/" + } + ], + "description": "Specification-oriented BDD framework for PHP 5.6+", + "homepage": "http://phpspec.net/", + "keywords": [ + "BDD", + "SpecBDD", + "TDD", + "spec", + "specification", + "testing", + "tests" + ], + "time": "2018-10-29T08:12:52+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2018-08-05T17:53:17+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "4.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d", + "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^5.6 || ^7.0", + "phpunit/php-file-iterator": "^1.3", + "phpunit/php-text-template": "^1.2", + "phpunit/php-token-stream": "^1.4.2 || ^2.0", + "sebastian/code-unit-reverse-lookup": "^1.0", + "sebastian/environment": "^1.3.2 || ^2.0", + "sebastian/version": "^1.0 || ^2.0" + }, + "require-dev": { + "ext-xdebug": "^2.1.4", + "phpunit/phpunit": "^5.7" + }, + "suggest": { + "ext-xdebug": "^2.5.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2017-04-02T07:44:40+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2017-11-27T13:52:08+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2017-02-26T11:10:40+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "791198a2c6254db10131eecfe8c06670700904db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", + "reference": "791198a2c6254db10131eecfe8c06670700904db", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.2.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2017-11-27T05:48:46+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "5.7.27", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", + "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "~1.3", + "php": "^5.6 || ^7.0", + "phpspec/prophecy": "^1.6.2", + "phpunit/php-code-coverage": "^4.0.4", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "^3.2", + "sebastian/comparator": "^1.2.4", + "sebastian/diff": "^1.4.3", + "sebastian/environment": "^1.3.4 || ^2.0", + "sebastian/exporter": "~2.0", + "sebastian/global-state": "^1.1", + "sebastian/object-enumerator": "~2.0", + "sebastian/resource-operations": "~1.0", + "sebastian/version": "^1.0.6|^2.0.1", + "symfony/yaml": "~2.1|~3.0|~4.0" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "3.0.2" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-xdebug": "*", + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.7.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2018-02-01T05:50:59+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "3.4.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "a23b761686d50a560cc56233b9ecf49597cc9118" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/a23b761686d50a560cc56233b9ecf49597cc9118", + "reference": "a23b761686d50a560cc56233b9ecf49597cc9118", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.6 || ^7.0", + "phpunit/php-text-template": "^1.2", + "sebastian/exporter": "^1.2 || ^2.0" + }, + "conflict": { + "phpunit/phpunit": "<5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2017-06-30T09:13:00+00:00" + }, + { + "name": "psr/log", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2018-11-20T15:27:04+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2017-03-04T06:30:41+00:00" + }, + { + "name": "sebastian/comparator", + "version": "1.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2 || ~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2017-01-29T09:50:25+00:00" + }, + { + "name": "sebastian/diff", + "version": "1.4.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2017-05-22T07:24:03+00:00" + }, + { + "name": "sebastian/environment", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2016-11-26T07:53:53+00:00" + }, + { + "name": "sebastian/exporter", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~2.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2016-11-19T08:54:04+00:00" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2015-10-12T03:26:01+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7", + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "sebastian/recursion-context": "~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2017-02-18T15:18:39+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2016-11-19T07:33:16+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28T20:34:47+00:00" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2016-10-03T07:35:21+00:00" + }, + { + "name": "symfony/console", + "version": "v4.2.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "1f0ad51dfde4da8a6070f06adc58b4e37cbb37a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/1f0ad51dfde4da8a6070f06adc58b4e37cbb37a4", + "reference": "1f0ad51dfde4da8a6070f06adc58b4e37cbb37a4", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/contracts": "^1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2019-01-25T14:35:16+00:00" + }, + { + "name": "symfony/contracts", + "version": "v1.0.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/contracts.git", + "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/contracts/zipball/1aa7ab2429c3d594dd70689604b5cf7421254cdf", + "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "require-dev": { + "psr/cache": "^1.0", + "psr/container": "^1.0" + }, + "suggest": { + "psr/cache": "When using the Cache contracts", + "psr/container": "When using the Service contracts", + "symfony/cache-contracts-implementation": "", + "symfony/service-contracts-implementation": "", + "symfony/translation-contracts-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\": "" + }, + "exclude-from-classmap": [ + "**/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A set of abstractions extracted out of the Symfony components", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2018-12-05T08:06:11+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v4.2.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "bd09ad265cd50b2b9d09d65ce6aba2d29bc81fe1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/bd09ad265cd50b2b9d09d65ce6aba2d29bc81fe1", + "reference": "bd09ad265cd50b2b9d09d65ce6aba2d29bc81fe1", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/contracts": "^1.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.4" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/expression-language": "~3.4|~4.0", + "symfony/stopwatch": "~3.4|~4.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2019-01-16T20:35:37+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v4.2.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "7c16ebc2629827d4ec915a52ac809768d060a4ee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/7c16ebc2629827d4ec915a52ac809768d060a4ee", + "reference": "7c16ebc2629827d4ec915a52ac809768d060a4ee", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2019-01-16T20:35:37+00:00" + }, + { + "name": "symfony/finder", + "version": "v4.2.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "ef71816cbb264988bb57fe6a73f610888b9aa70c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/ef71816cbb264988bb57fe6a73f610888b9aa70c", + "reference": "ef71816cbb264988bb57fe6a73f610888b9aa70c", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2019-01-16T20:35:37+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v4.2.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "831b272963a8aa5a0613a1a7f013322d8161bbbb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/831b272963a8aa5a0613a1a7f013322d8161bbbb", + "reference": "831b272963a8aa5a0613a1a7f013322d8161bbbb", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony OptionsResolver Component", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "time": "2019-01-16T21:31:25+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2018-08-06T14:22:27+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2018-09-21T13:07:52+00:00" + }, + { + "name": "symfony/polyfill-php70", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "6b88000cdd431cd2e940caa2cb569201f3f84224" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/6b88000cdd431cd2e940caa2cb569201f3f84224", + "reference": "6b88000cdd431cd2e940caa2cb569201f3f84224", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "~1.0|~2.0|~9.99", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php70\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2018-09-21T06:26:08+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "9050816e2ca34a8e916c3a0ae8b9c2fccf68b631" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9050816e2ca34a8e916c3a0ae8b9c2fccf68b631", + "reference": "9050816e2ca34a8e916c3a0ae8b9c2fccf68b631", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2018-09-21T13:07:52+00:00" + }, + { + "name": "symfony/process", + "version": "v4.2.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "6c05edb11fbeff9e2b324b4270ecb17911a8b7ad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/6c05edb11fbeff9e2b324b4270ecb17911a8b7ad", + "reference": "6c05edb11fbeff9e2b324b4270ecb17911a8b7ad", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "time": "2019-01-24T22:05:03+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v4.2.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "b1a5f646d56a3290230dbc8edf2a0d62cda23f67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/b1a5f646d56a3290230dbc8edf2a0d62cda23f67", + "reference": "b1a5f646d56a3290230dbc8edf2a0d62cda23f67", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/contracts": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Stopwatch Component", + "homepage": "https://symfony.com", + "time": "2019-01-16T20:31:39+00:00" + }, + { + "name": "symfony/yaml", + "version": "v4.2.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "d461670ee145092b7e2a56c1da7118f19cadadb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/d461670ee145092b7e2a56c1da7118f19cadadb0", + "reference": "d461670ee145092b7e2a56c1da7118f19cadadb0", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2019-01-16T20:35:37+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2018-12-25T11:19:39+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=7.2" + }, + "platform-dev": [] +} From 7ea1b09663b60b96c63387f1d652841640e2985f Mon Sep 17 00:00:00 2001 From: ahocquard Date: Thu, 14 Feb 2019 09:12:56 +0100 Subject: [PATCH 3/3] Deactivate process isolation for the tests --- phpunit.xml.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index adb60ede..33a2bc52 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -7,7 +7,7 @@ convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" - processIsolation="true" + processIsolation="false" stopOnFailure="false" syntaxCheck="false">