summaryrefslogtreecommitdiff
path: root/app/Services
diff options
context:
space:
mode:
Diffstat (limited to 'app/Services')
-rw-r--r--app/Services/HomePageService.php3
-rw-r--r--app/Services/MessageService.php6
-rw-r--r--app/Services/SearchService.php3
-rw-r--r--app/Services/TimeoutService.php26
4 files changed, 8 insertions, 30 deletions
diff --git a/app/Services/HomePageService.php b/app/Services/HomePageService.php
index 97c8d5987f..99e15c28ca 100644
--- a/app/Services/HomePageService.php
+++ b/app/Services/HomePageService.php
@@ -39,8 +39,7 @@ use function is_numeric;
*/
class HomePageService
{
- /** @var ModuleService */
- private $module_service;
+ private ModuleService $module_service;
/**
* HomePageController constructor.
diff --git a/app/Services/MessageService.php b/app/Services/MessageService.php
index 7ea8fef105..fab15f1ed6 100644
--- a/app/Services/MessageService.php
+++ b/app/Services/MessageService.php
@@ -38,11 +38,9 @@ use function view;
*/
class MessageService
{
- /** @var UserService */
- private $user_service;
+ private EmailService $email_service;
- /** @var EmailService */
- private $email_service;
+ private UserService $user_service;
/**
* MessageService constructor.
diff --git a/app/Services/SearchService.php b/app/Services/SearchService.php
index 88d913c239..7b366dbd91 100644
--- a/app/Services/SearchService.php
+++ b/app/Services/SearchService.php
@@ -66,8 +66,7 @@ class SearchService
// Do not attempt to show search results larger than this/
protected const MAX_SEARCH_RESULTS = 5000;
- /** @var TreeService */
- private $tree_service;
+ private TreeService $tree_service;
/**
* SearchService constructor.
diff --git a/app/Services/TimeoutService.php b/app/Services/TimeoutService.php
index d59cce78fa..eb0598478a 100644
--- a/app/Services/TimeoutService.php
+++ b/app/Services/TimeoutService.php
@@ -19,23 +19,19 @@ declare(strict_types=1);
namespace Fisharebest\Webtrees\Services;
-use Psr\Http\Message\ServerRequestInterface;
-
-use function app;
-
/**
* Check for PHP timeouts.
*/
class TimeoutService
{
- /** @var float Long-running scripts run in small chunks */
+ //Long-running scripts run in small chunks
private const TIME_LIMIT = 1.5;
- /** @var float Seconds until we run out of time */
+ // Seconds until we run out of time
private const TIME_UP_THRESHOLD = 3.0;
- /** @var float|null The start time of the request */
- private $start_time;
+ // The start time of the request
+ private float $start_time;
/**
* TimeoutService constructor.
@@ -81,18 +77,4 @@ class TimeoutService
return $now > $this->start_time + $limit;
}
-
- /**
- * @return float
- */
- protected function startTime(): float
- {
- if ($this->start_time === null) {
- $request = app(ServerRequestInterface::class);
-
- $this->start_time = (float) ($request->getServerParams()['REQUEST_TIME_FLOAT'] ?? microtime(true));
- }
-
- return $this->start_time;
- }
}