Skip to content

Commit

Permalink
Merge pull request #13 from android-com-pl/analysis-yrLpeb
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
rafaucau committed May 15, 2023
2 parents 20d034d + fa94897 commit 673d852
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Utility/HtaccessManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct(Paths $paths)
}

/**
* Updates the .htaccess file with the new LSCache block content. If the LSCache block is already there, it replaces it. Otherwise, it appends it
* Updates the .htaccess file with the new LSCache block content. If the LSCache block is already there, it replaces it. Otherwise, it appends it.
* @throws FileNotFoundException
*/
public function updateHtaccess(): void
Expand Down Expand Up @@ -69,6 +69,7 @@ private function hasLsCacheBlock(string $htaccessContent): bool
private function replaceLsCacheBlock(string $htaccessContent, string $newContent): string
{
$pattern = '/'.preg_quote(self::BEGIN_LSCACHE, '/').'.*'.preg_quote(self::END_LSCACHE, '/').'/s';

return preg_replace($pattern, $newContent, $htaccessContent);
}

Expand All @@ -79,7 +80,7 @@ private function prependLsCacheBlock(string $htaccessContent, string $newContent
}

/**
* Removes the LSCache block from the .htaccess file. If the block is not present, it does nothing
* Removes the LSCache block from the .htaccess file. If the block is not present, it does nothing.
* @throws FileNotFoundException
*/
public function removeLsCacheBlock(): void
Expand Down

0 comments on commit 673d852

Please sign in to comment.