Skip to content

Commit 41a766c

Browse files
committed
minor #17480 Static code analysis (Koc)
This PR was merged into the 2.3 branch. Discussion ---------- Static code analysis | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Things that done: * fix case in method calls * removed unused imports * use shorter concat where it possible * optimize some css * removed duplicated array keys * removed redurant return statements * removed one-time variables * do not pass arguments that not used in functions Commits ------- 8db691a Static code analysis
2 parents e8acf91 + 13bc666 commit 41a766c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

HttpCache/HttpCache.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ protected function invalidate(Request $request, $catch = false)
255255
// invalidate only when the response is successful
256256
if ($response->isSuccessful() || $response->isRedirect()) {
257257
try {
258-
$this->store->invalidate($request, $catch);
258+
$this->store->invalidate($request);
259259

260260
// As per the RFC, invalidate Location and Content-Location URLs if present
261261
foreach (array('Location', 'Content-Location') as $header) {
@@ -481,7 +481,7 @@ protected function forward(Request $request, $catch = false, Response $entry = n
481481
$this->processResponseBody($request, $response);
482482

483483
if ($this->isPrivateRequest($request) && !$response->headers->hasCacheControlDirective('public')) {
484-
$response->setPrivate(true);
484+
$response->setPrivate();
485485
} elseif ($this->options['default_ttl'] > 0 && null === $response->getTtl() && !$response->headers->getCacheControlDirective('must-revalidate')) {
486486
$response->setTtl($this->options['default_ttl']);
487487
}

Profiler/SqliteProfilerStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ protected function fetch($db, $query, array $args = array())
7777
$return = array();
7878

7979
if ($db instanceof \SQLite3) {
80-
$stmt = $this->prepareStatement($db, $query, true);
80+
$stmt = $this->prepareStatement($db, $query);
8181
foreach ($args as $arg => $val) {
8282
$stmt->bindValue($arg, $val, is_int($val) ? \SQLITE3_INTEGER : \SQLITE3_TEXT);
8383
}

0 commit comments

Comments
 (0)