mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-04 20:39:40 +00:00
Rector changes and immplementations of required methods
This commit is contained in:
@@ -29,7 +29,7 @@ class CSVCellTwig extends AbstractExtension
|
||||
*
|
||||
* @return string the safe string
|
||||
*/
|
||||
public function csvCellFilter($content)
|
||||
public function csvCellFilter($content): string|array
|
||||
{
|
||||
return str_replace('"', '""', $content);
|
||||
}
|
||||
|
@@ -56,7 +56,7 @@ class ChillTwigHelper extends AbstractExtension
|
||||
$message = 'No value',
|
||||
$template = 'default',
|
||||
array $options = [],
|
||||
) {
|
||||
): string {
|
||||
if ($value instanceof \DateTimeInterface) {
|
||||
$options = \array_merge([
|
||||
'date_format' => 'medium',
|
||||
|
@@ -99,7 +99,7 @@ class ChillTwigRoutingHelper extends AbstractExtension
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPathAddReturnPath($name, $parameters = [], $relative = false, $label = null)
|
||||
public function getPathAddReturnPath($name, $parameters = [], $relative = false, $label = null): string
|
||||
{
|
||||
$request = $this->requestStack->getCurrentRequest();
|
||||
|
||||
@@ -121,7 +121,7 @@ class ChillTwigRoutingHelper extends AbstractExtension
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPathForwardReturnPath($name, $parameters = [], $relative = false)
|
||||
public function getPathForwardReturnPath($name, $parameters = [], $relative = false): string
|
||||
{
|
||||
$request = $this->requestStack->getCurrentRequest();
|
||||
|
||||
@@ -146,7 +146,7 @@ class ChillTwigRoutingHelper extends AbstractExtension
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getReturnPathOr($name, $parameters = [], $relative = false)
|
||||
public function getReturnPathOr($name, $parameters = [], $relative = false): string|int|float|bool|null
|
||||
{
|
||||
$request = $this->requestStack->getCurrentRequest();
|
||||
|
||||
@@ -157,7 +157,7 @@ class ChillTwigRoutingHelper extends AbstractExtension
|
||||
return $this->originalExtension->getPath($name, $parameters, $relative);
|
||||
}
|
||||
|
||||
public function isUrlGenerationSafe(Node $argsNode)
|
||||
public function isUrlGenerationSafe(Node $argsNode): array
|
||||
{
|
||||
return $this->originalExtension->isUrlGenerationSafe($argsNode);
|
||||
}
|
||||
|
@@ -53,7 +53,7 @@ class DelegatedBlockRenderingEvent extends \Symfony\Contracts\EventDispatcher\Ev
|
||||
*
|
||||
* @param string $text
|
||||
*/
|
||||
public function addContent($text)
|
||||
public function addContent($text): void
|
||||
{
|
||||
$this->content .= $text;
|
||||
}
|
||||
|
@@ -50,7 +50,7 @@ class TranslatableStringTwig extends AbstractExtension
|
||||
return 'chill_main_localize';
|
||||
}
|
||||
|
||||
public function localize(array $translatableStrings)
|
||||
public function localize(array $translatableStrings): ?string
|
||||
{
|
||||
return $this->helper
|
||||
->localize($translatableStrings);
|
||||
|
@@ -24,7 +24,7 @@ class CountNotificationUser
|
||||
*/
|
||||
protected $counters = [];
|
||||
|
||||
public function addNotificationCounter(NotificationCounterInterface $counter)
|
||||
public function addNotificationCounter(NotificationCounterInterface $counter): void
|
||||
{
|
||||
$this->counters[] = $counter;
|
||||
}
|
||||
|
@@ -78,7 +78,7 @@ class WidgetRenderingTwig extends AbstractExtension
|
||||
* @param string $place
|
||||
* @param WidgetInterface $widget
|
||||
*/
|
||||
public function addWidget($place, mixed $ordering, $widget, array $config = [])
|
||||
public function addWidget($place, mixed $ordering, $widget, array $config = []): void
|
||||
{
|
||||
$this->widget[$place][$ordering] = [$widget, $config];
|
||||
}
|
||||
|
Reference in New Issue
Block a user