Skip to content

Commit a282031

Browse files
Add return types - batch 1/n
1 parent 7ab070d commit a282031

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Data/Bundle/Reader/BundleEntryReaderInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,5 @@ interface BundleEntryReaderInterface extends BundleReaderInterface
5050
*
5151
* @throws MissingResourceException If the indices cannot be accessed
5252
*/
53-
public function readEntry(string $path, string $locale, array $indices, bool $fallback = true);
53+
public function readEntry(string $path, string $locale, array $indices, bool $fallback = true): mixed;
5454
}

Data/Bundle/Reader/BundleReaderInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ interface BundleReaderInterface
2424
* @return mixed returns an array or {@link \ArrayAccess} instance for
2525
* complex data, a scalar value otherwise
2626
*/
27-
public function read(string $path, string $locale);
27+
public function read(string $path, string $locale): mixed;
2828
}

Util/IcuVersion.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class IcuVersion
5050
*
5151
* @see normalize()
5252
*/
53-
public static function compare(string $version1, string $version2, string $operator, int $precision = null)
53+
public static function compare(string $version1, string $version2, string $operator, int $precision = null): bool
5454
{
5555
$version1 = self::normalize($version1, $precision);
5656
$version2 = self::normalize($version2, $precision);
@@ -83,7 +83,7 @@ public static function compare(string $version1, string $version2, string $opera
8383
* @return string|null the normalized ICU version or NULL if it couldn't be
8484
* normalized
8585
*/
86-
public static function normalize(string $version, ?int $precision)
86+
public static function normalize(string $version, ?int $precision): ?string
8787
{
8888
$version = preg_replace('/^(\d)\.(\d)/', '$1$2', $version);
8989

Util/Version.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Version
4040
*
4141
* @see normalize()
4242
*/
43-
public static function compare(string $version1, string $version2, string $operator, int $precision = null)
43+
public static function compare(string $version1, string $version2, string $operator, int $precision = null): bool
4444
{
4545
$version1 = self::normalize($version1, $precision);
4646
$version2 = self::normalize($version2, $precision);
@@ -66,7 +66,7 @@ public static function compare(string $version1, string $version2, string $opera
6666
* @return string|null the normalized version or NULL if it couldn't be
6767
* normalized
6868
*/
69-
public static function normalize(string $version, ?int $precision)
69+
public static function normalize(string $version, ?int $precision): ?string
7070
{
7171
if (null === $precision) {
7272
return $version;

0 commit comments

Comments
 (0)