Skip to content

Commit ba3f5c8

Browse files
Add return types, round 1
1 parent 202d35d commit ba3f5c8

File tree

6 files changed

+7
-12
lines changed

6 files changed

+7
-12
lines changed

Data/Bundle/Reader/BufferedBundleReader.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ class BufferedBundleReader implements BundleReaderInterface
2323
private $reader;
2424
private $buffer;
2525

26-
/**
27-
* Buffers a given reader.
28-
*
29-
* @param int $bufferSize The number of entries to store in the buffer
30-
*/
3126
public function __construct(BundleReaderInterface $reader, int $bufferSize)
3227
{
3328
$this->reader = $reader;
@@ -37,7 +32,7 @@ public function __construct(BundleReaderInterface $reader, int $bufferSize)
3732
/**
3833
* {@inheritdoc}
3934
*/
40-
public function read(string $path, string $locale)
35+
public function read(string $path, string $locale): mixed
4136
{
4237
$hash = $path.'//'.$locale;
4338

Data/Bundle/Reader/BundleEntryReader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ public function setLocaleAliases(array $localeAliases)
6161
/**
6262
* {@inheritdoc}
6363
*/
64-
public function read(string $path, string $locale)
64+
public function read(string $path, string $locale): mixed
6565
{
6666
return $this->reader->read($path, $locale);
6767
}
6868

6969
/**
7070
* {@inheritdoc}
7171
*/
72-
public function readEntry(string $path, string $locale, array $indices, bool $fallback = true)
72+
public function readEntry(string $path, string $locale, array $indices, bool $fallback = true): mixed
7373
{
7474
$entry = null;
7575
$isMultiValued = false;

Data/Bundle/Reader/IntlBundleReader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class IntlBundleReader implements BundleReaderInterface
2626
/**
2727
* {@inheritdoc}
2828
*/
29-
public function read(string $path, string $locale)
29+
public function read(string $path, string $locale): mixed
3030
{
3131
// Point for future extension: Modify this class so that it works also
3232
// if the \ResourceBundle class is not available.

Data/Bundle/Reader/JsonBundleReader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class JsonBundleReader implements BundleReaderInterface
2626
/**
2727
* {@inheritdoc}
2828
*/
29-
public function read(string $path, string $locale)
29+
public function read(string $path, string $locale): mixed
3030
{
3131
$fileName = $path.'/'.$locale.'.json';
3232

Data/Bundle/Reader/PhpBundleReader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class PhpBundleReader implements BundleReaderInterface
2525
/**
2626
* {@inheritdoc}
2727
*/
28-
public function read(string $path, string $locale)
28+
public function read(string $path, string $locale): mixed
2929
{
3030
$fileName = $path.'/'.$locale.'.php';
3131

ResourceBundle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ abstract protected static function getPath(): string;
4343
* @return mixed returns an array or {@link \ArrayAccess} instance for
4444
* complex data and a scalar value for simple data
4545
*/
46-
final protected static function readEntry(array $indices, string $locale = null, bool $fallback = true)
46+
final protected static function readEntry(array $indices, string $locale = null, bool $fallback = true): mixed
4747
{
4848
if (null === self::$entryReader) {
4949
self::$entryReader = new BundleEntryReader(new BufferedBundleReader(

0 commit comments

Comments
 (0)