mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-04 00:59:51 +00:00
DiskResourceProvider: add @var for type that PHPStan can't infer
This commit is contained in:
parent
b4e1edaa64
commit
581bbfe255
@ -71,6 +71,7 @@ class DiskResourceProvider implements ResourceProvider{
|
|||||||
public function getResources() : array{
|
public function getResources() : array{
|
||||||
$resources = [];
|
$resources = [];
|
||||||
if(is_dir($this->file)){
|
if(is_dir($this->file)){
|
||||||
|
/** @var \SplFileInfo $resource */
|
||||||
foreach(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->file)) as $resource){
|
foreach(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->file)) as $resource){
|
||||||
if($resource->isFile()){
|
if($resource->isFile()){
|
||||||
$path = str_replace(DIRECTORY_SEPARATOR, "/", substr((string) $resource, strlen($this->file)));
|
$path = str_replace(DIRECTORY_SEPARATOR, "/", substr((string) $resource, strlen($this->file)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user