summaryrefslogtreecommitdiff
path: root/app/Statistics
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2021-10-12 17:24:32 +0100
committerGreg Roach <greg@subaqua.co.uk>2021-10-12 17:24:32 +0100
commit09482a558a7989d76059e7f9911605cf836b77ba (patch)
tree4e3798a457db33169a72edacf920691f972fe487 /app/Statistics
parenteaab67460cd3818b1cafc8be2116ca8bb5575706 (diff)
downloadwebtrees-09482a558a7989d76059e7f9911605cf836b77ba.tar.gz
webtrees-09482a558a7989d76059e7f9911605cf836b77ba.tar.bz2
webtrees-09482a558a7989d76059e7f9911605cf836b77ba.zip
PHPdoc
Diffstat (limited to 'app/Statistics')
-rw-r--r--app/Statistics/Google/ChartDistribution.php5
-rw-r--r--app/Statistics/Repository/EventRepository.php2
-rw-r--r--app/Statistics/Repository/IndividualRepository.php8
-rw-r--r--app/Statistics/Repository/Interfaces/EventRepositoryInterface.php2
-rw-r--r--app/Statistics/Repository/MediaRepository.php2
5 files changed, 8 insertions, 11 deletions
diff --git a/app/Statistics/Google/ChartDistribution.php b/app/Statistics/Google/ChartDistribution.php
index b63661b61b..0edc5f585b 100644
--- a/app/Statistics/Google/ChartDistribution.php
+++ b/app/Statistics/Google/ChartDistribution.php
@@ -64,9 +64,9 @@ class ChartDistribution
private $placeRepository;
/**
- * @var string[]
+ * @var array<string>
*/
- private $country_to_iso3166;
+ private array $country_to_iso3166;
/**
* Constructor.
@@ -264,7 +264,6 @@ class ChartDistribution
$records = $this->queryRecords($surname);
foreach ($records as $row) {
- /** @var string[][] $matches */
if (preg_match_all('/^2 PLAC (?:.*, *)*(.*)/m', $row->i_gedcom, $matches)) {
// webtrees uses 3 letter country codes and localised country names,
// but google uses 2 letter codes.
diff --git a/app/Statistics/Repository/EventRepository.php b/app/Statistics/Repository/EventRepository.php
index 2b6be5eede..1756d15559 100644
--- a/app/Statistics/Repository/EventRepository.php
+++ b/app/Statistics/Repository/EventRepository.php
@@ -105,7 +105,7 @@ class EventRepository implements EventRepositoryInterface
}
/**
- * @param string[] $events
+ * @param array<string> $events
*
* @return string
*/
diff --git a/app/Statistics/Repository/IndividualRepository.php b/app/Statistics/Repository/IndividualRepository.php
index 3c13bbb6da..1c7eab58e5 100644
--- a/app/Statistics/Repository/IndividualRepository.php
+++ b/app/Statistics/Repository/IndividualRepository.php
@@ -80,7 +80,7 @@ class IndividualRepository implements IndividualRepositoryInterface
* @param int $threshold
* @param int $maxtoshow
*
- * @return string|int[]
+ * @return string|array<int>
*/
private function commonGivenQuery(string $sex, string $type, bool $show_tot, int $threshold, int $maxtoshow)
{
@@ -429,7 +429,7 @@ class IndividualRepository implements IndividualRepositoryInterface
/**
* Count the number of distinct given names (or the number of occurences of specific given names).
*
- * @param string[] ...$params
+ * @param array<string> ...$params
*
* @return string
*/
@@ -457,7 +457,7 @@ class IndividualRepository implements IndividualRepositoryInterface
/**
* Count the number of distinct surnames (or the number of occurrences of specific surnames).
*
- * @param string[] ...$params
+ * @param array<string> ...$params
*
* @return string
*/
@@ -484,7 +484,7 @@ class IndividualRepository implements IndividualRepositoryInterface
* @param int $number_of_surnames
* @param int $threshold
*
- * @return int[][]
+ * @return array<array<int>>
*/
private function topSurnames(int $number_of_surnames, int $threshold): array
{
diff --git a/app/Statistics/Repository/Interfaces/EventRepositoryInterface.php b/app/Statistics/Repository/Interfaces/EventRepositoryInterface.php
index 87d3defb45..4974cccc0e 100644
--- a/app/Statistics/Repository/Interfaces/EventRepositoryInterface.php
+++ b/app/Statistics/Repository/Interfaces/EventRepositoryInterface.php
@@ -27,7 +27,7 @@ interface EventRepositoryInterface
/**
* Count the number of events (with dates).
*
- * @param string[] $events
+ * @param array<string> $events
*
* @return string
*/
diff --git a/app/Statistics/Repository/MediaRepository.php b/app/Statistics/Repository/MediaRepository.php
index 4581aa58f2..2f12fc95c8 100644
--- a/app/Statistics/Repository/MediaRepository.php
+++ b/app/Statistics/Repository/MediaRepository.php
@@ -66,8 +66,6 @@ class MediaRepository implements MediaRepositoryInterface
/**
* List of GEDCOM media types.
- *
- * @var string[]
*/
private const MEDIA_TYPES = [
self::MEDIA_TYPE_AUDIO,