Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0254139

Browse filesBrowse files
committed
[Config] Add type-hints to public interfaces
1 parent c10ad18 commit 0254139
Copy full SHA for 0254139

7 files changed

+8
-8
lines changed

‎src/Symfony/Component/Config/ConfigCacheFactoryInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/ConfigCacheFactoryInterface.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ interface ConfigCacheFactoryInterface
2828
*
2929
* @return ConfigCacheInterface The cache instance
3030
*/
31-
public function cache($file, $callable);
31+
public function cache(string $file, $callable);
3232
}

‎src/Symfony/Component/Config/ConfigCacheInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/ConfigCacheInterface.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@ public function isFresh();
4545
*
4646
* @throws \RuntimeException When the cache file cannot be written
4747
*/
48-
public function write($content, array $metadata = null);
48+
public function write(string $content, array $metadata = null);
4949
}

‎src/Symfony/Component/Config/Definition/PrototypeNodeInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/Definition/PrototypeNodeInterface.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ interface PrototypeNodeInterface extends NodeInterface
2323
*
2424
* @param string $name The name of the node
2525
*/
26-
public function setName($name);
26+
public function setName(string $name);
2727
}

‎src/Symfony/Component/Config/FileLocatorInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/FileLocatorInterface.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ interface FileLocatorInterface
3030
* @throws \InvalidArgumentException If $name is empty
3131
* @throws FileLocatorFileNotFoundException If a file is not found
3232
*/
33-
public function locate($name, $currentPath = null, $first = true);
33+
public function locate(string $name, string $currentPath = null, bool $first = true);
3434
}

‎src/Symfony/Component/Config/Loader/LoaderInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/Loader/LoaderInterface.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface LoaderInterface
2626
*
2727
* @throws \Exception If something went wrong
2828
*/
29-
public function load($resource, $type = null);
29+
public function load($resource, ?string $type = null);
3030

3131
/**
3232
* Returns whether this class supports the given resource.
@@ -36,7 +36,7 @@ public function load($resource, $type = null);
3636
*
3737
* @return bool True if this class supports the given resource, false otherwise
3838
*/
39-
public function supports($resource, $type = null);
39+
public function supports($resource, ?string $type = null);
4040

4141
/**
4242
* Gets the loader resolver.

‎src/Symfony/Component/Config/Loader/LoaderResolverInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/Loader/LoaderResolverInterface.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ interface LoaderResolverInterface
2626
*
2727
* @return LoaderInterface|false The loader or false if none is able to load the resource
2828
*/
29-
public function resolve($resource, $type = null);
29+
public function resolve($resource, ?string $type = null);
3030
}

‎src/Symfony/Component/Config/ResourceCheckerInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/ResourceCheckerInterface.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ public function supports(ResourceInterface $metadata);
4444
*
4545
* @return bool True if the resource has not changed since the given timestamp, false otherwise
4646
*/
47-
public function isFresh(ResourceInterface $resource, $timestamp);
47+
public function isFresh(ResourceInterface $resource, int $timestamp);
4848
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.