Skip to content

Commit 018e56b

Browse files
committed
Update php-cs-fixer and tighten CS
1 parent 903397f commit 018e56b

39 files changed

+5
-58
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
- *update-composer
8787
- run:
8888
name: Install PHP-CS-Fixer
89-
command: composer global require friendsofphp/php-cs-fixer:^2.12
89+
command: composer global require friendsofphp/php-cs-fixer:^2.13
9090
- *save-composer-cache-by-revision
9191
- *save-composer-cache-by-branch
9292
- run:

.php_cs.dist

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@ return PhpCsFixer\Config::create()
4545
'header' => $header,
4646
'location' => 'after_open',
4747
],
48-
'native_function_invocation' => [
49-
'include' => [
50-
'@compiler_optimized',
51-
],
52-
],
5348
'no_extra_blank_lines' => [
5449
'tokens' => [
5550
'break',
@@ -74,8 +69,11 @@ return PhpCsFixer\Config::create()
7469
],
7570
'sortAlgorithm' => 'alpha',
7671
],
72+
'php_unit_method_casing' => [
73+
'case' => 'camel_case',
74+
],
7775
'phpdoc_order' => true,
78-
// 'simplified_null_return' => true,
76+
'phpdoc_trim_consecutive_blank_line_separation' => true,
7977
'strict_comparison' => true,
8078
'strict_param' => true,
8179
'ternary_to_null_coalescing' => true,

src/Api/FilterLocatorTrait.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ private function setFilterLocator($filterLocator = null, bool $allowNull = false
4848
/**
4949
* Gets a filter with a backward compatibility.
5050
*
51-
*
5251
* @return FilterInterface|null
5352
*/
5453
private function getFilter(string $filterId)

src/Api/IriConverterInterface.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ interface IriConverterInterface
2727
/**
2828
* Retrieves an item from its IRI.
2929
*
30-
*
3130
* @throws InvalidArgumentException
3231
* @throws ItemNotFoundException
3332
*
@@ -48,23 +47,20 @@ public function getIriFromItem($item, int $referenceType = UrlGeneratorInterface
4847
/**
4948
* Gets the IRI associated with the given resource collection.
5049
*
51-
*
5250
* @throws InvalidArgumentException
5351
*/
5452
public function getIriFromResourceClass(string $resourceClass, int $referenceType = UrlGeneratorInterface::ABS_PATH): string;
5553

5654
/**
5755
* Gets the item IRI associated with the given resource.
5856
*
59-
*
6057
* @throws InvalidArgumentException
6158
*/
6259
public function getItemIriFromResourceClass(string $resourceClass, array $identifiers, int $referenceType = UrlGeneratorInterface::ABS_PATH): string;
6360

6461
/**
6562
* Gets the IRI associated with the given resource subresource.
6663
*
67-
*
6864
* @throws InvalidArgumentException
6965
*/
7066
public function getSubresourceIriFromResourceClass(string $resourceClass, array $identifiers, int $referenceType = UrlGeneratorInterface::ABS_PATH): string;

src/Api/OperationMethodResolverInterface.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,13 @@ interface OperationMethodResolverInterface
2525
/**
2626
* Resolves the uppercased HTTP method associated with a collection operation.
2727
*
28-
*
2928
* @throws RuntimeException
3029
*/
3130
public function getCollectionOperationMethod(string $resourceClass, string $operationName): string;
3231

3332
/**
3433
* Resolves the uppercased HTTP method associated with an item operation.
3534
*
36-
*
3735
* @throws RuntimeException
3836
*/
3937
public function getItemOperationMethod(string $resourceClass, string $operationName): string;

src/Api/ResourceClassResolverInterface.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ interface ResourceClassResolverInterface
2525
/**
2626
* Guesses the associated resource.
2727
*
28-
*
2928
* @throws InvalidArgumentException
3029
*/
3130
public function getResourceClass($value, string $resourceClass = null, bool $strict = false): string;

src/Bridge/Doctrine/Common/DataPersister.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ public function remove($data)
7878
/**
7979
* Gets the Doctrine object manager associated with given data.
8080
*
81-
*
8281
* @return DoctrineObjectManager|null
8382
*/
8483
private function getManager($data)

src/Bridge/Doctrine/EventListener/WriteListener.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public function onKernelView(GetResponseForControllerResultEvent $event)
7272
/**
7373
* Gets the manager if applicable.
7474
*
75-
*
7675
* @return ObjectManager|null
7776
*/
7877
private function getManager(string $resourceClass, $data)

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ protected function extractProperties(Request $request/*, string $resourceClass*/
262262
/**
263263
* Adds the necessary joins for a nested property.
264264
*
265-
*
266265
* @throws InvalidArgumentException If property is not nested
267266
*
268267
* @return array An array where the first element is the join $alias of the leaf entity,

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,6 @@ protected function isNullableField(string $property, string $resourceClass): boo
167167
/**
168168
* Determines whether an association is nullable.
169169
*
170-
*
171-
*
172170
* @see https://github.com/doctrine/doctrine2/blob/v2.5.4/lib/Doctrine/ORM/Tools/EntityGenerator.php#L1221-L1246
173171
*/
174172
private function isAssociationNullable(array $associationMapping): bool

0 commit comments

Comments
 (0)