Skip to content

Commit

Permalink
Fix CS/WS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Dec 24, 2023
1 parent c966362 commit cb5a3e3
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 24 deletions.
6 changes: 3 additions & 3 deletions src/CodeExporter.php
Expand Up @@ -27,7 +27,7 @@ public function constants(Snapshot $snapshot): string
'if (!defined(\'%s\')) define(\'%s\', %s);' . "\n",
$name,
$name,
$this->exportVariable($value)
$this->exportVariable($value),
);
}

Expand All @@ -53,7 +53,7 @@ function ()
$result .= sprintf(
'$GLOBALS[%s] = %s;' . PHP_EOL,
$this->exportVariable($name),
$this->exportVariable($value)
$this->exportVariable($value),
);
}

Expand All @@ -68,7 +68,7 @@ public function iniSettings(Snapshot $snapshot): string
$result .= sprintf(
'@ini_set(%s, %s);' . "\n",
$this->exportVariable($key),
$this->exportVariable($value)
$this->exportVariable($value),
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/Restorer.php
Expand Up @@ -90,8 +90,8 @@ private function restoreSuperGlobalArray(Snapshot $snapshot, string $superGlobal
$keys = array_keys(
array_merge(
$GLOBALS[$superGlobalArray],
$superGlobalVariables[$superGlobalArray]
)
$superGlobalVariables[$superGlobalArray],
),
);

foreach ($keys as $key) {
Expand Down
4 changes: 2 additions & 2 deletions src/Snapshot.php
Expand Up @@ -330,7 +330,7 @@ private function enumerateObjectsAndResources(mixed $variable, Context $processe
/** @noinspection SlowArrayOperationsInLoopInspection */
$result = array_merge(
$result,
$this->enumerateObjectsAndResources($element, $processed)
$this->enumerateObjectsAndResources($element, $processed),
);
} else {
$result[] = $element;
Expand All @@ -348,7 +348,7 @@ private function enumerateObjectsAndResources(mixed $variable, Context $processe
/** @noinspection SlowArrayOperationsInLoopInspection */
$result = array_merge(
$result,
$this->enumerateObjectsAndResources($value, $processed)
$this->enumerateObjectsAndResources($value, $processed),
);
} else {
$result[] = $value;
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/CodeExporterTest.php
Expand Up @@ -61,7 +61,7 @@ public function testCanExportIniSettingsToCode(): void

$this->assertMatchesRegularExpression(
$pattern,
$export
$export,
);
}

Expand All @@ -75,7 +75,7 @@ public function testCanExportConstantsToCode(): void

$this->assertStringContainsString(
"if (!defined('FOO')) define('FOO', 'BAR');",
$exporter->constants($snapshot)
$exporter->constants($snapshot),
);
}

Expand Down
26 changes: 13 additions & 13 deletions tests/unit/ExcludeListTest.php
Expand Up @@ -43,8 +43,8 @@ public function testStaticPropertyThatIsNotExcludedIsNotTreatedAsExcluded(): voi
$this->assertFalse(
$this->excludeList->isStaticPropertyExcluded(
ExcludedClass::class,
'property'
)
'property',
),
);
}

Expand All @@ -55,8 +55,8 @@ public function testClassCanBeExcluded(): void
$this->assertTrue(
$this->excludeList->isStaticPropertyExcluded(
ExcludedClass::class,
'property'
)
'property',
),
);
}

Expand All @@ -67,8 +67,8 @@ public function testSubclassesCanBeExcluded(): void
$this->assertTrue(
$this->excludeList->isStaticPropertyExcluded(
ExcludedChildClass::class,
'property'
)
'property',
),
);
}

Expand All @@ -79,8 +79,8 @@ public function testImplementorsCanBeExcluded(): void
$this->assertTrue(
$this->excludeList->isStaticPropertyExcluded(
ExcludedImplementor::class,
'property'
)
'property',
),
);
}

Expand All @@ -91,23 +91,23 @@ public function testClassNamePrefixesCanBeExcluded(): void
$this->assertTrue(
$this->excludeList->isStaticPropertyExcluded(
ExcludedClass::class,
'property'
)
'property',
),
);
}

public function testStaticPropertyCanBeExcluded(): void
{
$this->excludeList->addStaticProperty(
ExcludedClass::class,
'property'
'property',
);

$this->assertTrue(
$this->excludeList->isStaticPropertyExcluded(
ExcludedClass::class,
'property'
)
'property',
),
);
}
}
4 changes: 2 additions & 2 deletions tests/unit/SnapshotTest.php
Expand Up @@ -99,7 +99,7 @@ public function testConstructorExcludesAspectsWhenTheyShouldNotBeIncluded(): voi
false,
false,
false,
false
false,
);

$this->assertEmpty($snapshot->constants());
Expand All @@ -126,7 +126,7 @@ public function testExcludeListCanBeAccessed(): void
false,
false,
false,
false
false,
);

$this->assertSame($this->excludeList, $snapshot->excludeList());
Expand Down

0 comments on commit cb5a3e3

Please sign in to comment.