Skip to content

Commit

Permalink
added readme, minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidPetrasek committed Jun 12, 2024
1 parent 9105cc0 commit d7a603d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Installation

`composer require psys/utils`

7 changes: 6 additions & 1 deletion src/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<br>$pozicePripony: '.$pozicePripony;

return substr($path, 0, -$pozicePripony);
}

// public function pathGetExtension (string $path) : string
// {
// return pathinfo($path, PATHINFO_EXTENSION);
// }

public function createThumbnail ($soubor, $adresar)
{
Expand Down
5 changes: 1 addition & 4 deletions src/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d7a603d

Please sign in to comment.