Skip to content

Commit 95ff26c

Browse files
committed
Fix lines being too long
1 parent d0168ba commit 95ff26c

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/Unleashed/SniffHelper.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ public static function getAliasesAndNonGlobalFunctionsDefinedInUseStatements(Fil
3232
continue;
3333
}
3434

35-
if ($useStatement->getAlias() !== null || \strpos($useStatement->getFullyQualifiedTypeName(), '\\') !== false) {
35+
if (
36+
$useStatement->getAlias() !== null
37+
|| \strpos($useStatement->getFullyQualifiedTypeName(), '\\') !== false
38+
) {
3639
$result[$useStatement->getCanonicalNameAsReferencedInFile()] = true;
3740
}
3841
}

src/Unleashed/Sniffs/Namespaces/FullyQualifiedGlobalFunctionsSniff.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ public function register()
8282
*/
8383
public function process(File $phpcsFile, $stackPtr)
8484
{
85-
if ($this->onlyOptimizedFunctions !== null && \filter_var($this->onlyOptimizedFunctions, FILTER_VALIDATE_BOOLEAN) !== false) {
85+
if (
86+
$this->onlyOptimizedFunctions !== null
87+
&& \filter_var($this->onlyOptimizedFunctions, FILTER_VALIDATE_BOOLEAN) !== false
88+
) {
8689
$globalFunctions = $this->optimizedFunctions;
8790
} else {
8891
$globalFunctions = \array_flip(\get_defined_functions()['internal']);
@@ -152,7 +155,10 @@ public function process(File $phpcsFile, $stackPtr)
152155
private function applyFix(File $phpcsFile, int $stackPtr, string $function): void
153156
{
154157
// This sniff conflicts with ModernClassNameReferenceSniff, so don't bother fixing things it will attempt to fix
155-
if (\array_key_exists(ModernClassNameReferenceSniff::class, $phpcsFile->ruleset->sniffs) && \in_array($function, ['get_class', 'get_parent_class', 'get_called_class'], true)) {
158+
if (
159+
\array_key_exists(ModernClassNameReferenceSniff::class, $phpcsFile->ruleset->sniffs)
160+
&& \in_array($function, ['get_class', 'get_parent_class', 'get_called_class'], true)
161+
) {
156162
return;
157163
}
158164

0 commit comments

Comments
 (0)