Files
robot-shop/ratings/html/src/Service/HealthCheckService.php
Cedric Ziel 83e1977b2f Transform ratings service to Symfony MicroKernel application
The ratings service contained a PHP 4 style code. This change
introduces a framework for processing the http-requests so we
dont have to do it on our own.

It'll also showcase how Instana is usable with modern PHP.
2020-06-22 11:26:49 +02:00

26 lines
377 B
PHP

<?php
declare(strict_types=1);
namespace Instana\RobotShop\Ratings\Service;
use PDO;
class HealthCheckService
{
/**
* @var PDO
*/
private $pdo;
public function __construct(PDO $pdo)
{
$this->pdo = $pdo;
}
public function checkConnectivity()
{
return $this->pdo->prepare('SELECT 1 + 1 FROM DUAL;')->execute();
}
}