Fixed code style.

This commit is contained in:
Jan Böhmer 2020-08-21 22:44:38 +02:00
parent e01b06fb85
commit e73a90a234
24 changed files with 30 additions and 58 deletions

View file

@ -59,6 +59,7 @@ final class CustomEnvVarProcessor implements EnvVarProcessorInterface
return false;
}
}
return false;
}

View file

@ -159,7 +159,7 @@ class EntityExporter
$disposition = $response->headers->makeDisposition(
ResponseHeaderBag::DISPOSITION_ATTACHMENT,
$filename,
$string = preg_replace('![^'.preg_quote('-','!').'a-z0-_9\s]+!', '', strtolower($filename))
$string = preg_replace('![^'.preg_quote('-', '!').'a-z0-_9\s]+!', '', strtolower($filename))
);
// Set the content disposition
$response->headers->set('Content-Disposition', $disposition);

View file

@ -151,7 +151,7 @@ class EntityImporter
$tmp = $this->validator->validate($entity);
//When no validation error occured, persist entity to database (cascade must be set in entity)
if ($tmp === null) {
if (null === $tmp) {
$this->em->persist($entity);
} else { //Log validation errors to global log.
$errors[$entity->getFullPath()] = $tmp;

View file

@ -75,8 +75,6 @@ final class LabelGenerator
/**
* Check if the given LabelOptions can be used with $element.
*
* @return bool
*/
public function supports(LabelOptions $options, object $element): bool
{

View file

@ -156,8 +156,8 @@ class TimeTravel
$target_element,
$timestamp
) && $target_elements instanceof Collection) {
$target_elements->removeElement($target_element);
}
$target_elements->removeElement($target_element);
}
$this->revertEntityToTimestamp($target_element, $timestamp, $reverted_elements);
}
}

View file

@ -64,8 +64,6 @@ class MoneyFormatter
* @param Currency|null $currency The currency that should be used for formatting. If null the global one is used
* @param int $decimals the number of decimals that should be shown
* @param bool $show_all_digits if set to true, all digits are shown, even if they are null
*
* @return string
*/
public function format($value, ?Currency $currency = null, $decimals = 5, bool $show_all_digits = false): string
{

View file

@ -124,7 +124,7 @@ class TreeViewGenerator
}
//Translate text if text starts with $$
if (strpos($item->getText(), '$$') === 0) {
if (0 === strpos($item->getText(), '$$')) {
$item->setText($this->translator->trans(substr($item->getText(), 2)));
}
}