mirror of
https://github.com/brufdev/many-notes.git
synced 2026-01-24 20:09:50 -06:00
Refactor code with Pint
This commit is contained in:
@@ -19,7 +19,7 @@ final class ProcessImportedFile
|
||||
$name = $pathInfo['filename'];
|
||||
$extension = $pathInfo['extension'] ?? '';
|
||||
|
||||
if (! in_array($extension, VaultFile::extensions())) {
|
||||
if (!in_array($extension, VaultFile::extensions())) {
|
||||
abort(400);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ final class ProcessImportedFile
|
||||
);
|
||||
natcasesort($nodes);
|
||||
$name .= count($nodes) && preg_match('/-(\d+)$/', end($nodes), $matches) === 1 ?
|
||||
'-'.((int) $matches[1] + 1) :
|
||||
'-' . ((int) $matches[1] + 1) :
|
||||
'-1';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user