Skip to content

Remove unused private methods #49517

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,4 @@ public function testToStringParent()
$this->assertSame($exception->getTraceAsString(), $flattened->getTraceAsString());
$this->assertSame($exception->__toString(), $flattened->getAsString());
}

private function createException($foo): \Exception
{
return new \Exception();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -854,25 +854,6 @@ public function testCreateViewFlatlabelTranslationParametersClosureReceivesValue
$this->assertFlatViewWithlabelTranslationParameters($view);
}

private function assertScalarListWithChoiceValues(ChoiceListInterface $list)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
$this->assertSame(['a', 'b', 'c', 'd'], $list->getValues());

$this->assertSame([
'a' => 'a',
'b' => 'b',
'c' => 'c',
'd' => 'd',
], $list->getChoices());

$this->assertSame([
'a' => 'A',
'b' => 'B',
'c' => 'C',
'd' => 'D',
], $list->getOriginalKeys());
}

private function assertObjectListWithGeneratedValues(ChoiceListInterface $list)
{
$this->assertSame(['0', '1', '2', '3'], $list->getValues());
Expand All @@ -892,25 +873,6 @@ private function assertObjectListWithGeneratedValues(ChoiceListInterface $list)
], $list->getOriginalKeys());
}

private function assertScalarListWithCustomValues(ChoiceListInterface $list)
{
$this->assertSame(['a', 'b', '1', '2'], $list->getValues());

$this->assertSame([
'a' => 'a',
'b' => 'b',
1 => 'c',
2 => 'd',
], $list->getChoices());

$this->assertSame([
'a' => 'A',
'b' => 'B',
1 => 'C',
2 => 'D',
], $list->getOriginalKeys());
}

private function assertObjectListWithCustomValues(ChoiceListInterface $list)
{
$this->assertSame(['a', 'b', '1', '2'], $list->getValues());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -524,11 +524,6 @@ public function setup(): void
$this->autoSetup = false;
}

private function getCurrentTimeInMilliseconds(): int
{
return (int) (microtime(true) * 1000);
}

public function cleanup(): void
{
static $unlink = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,4 @@ final public function host(string|array $host): static

return $this;
}

private function createRoute(string $path): Route
{
return (clone $this->route)->setPath($path);
}
}
18 changes: 0 additions & 18 deletions src/Symfony/Component/VarDumper/Tests/Dumper/CliDumperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,22 +449,4 @@ public function testDumpArrayWithColor($value, $flags, $expectedOut)

$this->assertSame($expectedOut, $out);
}

private function getSpecialVars()
{
foreach (array_keys($GLOBALS) as $var) {
if ('GLOBALS' !== $var) {
unset($GLOBALS[$var]);
}
}

$var = function &() {
$var = [];
$var[] = &$var;

return $var;
};

return eval('return [$var(), $GLOBALS, &$GLOBALS];');
}
}