diff --git a/Controller/AbstractController.php b/Controller/AbstractController.php index 6d2a2c6..b5637c1 100644 --- a/Controller/AbstractController.php +++ b/Controller/AbstractController.php @@ -5,26 +5,19 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller; /** - * TagController - * * @author Stepan Tanasiychuk */ class AbstractController extends Controller { - - /** - * Added disqus_shortname to request data array - * - * @param array $requestData - * @return array - */ - protected function _getRequestDataWithDisqusShortname($requestData) + protected function _getRequestDataWithDisqusShortname(array $requestData): array { $config = $this->container->getParameter('stfalcon_blog.config'); - return array_merge( + $disqusShortnameKey = 'disqus_shortname'; + $requestDataWithDisqusShortname = array_merge( $requestData, - array('disqus_shortname' => $config['disqus_shortname']) + [$disqusShortnameKey => $config[$disqusShortnameKey]] ); + + return $requestDataWithDisqusShortname; } - -} \ No newline at end of file +}