Skip to content

Commit

Permalink
Remove suppression for RequireNullCoalesceEqualOperator
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Sep 30, 2021
1 parent 3e08e55 commit 3291848
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<exclude name="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming"/>
<exclude name="SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants.DisallowedLateStaticBindingForConstant"/>
<exclude name="SlevomatCodingStandard.ControlStructures.ControlStructureSpacing.IncorrectLinesCountAfterLastControlStructure"/>
<exclude name="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceEqualOperator.RequiredNullCoalesceEqualOperator"/>

<exclude name="PSR2.Methods.MethodDeclaration.Underscore"/>
<!-- https://github.com/slevomat/coding-standard/issues/867 -->
Expand Down
2 changes: 1 addition & 1 deletion src/Connections/PrimaryReadReplicaConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public function connect(?string $connectionName = null): void
protected function performConnect(?string $connectionName = null): void
{
$requestedConnectionChange = ($connectionName !== null);
$connectionName = $connectionName ?? 'replica';
$connectionName ??= 'replica';

if ($connectionName !== 'replica' && $connectionName !== 'primary') {
throw new InvalidArgumentException('Invalid option to connect(), only primary or replica allowed.');
Expand Down

0 comments on commit 3291848

Please sign in to comment.