Skip to content

Commit

Permalink
Add remaining missing return types to safe methods
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterj authored and nicolas-grekas committed Apr 24, 2023
1 parent 0cc4ef7 commit 49c7d14
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Data/Generator/AbstractDataGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ public function generateData(GeneratorConfig $config): void
*/
abstract protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array;

abstract protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir);
abstract protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir): void;

abstract protected function preGenerate();
abstract protected function preGenerate(): void;

abstract protected function generateDataForLocale(BundleEntryReaderInterface $reader, string $tempDir, string $displayLocale): ?array;

Expand Down
2 changes: 1 addition & 1 deletion Data/Util/ArrayAccessibleResourceBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct(\ResourceBundle $bundleImpl)
$this->bundleImpl = $bundleImpl;
}

public function get(int|string $offset)
public function get(int|string $offset): mixed
{
$value = $this->bundleImpl->get($offset);

Expand Down
2 changes: 1 addition & 1 deletion Data/Util/RecursiveArrayAccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
class RecursiveArrayAccess
{
public static function get(mixed $array, array $indices)
public static function get(mixed $array, array $indices): mixed
{
foreach ($indices as $index) {
// Use array_key_exists() for arrays, isset() otherwise
Expand Down

0 comments on commit 49c7d14

Please sign in to comment.