Skip to content

Commit

Permalink
[automated] Apply Coding Standard (#5550)
Browse files Browse the repository at this point in the history
Co-authored-by: TomasVotruba <TomasVotruba@users.noreply.github.com>
  • Loading branch information
TomasVotruba and TomasVotruba committed Feb 4, 2024
1 parent 0242b2a commit b85682b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ public function matchAlwaysStrictReturns(ClassMethod|Closure|Function_ $function
return [];
}

if ($this->betterNodeFinder->hasInstancesOfInFunctionLikeScoped($functionLike, [Yield_::class, YieldFrom::class])) {
if ($this->betterNodeFinder->hasInstancesOfInFunctionLikeScoped(
$functionLike,
[Yield_::class, YieldFrom::class]
)) {
return [];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ public function matchAlwaysReturnNativeCallLikes(ClassMethod|Closure|Function_ $
return null;
}

if ($this->betterNodeFinder->hasInstancesOfInFunctionLikeScoped($functionLike, [Yield_::class, YieldFrom::class])) {
if ($this->betterNodeFinder->hasInstancesOfInFunctionLikeScoped(
$functionLike,
[Yield_::class, YieldFrom::class]
)) {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ public function matchAlwaysReturnVariableNew(ClassMethod|Closure|Function_ $func
return null;
}

if ($this->betterNodeFinder->hasInstancesOfInFunctionLikeScoped($functionLike, [Yield_::class, YieldFrom::class])) {
if ($this->betterNodeFinder->hasInstancesOfInFunctionLikeScoped(
$functionLike,
[Yield_::class, YieldFrom::class]
)) {
return null;
}

Expand Down
5 changes: 4 additions & 1 deletion rules/TypeDeclaration/TypeInferer/SilentVoidResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ public function hasExclusiveVoid(ClassMethod | Closure | Function_ $functionLike
return false;
}

if ($this->betterNodeFinder->hasInstancesOfInFunctionLikeScoped($functionLike, [Yield_::class, YieldFrom::class])) {
if ($this->betterNodeFinder->hasInstancesOfInFunctionLikeScoped(
$functionLike,
[Yield_::class, YieldFrom::class]
)) {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Console/ConsoleApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct(array $commands)
public function doRun(InputInterface $input, OutputInterface $output): int
{
$isXdebugAllowed = $input->hasParameterOption('--xdebug');
if (!$isXdebugAllowed) {
if (! $isXdebugAllowed) {
$xdebugHandler = new XdebugHandler('rector');
$xdebugHandler->setPersistent();
$xdebugHandler->check();
Expand Down

0 comments on commit b85682b

Please sign in to comment.