mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-18 10:18:41 +00:00
automated phpcs fixes
This commit is contained in:
parent
64f4920b36
commit
d750f558ba
|
|
@ -1148,7 +1148,7 @@ final class ApiController extends Controller
|
|||
|
||||
$path = '../../../Temp/' . $randomName . '.' . $media->getExtension();
|
||||
$absolutePath = __DIR__ . '/' . $path;
|
||||
} while(!\is_file($absolutePath) && $counter < 1000);
|
||||
} while (!\is_file($absolutePath) && $counter < 1000);
|
||||
|
||||
if ($counter >= 1000) {
|
||||
return new NullMedia();
|
||||
|
|
|
|||
|
|
@ -319,11 +319,25 @@ class Media implements \JsonSerializable
|
|||
return $this->isAbsolute ? $this->path : \ltrim($this->path, '\\/');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the media path
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getFileName() : string
|
||||
{
|
||||
return \basename($this->path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the media path
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getExtension() : string
|
||||
{
|
||||
$pos = \strrpos('.', $this->path);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user