Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ protected function printArrayItem(array $item, ?string $key = null): string
{
$json = Json::encode($item);
$json = Strings::replace($json, '#,#', ', ');
$json = Strings::replace($json, '#\[(.*?)\]#', '{$1}');

// change brackets from json to annotations
$json = Strings::replace($json, '#^\[(.*?)\]$#', '{$1}');

// cleanup json encoded extra slashes
$json = Strings::replace($json, '#\\\\\\\\#', '\\');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,6 @@ public function __toString(): string
return $this->printContentItems($contentItems);
}

/**
* @param mixed[] $methods
*/
public function changeMethods(array $methods): void
{
$this->orderedVisibleItems[] = 'methods';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use Symfony\Component\Routing\Annotation\Route;
class WithRouteOptions extends AbstractController
{
/**
* @Route("/{category}", name="report_overview", defaults={"category":null}, requirements={"category":"\d+"})
* @Route("/{category}", name="report_overview", defaults={"category":null}, requirements={"category"="[a-z]\d+"})
* @Template("PAPPReportBundle:Report:report_list.html.twig")
*/
public function index($category = null)
Expand All @@ -33,7 +33,7 @@ use Symfony\Component\Routing\Annotation\Route;
class WithRouteOptions extends AbstractController
{
/**
* @Route("/{category}", name="report_overview", defaults={"category":null}, requirements={"category":"\d+"})
* @Route("/{category}", name="report_overview", defaults={"category":null}, requirements={"category"="[a-z]\d+"})
*/
public function index($category = null): \Symfony\Component\HttpFoundation\Response
{
Expand Down