Open powerpbx opened 2 years ago
https://github.com/barryvdh/elfinder-flysystem-driver/blob/064d5b2c89ca185f3736e7e5c906d76d3632b30c/src/Driver.php#L228
Why are you using instanceof instead of isFile() like you used just before that? https://github.com/barryvdh/elfinder-flysystem-driver/blob/064d5b2c89ca185f3736e7e5c906d76d3632b30c/src/Driver.php#L225
instanceof
isFile()
Unless I am missing something, it looks like both accomplish the same thing.
You could also just use if ($meta['type'] === 'file'), which would avoid the redundant operation alltogether.
if ($meta['type'] === 'file')
I think the microseconds can add up in this function because it could be trying to scan a large number of files/folder.
https://github.com/barryvdh/elfinder-flysystem-driver/blob/064d5b2c89ca185f3736e7e5c906d76d3632b30c/src/Driver.php#L228
Why are you using
instanceof
instead ofisFile()
like you used just before that? https://github.com/barryvdh/elfinder-flysystem-driver/blob/064d5b2c89ca185f3736e7e5c906d76d3632b30c/src/Driver.php#L225Unless I am missing something, it looks like both accomplish the same thing.
You could also just use
if ($meta['type'] === 'file')
, which would avoid the redundant operation alltogether.I think the microseconds can add up in this function because it could be trying to scan a large number of files/folder.