Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 0c954cd

Browse files
committed
magento/magento2#22200: Static test fix.
1 parent 7a87e4d commit 0c954cd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pub/health_check.php

+10
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,17 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
/**
8+
* phpcs:disable PSR1.Files.SideEffects
9+
* phpcs:disable Squiz.Functions.GlobalFunction
10+
*/
711
use Magento\Framework\Config\ConfigOptionsListConstants;
812

13+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
914
register_shutdown_function("fatalErrorHandler");
1015

1116
try {
17+
// phpcs:ignore Magento2.Security.IncludeFile
1218
require __DIR__ . '/../app/bootstrap.php';
1319
/** @var \Magento\Framework\App\ObjectManagerFactory $objectManagerFactory */
1420
$objectManagerFactory = \Magento\Framework\App\Bootstrap::createObjectManagerFactory(BP, []);
@@ -20,6 +26,7 @@
2026
$logger = $objectManager->get(\Psr\Log\LoggerInterface::class);
2127
} catch (\Exception $e) {
2228
http_response_code(500);
29+
// phpcs:ignore Magento2.Security.LanguageConstruct
2330
exit(1);
2431
}
2532

@@ -35,6 +42,7 @@
3542
} catch (\Exception $e) {
3643
http_response_code(500);
3744
$logger->error("MySQL connection failed: " . $e->getMessage());
45+
// phpcs:ignore Magento2.Security.LanguageConstruct
3846
exit(1);
3947
}
4048
}
@@ -47,6 +55,7 @@
4755
!isset($cacheConfig[ConfigOptionsListConstants::CONFIG_PATH_BACKEND_OPTIONS])) {
4856
http_response_code(500);
4957
$logger->error("Cache configuration is invalid");
58+
// phpcs:ignore Magento2.Security.LanguageConstruct
5059
exit(1);
5160
}
5261
$cacheBackendClass = $cacheConfig[ConfigOptionsListConstants::CONFIG_PATH_BACKEND];
@@ -57,6 +66,7 @@
5766
} catch (\Exception $e) {
5867
http_response_code(500);
5968
$logger->error("Cache storage is not accessible");
69+
// phpcs:ignore Magento2.Security.LanguageConstruct
6070
exit(1);
6171
}
6272
}

0 commit comments

Comments
 (0)