I am checking uploaded file extension by pathinfo() function of php but in coding standard check it's shows
The use of function pathinfo() is discouraged
My code:
$fileExt = pathinfo($file, PATHINFO_EXTENSION);
coding-standardsfilefile uploadmagento-2.1magento2
I am checking uploaded file extension by pathinfo() function of php but in coding standard check it's shows
The use of function pathinfo() is discouraged
My code:
$fileExt = pathinfo($file, PATHINFO_EXTENSION);
Best Answer
You can use
Magento\Framework\Filesystem\Io\File
instead.Example: