8000 [Cache] cs fix · symfony/symfony@20fd925 · GitHub
[go: up one dir, main page]

Skip to content

Commit 20fd925

Browse files
[Cache] cs fix
1 parent fd50d68 commit 20fd925

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Symfony/Component/Cache/Adapter/FilesystemTagAwareAdapter.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,20 +106,20 @@ protected function doDelete(array $ids, array $tagData = []): bool
106106
protected function doInvalidate(array $tagIds): bool
107107
{
108108
foreach ($tagIds as $tagId) {
109-
if (!file_exists($tagsFolder = $this->getTagFolder($tagId))) {
109+
if (!file_exists($tagFolder = $this->getTagFolder($tagId))) {
110110
continue;
111111
}
112112

113113
set_error_handler(static function () {});
114114

115115
try {
116-
if (rename($tagsFolder, $renamed = substr_replace($tagsFolder, bin2hex(random_bytes(4)), -1))) {
117-
$tagsFolder = $renamed.\DIRECTORY_SEPARATOR;
116+
if (rename($tagFolder, $renamed = substr_replace($tagFolder, bin2hex(random_bytes(4)), -1))) {
117+
$tagFolder< 6880 /span> = $renamed.\DIRECTORY_SEPARATOR;
118118
} else {
119119
$renamed = null;
120120
}
121121

122-
foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($tagsFolder, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::CURRENT_AS_PATHNAME)) as $itemLink) {
122+
foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($tagFolder, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::CURRENT_AS_PATHNAME)) as $itemLink) {
123123
unlink(realpath($itemLink) ?: $itemLink);
124124
unlink($itemLink);
125125
}
@@ -132,9 +132,9 @@ protected function doInvalidate(array $tagIds): bool
132132

133133
for ($i = 0; $i < 38; ++$i) {
134134
for ($j = 0; $j < 38; ++$j) {
135-
rmdir($tagsFolder.$chars[$i].\DIRECTORY_SEPARATOR.$chars[$j]);
135+
rmdir($tagFolder.$chars[$i].\DIRECTORY_SEPARATOR.$chars[$j]);
136136
}
137-
rmdir($tagsFolder.$chars[$i]);
137+
rmdir($tagFolder.$chars[$i]);
138138
}
139139
rmdir($renamed);
140140
} finally {

0 commit comments

Comments
 (0)
0