Skip to content

Commit a5e00de

Browse files
committed
Add missing return types
1 parent 382777a commit a5e00de

File tree

5 files changed

+13
-2
lines changed

5 files changed

+13
-2
lines changed

Definition/BaseNode.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,8 @@ final public function finalize(mixed $value): mixed
442442
/**
443443
* Validates the type of a Node.
444444
*
445+
* @return void
446+
*
445447
* @throws InvalidTypeException when the value is invalid
446448
*/
447449
abstract protected function validateType(mixed $value);

Definition/PrototypedArrayNode.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ public function getPrototype(): PrototypeNodeInterface
156156
/**
157157
* Disable adding concrete children for prototyped nodes.
158158
*
159+
* @return never
160+
*
159161
* @throws Exception
160162
*/
161163
public function addChild(NodeInterface $node)

FileLocator.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ public function __construct(string|array $paths = [])
3030
$this->paths = (array) $paths;
3131
}
3232

33+
/**
34+
* @return string|array
35+
*/
3336
public function locate(string $name, string $currentPath = null, bool $first = true)
3437
{
3538
if ('' === $name) {

Loader/FileLoader.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ public function __construct(FileLocatorInterface $locator, string $env = null)
3939

4040
/**
4141
* Sets the current directory.
42+
*
43+
* @return void
4244
*/
4345
public function setCurrentDir(string $dir)
4446
{
@@ -62,6 +64,8 @@ public function getLocator(): FileLocatorInterface
6264
* @param string|null $sourceResource The original resource importing the new resource
6365
* @param string|string[]|null $exclude Glob patterns to exclude from the import
6466
*
67+
* @return mixed
68+
*
6569
* @throws LoaderLoadException
6670
* @throws FileLoaderImportCircularReferenceException
6771
* @throws FileLocatorFileNotFoundException
@@ -129,7 +133,7 @@ protected function glob(string $pattern, bool $recursive, array|GlobResource &$r
129133
yield from $resource;
130134
}
131135

132-
private function doImport(mixed $resource, string $type = null, bool $ignoreErrors = false, string $sourceResource = null)
136+
private function doImport(mixed $resource, string $type = null, bool $ignoreErrors = false, string $sourceResource = null): mixed
133137
{
134138
try {
135139
$loader = $this->resolve($resource, $type);

ResourceCheckerConfigCache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private function getMetaFile(): string
143143
return $this->file.'.meta';
144144
}
145145

146-
private function safelyUnserialize(string $file)
146+
private function safelyUnserialize(string $file): mixed
147147
{
148148
$meta = false;
149149
$content = file_get_contents($file);

0 commit comments

Comments
 (0)