diff --git a/src/FOM/ManagerBundle/Configuration/Route.php b/src/FOM/ManagerBundle/Configuration/Route.php index c354eb5391..89cfb91fb0 100644 --- a/src/FOM/ManagerBundle/Configuration/Route.php +++ b/src/FOM/ManagerBundle/Configuration/Route.php @@ -10,7 +10,6 @@ * This is a trivial subclass of the regular Symfony Route annotation * All the magic with route prefixing happens in @see \FOM\ManagerBundle\Routing\AnnotatedRouteControllerLoader. * - * @Annotation * @author Christian Wygoda */ #[\Attribute(\Attribute::IS_REPEATABLE | \Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD)] diff --git a/src/FOM/UserBundle/Controller/GroupController.php b/src/FOM/UserBundle/Controller/GroupController.php index e8e273b97a..92ecf39b08 100644 --- a/src/FOM/UserBundle/Controller/GroupController.php +++ b/src/FOM/UserBundle/Controller/GroupController.php @@ -8,7 +8,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use FOM\ManagerBundle\Configuration\Route; +use FOM\ManagerBundle\Configuration\Route as ManagerRoute; use Symfony\Component\HttpFoundation\Response; /** @@ -32,7 +32,7 @@ public function __construct( * @return Response * @throws \Exception */ - #[Route('/group/new', methods: ['GET', 'POST'])] + #[ManagerRoute('/group/new', methods: ['GET', 'POST'])] public function create(Request $request) { $group = new Group(); @@ -70,7 +70,7 @@ public function create(Request $request) * @param string $id * @return Response */ - #[Route('/group/{id}/edit', methods: ['GET', 'POST'])] + #[ManagerRoute('/group/{id}/edit', methods: ['GET', 'POST'])] public function edit(Request $request, $id) { $this->denyAccessUnlessGranted(ResourceDomainInstallation::ACTION_EDIT_GROUPS); @@ -123,7 +123,7 @@ public function edit(Request $request, $id) * @param string $id * @return Response */ - #[Route('/group/{id}/delete', methods: ['POST'])] + #[ManagerRoute('/group/{id}/delete', methods: ['POST'])] public function delete(Request $request, $id) { /** @var Group|null $group */ diff --git a/src/FOM/UserBundle/Controller/PermissionController.php b/src/FOM/UserBundle/Controller/PermissionController.php index a73d9d4c4c..9dc9e93b09 100644 --- a/src/FOM/UserBundle/Controller/PermissionController.php +++ b/src/FOM/UserBundle/Controller/PermissionController.php @@ -2,7 +2,7 @@ namespace FOM\UserBundle\Controller; -use FOM\ManagerBundle\Configuration\Route; +use FOM\ManagerBundle\Configuration\Route as ManagerRoute; use FOM\UserBundle\Form\Type\PermissionListType; use FOM\UserBundle\Security\Permission\AssignableSubject; use FOM\UserBundle\Security\Permission\PermissionManager; @@ -25,7 +25,7 @@ public function __construct( * @param Request $request * @return Response */ - #[Route('/security/edit/{category}', methods: ['GET', 'POST'])] + #[ManagerRoute('/security/edit/{category}', methods: ['GET', 'POST'])] public function edit(Request $request, string $category) { $this->denyAccessUnlessGranted(ResourceDomainInstallation::ACTION_MANAGE_PERMISSION); @@ -69,7 +69,7 @@ public function edit(Request $request, string $category) )); } - #[Route('/permission/overview', methods: ['GET'])] + #[ManagerRoute('/permission/overview', methods: ['GET'])] public function overview(Request $request): Response { $assignableSubjects = $this->permissionManager->getAssignableSubjects(); diff --git a/src/Mapbender/Component/Element/LegacyView.php b/src/Mapbender/Component/Element/LegacyView.php index 5c2a07cac3..5c5c1a1e8e 100644 --- a/src/Mapbender/Component/Element/LegacyView.php +++ b/src/Mapbender/Component/Element/LegacyView.php @@ -7,8 +7,6 @@ * Captures legacy (non-service, self-rendering) element frontend markup. * Captured markup can have any structure, but will most likely contain outer Element * tag with id, class and other misc attributes. - * - * @see \Mapbender\CoreBundle\Component\Element::render */ class LegacyView { diff --git a/src/Mapbender/CoreBundle/Utils/ArrayUtil.php b/src/Mapbender/CoreBundle/Utils/ArrayUtil.php index 1f0ed683ed..ab03d281de 100644 --- a/src/Mapbender/CoreBundle/Utils/ArrayUtil.php +++ b/src/Mapbender/CoreBundle/Utils/ArrayUtil.php @@ -44,26 +44,6 @@ public static function getValueFromArray(array $list, $value = null, $default = } } - /** - * Check if array has a key and return the value, other way set new one and return it. - * - * @deprecated THIS MODIFIES THE ARRAY BY WRITING THE KEY INTO THE KEY NOT THE VALUE YOU HAVE BEEN WARNED - * @internal - * - * @param array $arr - * @param string $key array key to check for existens - * @param null $value default value if key doesn't exists - * @return mixed new value - */ - public static function hasSet(array &$arr, $key, $value = null){ - if(isset($arr[$key])){ - return $arr[$key]; - }else{ - $arr[$key] = $key; - return $value; - } - } - /** * Extract and return the value (or $default if missing) with given $key from given array. * diff --git a/src/Mapbender/FrameworkBundle/Component/Renderer/ElementMarkupRenderer.php b/src/Mapbender/FrameworkBundle/Component/Renderer/ElementMarkupRenderer.php index 3ffa3d4d72..ec8e970d76 100644 --- a/src/Mapbender/FrameworkBundle/Component/Renderer/ElementMarkupRenderer.php +++ b/src/Mapbender/FrameworkBundle/Component/Renderer/ElementMarkupRenderer.php @@ -58,7 +58,7 @@ public function renderElements($elements) $markupFragments = array(); foreach ($elements as $element) { if (!$element instanceof Element) { - throw new \InvalidArgumentException("Unsupported type " . ($element && \is_object($element)) ? \get_class($element) : gettype($element)); + throw new \InvalidArgumentException("Unsupported type " . (($element && \is_object($element)) ? \get_class($element) : gettype($element))); } $regionName = $element->getRegion(); if (!array_key_exists($regionName, $wrappers)) { @@ -88,7 +88,7 @@ public function renderFloatingElements($elements) $markup = ''; foreach ($elements as $element) { if (!$element instanceof Element) { - throw new \InvalidArgumentException("Unsupported type " . ($element && \is_object($element)) ? \get_class($element) : gettype($element)); + throw new \InvalidArgumentException("Unsupported type " . (($element && \is_object($element)) ? \get_class($element) : gettype($element))); } $content = $this->renderContent($element, 'div', array()); $markup .= $this->wrapTag($content, 'div', array( diff --git a/src/Mapbender/WmsBundle/Component/VendorSpecific.php b/src/Mapbender/WmsBundle/Component/VendorSpecific.php index edadd6533a..6cef6c355b 100644 --- a/src/Mapbender/WmsBundle/Component/VendorSpecific.php +++ b/src/Mapbender/WmsBundle/Component/VendorSpecific.php @@ -45,19 +45,4 @@ public function getParameterName() { return $this->name; } - - /** - * @deprecated, only used (indirectly) by WmcParser110 - * @return array - */ - public function getConfiguration() - { - return array( - 'default' => $this->getDefault(), - 'name' => $this->getName(), - '__name' => $this->getParameterName(), - 'hidden' => $this->getHidden(), - 'vstype' => $this->getVstype(), - ); - } }