for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Kunstmaan\LeadGenerationBundle\Service\Rule;
use Kunstmaan\LeadGenerationBundle\Entity\Rule\AbstractRule;
use Kunstmaan\LeadGenerationBundle\Service\RuleServiceInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
class LocaleRuleService implements RuleServiceInterface
{
/** @var Request */
private $request;
/**
* LocaleRuleService constructor.
*
* @param RequestStack $requestStack
*/
public function __construct(RequestStack $requestStack)
$this->request = $requestStack->getCurrentRequest();
}
* @param AbstractRule $rule
* @return array
array<string,string>
This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.
array
public function getJsProperties(AbstractRule $rule)
return array(
'requestlocale' => $this->request->getLocale(),
);
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.