Skip to content

Commit

Permalink
Fix small coding style issues
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Fedurtsya <[email protected]>
  • Loading branch information
Sieg committed Feb 16, 2024
1 parent 9374ad4 commit 6c7d56d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Media/Repository/MediaRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function getMediaById(string $mediaId): MediaInterface
public function addMedia(MediaInterface $exampleMedia): void
{
$this->connection->executeQuery(
"insert into ddmedia SET
"insert into ddmedia SET
OXID = :OXID,
OXSHOPID = :OXSHOPID,
DDFILENAME = :DDFILENAME,
Expand Down
2 changes: 1 addition & 1 deletion src/Service/NamingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private function findNextPossibleFilename(string $path): string
$pathInfo = pathinfo($path);
$newFileName = $pathInfo['filename'] . '_1';

if (preg_match('/(?P<baseFilename>.+)_(?P<numericPart>[0-9]+)$/', $pathInfo['filename'], $matches)) {
if (preg_match('/(?P<baseFilename>.+)_(?P<numericPart>\d+)$/', $pathInfo['filename'], $matches)) {
$newFileName = $matches['baseFilename'] . '_' . ++$matches['numericPart'];
}

Expand Down

0 comments on commit 6c7d56d

Please sign in to comment.