From 8b398d3cab00436d77536bfcb718baa0f67928cc Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 4 Nov 2022 20:41:15 +0100 Subject: [PATCH] PHP CS Fixer --- Classes/Resource/SvgFileRepository.php | 2 +- Classes/Service/CleanHtmlService.php | 92 +++++++++---------- Classes/Service/SvgStoreService.php | 43 +++++---- .../Unit/Manipulation/RemoveGeneratorTest.php | 1 + Tests/Unit/Service/CleanHtmlServiceTest.php | 1 + 5 files changed, 69 insertions(+), 70 deletions(-) diff --git a/Classes/Resource/SvgFileRepository.php b/Classes/Resource/SvgFileRepository.php index 41174d9..0cdefc8 100644 --- a/Classes/Resource/SvgFileRepository.php +++ b/Classes/Resource/SvgFileRepository.php @@ -50,6 +50,6 @@ public function findAllByStorageUids(array $storageUids): array ->addOrderBy('sys_file.identifier') ->execute() ->fetchAll() // TODO; use stdClass - ; + ; } } diff --git a/Classes/Service/CleanHtmlService.php b/Classes/Service/CleanHtmlService.php index d82cfea..373d89b 100644 --- a/Classes/Service/CleanHtmlService.php +++ b/Classes/Service/CleanHtmlService.php @@ -65,11 +65,11 @@ class CleanHtmlService implements SingletonInterface public function setVariables(array $config): void { if (!empty($config)) { - if ($config['formatHtml'] && \is_numeric($config['formatHtml'])) { + if ($config['formatHtml'] && is_numeric($config['formatHtml'])) { $this->formatType = (int) $config['formatHtml']; } - if ($config['formatHtml.']['tabSize'] && \is_numeric($config['formatHtml.']['tabSize'])) { + if ($config['formatHtml.']['tabSize'] && is_numeric($config['formatHtml.']['tabSize'])) { $this->tab = str_pad('', (int) $config['formatHtml.']['tabSize'], ' '); } @@ -223,54 +223,54 @@ protected function formatHtml($html) if ('formatType && ( // minimalistic line break - // this element has a line break before itself - preg_match( - '/<'.$structureBoxLikeElements.'(.*)>/Usi', - $htmlArrayCurrent - ) || preg_match( - '/<'.$structureBoxLikeElements.'(.*) \/>/Usi', - $htmlArrayCurrent - ) // one element before is a element that has a line break after - || preg_match( - '/<\/'.$structureBoxLikeElements.'(.*)>/Usi', - $htmlArrayBefore - ) || '