Skip to content

Commit de386b2

Browse files
committed
Make internal classes final and additional return types
1 parent 707157a commit de386b2

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

src/Symfony/Component/Filesystem/Tests/Fixtures/ChangeFileResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
/**
1818
* @author Pierre du Plessis <pdples@gmail.com>
1919
*/
20-
class ChangeFileResource implements ResourceInterface
20+
final class ChangeFileResource implements ResourceInterface
2121
{
2222
private $path;
2323

src/Symfony/Component/Filesystem/Watcher/FileChangeEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/**
1515
* @author Pierre du Plessis <pdples@gmail.com>
1616
*/
17-
class FileChangeEvent
17+
final class FileChangeEvent
1818
{
1919
public const FILE_CHANGED = 1;
2020
public const FILE_DELETED = 2;

src/Symfony/Component/Filesystem/Watcher/FileChangeWatcher.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*
1919
* @internal
2020
*/
21-
class FileChangeWatcher implements WatcherInterface
21+
final class FileChangeWatcher implements WatcherInterface
2222
{
2323
private $locator;
2424

@@ -27,7 +27,7 @@ public function __construct()
2727
$this->locator = new FileResourceLocator();
2828
}
2929

30-
public function watch($path, callable $callback, float $timeout = null)
30+
public function watch($path, callable $callback, float $timeout = null): void
3131
{
3232
$resource = $this->locator->locate($path);
3333

src/Symfony/Component/Filesystem/Watcher/INotifyWatcher.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
*
1919
* @internal
2020
*/
21-
class INotifyWatcher implements WatcherInterface
21+
final class INotifyWatcher implements WatcherInterface
2222
{
23-
public function watch($path, callable $callback, float $timeout = null)
23+
public function watch($path, callable $callback, float $timeout = null): void
2424
{
2525
$inotifyInit = inotify_init();
2626

@@ -90,7 +90,7 @@ public function watch($path, callable $callback, float $timeout = null)
9090
}
9191
}
9292

93-
private function scanPath($path)
93+
private function scanPath($path): iterable
9494
{
9595
foreach (glob($path, GLOB_ONLYDIR) as $directory) {
9696
yield $directory;

src/Symfony/Component/Filesystem/Watcher/Resource/ArrayResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* @internal
1818
*/
19-
class ArrayResource implements ResourceInterface
19+
final class ArrayResource implements ResourceInterface
2020
{
2121
/**
2222
* @var ResourceInterface[]

src/Symfony/Component/Filesystem/Watcher/Resource/DirectoryResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*
1919
* @internal
2020
*/
21-
class DirectoryResource implements ResourceInterface
21+
final class DirectoryResource implements ResourceInterface
2222
{
2323
private $dir;
2424

src/Symfony/Component/Filesystem/Watcher/Resource/FileResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*
1919
* @internal
2020
*/
21-
class FileResource implements ResourceInterface
21+
final class FileResource implements ResourceInterface
2222
{
2323
private $file;
2424

src/Symfony/Component/Filesystem/Watcher/Resource/Locator/FileResourceLocator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*
2323
* @internal
2424
*/
25-
class FileResourceLocator
25+
final class FileResourceLocator
2626
{
2727
public function locate($path): ?ResourceInterface
2828
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy