Skip to content

Commit

Permalink
Merge branch '1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwojs committed Jan 4, 2021
2 parents 99897c4 + 3b6d433 commit 4168bc5
Show file tree
Hide file tree
Showing 160 changed files with 194 additions and 213 deletions.
30 changes: 6 additions & 24 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -1,30 +1,12 @@
<?php

return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'concat_space' => ['spacing' => 'one'],
'array_syntax' => false,
'simplified_null_return' => false,
'phpdoc_align' => false,
'phpdoc_separation' => false,
'phpdoc_to_comment' => false,
'cast_spaces' => false,
'blank_line_after_opening_tag' => false,
'single_blank_line_before_namespace' => false,
'phpdoc_annotation_without_dot' => false,
'phpdoc_no_alias_tag' => false,
'space_after_semicolon' => false,
'yoda_style' => false,
'no_break_comment' => false,
])
->setRiskyAllowed(true)
return EzSystems\EzPlatformCodeStyle\PhpCsFixer\EzPlatformInternalConfigFactory::build()
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude([
'vendor',
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->files()->name('*.php')
);
)
;
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"require-dev": {
"phpunit/phpunit": "^8.2",
"ezsystems/ezplatform-code-style": "^0.1.0",
"ezsystems/ezplatform-code-style": "^0.4",
"dg/bypass-finals": "^1.1"
},
"autoload": {
Expand Down
5 changes: 1 addition & 4 deletions src/bundle/Command/ExportCommand.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);

namespace EzSystems\EzRecommendationClientBundle\Command;

use EzSystems\EzRecommendationClient\Factory\ExportParametersFactoryInterface;
use EzSystems\EzRecommendationClient\Helper\ParamsConverterHelper;

use EzSystems\EzRecommendationClient\Http\HttpEnvironmentInterface;
use EzSystems\EzRecommendationClient\Service\ExportServiceInterface;
use EzSystems\EzRecommendationClient\Value\ExportParameters;
use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Command/UserAttributesUpdateCommand.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Controller/ContentController.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
4 changes: 2 additions & 2 deletions src/bundle/Controller/ContentTypeController.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);

namespace EzSystems\EzRecommendationClientBundle\Controller;

use eZ\Publish\API\Repository\Repository;
use eZ\Publish\API\Repository\LocationService as LocationServiceInterface;
use eZ\Publish\API\Repository\Repository;
use eZ\Publish\API\Repository\SearchService as SearchServiceInterface;
use eZ\Publish\API\Repository\Values\Content\Query;
use eZ\Publish\API\Repository\Values\Content\Query\Criterion;
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Controller/ExportController.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Controller/RecommendationController.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
3 changes: 2 additions & 1 deletion src/bundle/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
4 changes: 2 additions & 2 deletions src/bundle/DependencyInjection/ConfigurationMapper.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand All @@ -10,7 +11,6 @@
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface;
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\HookableConfigurationMapperInterface;
use EzSystems\EzRecommendationClient\Value\Parameters;
use Symfony\Component\DependencyInjection\ContainerInterface;

class ConfigurationMapper implements HookableConfigurationMapperInterface
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/EzRecommendationClientBundle.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/ParamConverter/ExportRequestParamConverter.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/ParamConverter/ListParamConverter.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Serializer/Normalizer/AttributeNormalizer.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
4 changes: 2 additions & 2 deletions src/bundle/Serializer/Normalizer/UserCollectionNormalizer.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down Expand Up @@ -53,7 +53,7 @@ private function getNormalizedUsers(UserCollection $object): array
$users = $this->owningNormalizer->normalize($object->getUsers());

$normalizedUsers = [];
$normalizedUsers[self::ATTR_NAME] = array_map(function ($item) {
$normalizedUsers[self::ATTR_NAME] = array_map(static function ($item) {
return $item[self::ATTR_NAME];
}, $users);

Expand Down
4 changes: 2 additions & 2 deletions src/bundle/Serializer/Normalizer/UserNormalizer.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down Expand Up @@ -61,7 +61,7 @@ private function getNormalizedAttributes(array $attributes): array
$attributes = $this->owningNormalizer->normalize($attributes);

$normalizedAttributes = [];
$normalizedAttributes['attribute'] = array_map(function ($item) {
$normalizedAttributes['attribute'] = array_map(static function ($item) {
return $item['attribute'];
}, $attributes);

Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Templating/Twig/Functions/AbstractFunction.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Templating/Twig/Functions/Recommendation.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Templating/Twig/Functions/UserTracking.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Templating/Twig/RecommendationExtension.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/API/AbstractAPI.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/API/AllowedAPI.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/API/EventTracking.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/API/Notifier.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/API/Recommendation.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/API/User.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Authentication/AuthenticatorInterface.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Authentication/ExportAuthenticator.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
3 changes: 2 additions & 1 deletion src/lib/Authentication/FileAuthenticatorInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
6 changes: 2 additions & 4 deletions src/lib/Client/EzRecommendationClient.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand All @@ -15,15 +15,13 @@
use EzSystems\EzRecommendationClient\Exception\CredentialsNotFoundException;
use EzSystems\EzRecommendationClient\Factory\EzRecommendationClientAPIFactory;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\Exception\BadResponseException as GuzzleBadResponseException;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Middleware;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\UriInterface;
use Psr\Log\LoggerInterface;
use function GuzzleHttp\Psr7\str;

final class EzRecommendationClient implements EzRecommendationClientInterface
{
Expand Down Expand Up @@ -233,7 +231,7 @@ private function getRequestLogMessage(array $transaction): string
$method = 'Method: ' . $transaction['request']->getMethod();
$requestHeaders = $this->getHeadersAsString($transaction['request']->getheaders());

$message .= 'RequestUri: ' . $requestUri . self::MESSAGE_SEPARATOR . $method . self::MESSAGE_SEPARATOR . '?'. $requestHeaders;
$message .= 'RequestUri: ' . $requestUri . self::MESSAGE_SEPARATOR . $method . self::MESSAGE_SEPARATOR . '?' . $requestHeaders;
}

if (isset($transaction['response']) && $transaction['response'] instanceof ResponseInterface) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Client/EzRecommendationClientInterface.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
Expand Down
Loading

0 comments on commit 4168bc5

Please sign in to comment.