I created a class with the construction:
public function __construct(
\Magento\Store\Model\StoreManagerInterface $storeManager,
array $data = []
) {
parent::__construct($data);
$this->storeManager = $storeManager;
}
But it get the warning:
Only dependency assignment operations are allowed in constructor. (using PHPCS)
Is there anyway I can rewrite construct function, still call the parent construct and do not get that warning. (It happen with ALL construct rewriting functions, and only happened lately, the warning is kinda new).