diff --git a/README.md b/README.md new file mode 100644 index 0000000..d7fa84f --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# Installation + +`composer require psys/utils` + diff --git a/src/File.php b/src/File.php index 5f479f8..fb34c20 100644 --- a/src/File.php +++ b/src/File.php @@ -22,12 +22,17 @@ public function getDataURI($absPath) return 'data:' . $type . ';base64,' . base64_encode(file_get_contents($absPath)); } - public function pathRemoveExtension ($path) + public function pathRemoveExtension (string $path) : string { $pozicePripony = strlen($path) - strrpos($path, '.'); //echo '
$pozicePripony: '.$pozicePripony; return substr($path, 0, -$pozicePripony); } + + // public function pathGetExtension (string $path) : string + // { + // return pathinfo($path, PATHINFO_EXTENSION); + // } public function createThumbnail ($soubor, $adresar) { diff --git a/src/Result.php b/src/Result.php index 9f8823d..9dce719 100644 --- a/src/Result.php +++ b/src/Result.php @@ -9,10 +9,7 @@ class Result private bool $status; private string $message; - function __construct - ( - $status, $message = '' - ) + function __construct (bool $status, string $message = '') { $this->status = $status; $this->message = $message;