]> jfr.im git - uguu.git/blobdiff - src/Classes/Upload.php
cleanup and minor bug fix
[uguu.git] / src / Classes / Upload.php
index e395c87541384aeccb12f8038e444698844c5544..2a3100ef964ddf4fbb40e8df34365c39406d2839 100644 (file)
          *
          * @param $file array The file you want to get the extension from.
          *
-         * @return string The file extension of the file.
+         * @return string | bool The file extension of the file.
          */
         public function fileExtension(array $file):string | bool
         {
             $extension = explode('.', $file['name']);
             $dotCount = substr_count($file['name'], '.');    
             return match ($dotCount) {
-                1 => end($extension),
                 2 => $this->doubleDotExtension($extension),
                 default => end($extension)
             };