Public methods in controller classes should only be actions (with the Action suffix)

More information: https://insight.symfony.com/what-we-analyse/symfony.controller.non_action_public_method_in_controller_class

  1. * @param Page[] $pages
  2. * @param array $slugsArray
  3. *
  4. * @return Page
  5. */
  6. public function getCurrentPage(array $pages, array $slugsArray)

    Non-action public method found in controller class

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by Orbitale
  7. {
  8. if (count($pages) === count($slugsArray)) {
  9. $currentPage = $this->getFinalTreeElement($slugsArray, $pages);
  10. } else {
  11. $currentPage = current($pages);