Skip to content

Commit 22d350d

Browse files
committed
phpunit ^7.5.4 and bump cs fixer
1 parent 59039a5 commit 22d350d

File tree

18 files changed

+21
-21
lines changed

18 files changed

+21
-21
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"phpdocumentor/reflection-docblock": "^3.0 || ^4.0",
4848
"phpdocumentor/type-resolver": "^0.3 || ^0.4",
4949
"phpspec/prophecy": "^1.8",
50-
"phpunit/phpunit": "^7.5.2",
50+
"phpunit/phpunit": "^7.5.4",
5151
"psr/log": "^1.0",
5252
"ramsey/uuid": "^3.7",
5353
"ramsey/uuid-doctrine": "^1.4",

src/Api/FormatsProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private function getOperationFormats(array $annotationFormats): array
9292
if (!\is_string($value)) {
9393
throw new InvalidArgumentException(sprintf("The 'formats' attributes value must be a string when trying to include an already configured format, %s given.", \gettype($value)));
9494
}
95-
if (array_key_exists($value, $this->configuredFormats)) {
95+
if (\array_key_exists($value, $this->configuredFormats)) {
9696
$resourceFormats[$value] = $this->configuredFormats[$value];
9797
continue;
9898
}

src/Bridge/Doctrine/MongoDbOdm/Filter/AbstractFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,6 @@ protected function isPropertyEnabled(string $property, string $resourceClass): b
8585
return !$this->isPropertyNested($property, $resourceClass);
8686
}
8787

88-
return array_key_exists($property, $this->properties);
88+
return \array_key_exists($property, $this->properties);
8989
}
9090
}

src/Bridge/Doctrine/MongoDbOdm/Paginator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public function count(): int
136136
private function getFacetInfo(string $field): array
137137
{
138138
foreach ($this->pipeline as $indexStage => $infoStage) {
139-
if (array_key_exists('$facet', $infoStage)) {
139+
if (\array_key_exists('$facet', $infoStage)) {
140140
if (!isset($this->pipeline[$indexStage]['$facet'][$field])) {
141141
throw new InvalidArgumentException("\"$field\" facet was not applied to the aggregation pipeline.");
142142
}

src/Bridge/Doctrine/Orm/Extension/EagerLoadingExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ private function addSelect(QueryBuilder $queryBuilder, string $entity, string $a
252252
}
253253

254254
// If it's an embedded property see below
255-
if (!array_key_exists($property, $targetClassMetadata->embeddedClasses)) {
255+
if (!\array_key_exists($property, $targetClassMetadata->embeddedClasses)) {
256256
//the field test allows to add methods to a Resource which do not reflect real database fields
257257
if ($targetClassMetadata->hasField($property) && (true === $propertyMetadata->getAttribute('fetchable') || $propertyMetadata->isReadable())) {
258258
$select[] = $property;

src/Bridge/Doctrine/Orm/Extension/PaginationExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function __construct(ManagerRegistry $managerRegistry, /* ResourceMetadat
8181
];
8282

8383
foreach ($legacyPaginationArgs as $pos => $arg) {
84-
if (array_key_exists($pos, $args)) {
84+
if (\array_key_exists($pos, $args)) {
8585
@trigger_error(sprintf('Passing "$%s" arguments is deprecated since API Platform 2.4 and will not be possible anymore in API Platform 3. Pass an instance of "%s" as third argument instead.', implode('", "$', array_column($legacyPaginationArgs, 'arg_name')), Paginator::class), E_USER_DEPRECATED);
8686

8787
if (!((null === $arg['default'] && null === $args[$pos]) || \call_user_func("is_{$arg['type']}", $args[$pos]))) {
@@ -261,7 +261,7 @@ private function isPaginationEnabled(Request $request, ResourceMetadata $resourc
261261
private function getPaginationParameter(Request $request, string $parameterName, $default = null)
262262
{
263263
if (null !== $paginationAttribute = $request->attributes->get('_api_pagination')) {
264-
return array_key_exists($parameterName, $paginationAttribute) ? $paginationAttribute[$parameterName] : $default;
264+
return \array_key_exists($parameterName, $paginationAttribute) ? $paginationAttribute[$parameterName] : $default;
265265
}
266266

267267
return $request->query->get($parameterName, $default);

src/Bridge/Doctrine/Orm/Filter/AbstractFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ protected function isPropertyEnabled(string $property/*, string $resourceClass*/
115115
return !$this->isPropertyNested($property, $resourceClass);
116116
}
117117

118-
return array_key_exists($property, $this->properties);
118+
return \array_key_exists($property, $this->properties);
119119
}
120120

121121
/**

src/Bridge/Elasticsearch/DataProvider/Paginator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function getIterator(): \Traversable
9999
foreach ($this->documents['hits']['hits'] ?? [] as $document) {
100100
$cacheKey = isset($document['_index'], $document['_type'], $document['_id']) ? md5("${document['_index']}_${document['_type']}_${document['_id']}") : null;
101101

102-
if ($cacheKey && array_key_exists($cacheKey, $this->cachedDenormalizedDocuments)) {
102+
if ($cacheKey && \array_key_exists($cacheKey, $this->cachedDenormalizedDocuments)) {
103103
$object = $this->cachedDenormalizedDocuments[$cacheKey];
104104
} else {
105105
$object = $this->denormalizer->denormalize(

src/Cache/CachedTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ trait CachedTrait
2727

2828
private function getCached(string $cacheKey, callable $getValue)
2929
{
30-
if (array_key_exists($cacheKey, $this->localCache)) {
30+
if (\array_key_exists($cacheKey, $this->localCache)) {
3131
return $this->localCache[$cacheKey];
3232
}
3333

src/DataProvider/Pagination.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,6 @@ private function getParameterFromContext(array $context, string $parameterName,
185185
{
186186
$filters = $context['filters'] ?? [];
187187

188-
return array_key_exists($parameterName, $filters) ? $filters[$parameterName] : $default;
188+
return \array_key_exists($parameterName, $filters) ? $filters[$parameterName] : $default;
189189
}
190190
}

0 commit comments

Comments
 (0)