for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Copyright © O2TI. All rights reserved.
*
* @author Bruno Elisei <[email protected]>
* See COPYING.txt for license details.
*/
namespace O2TI\AdvancedStreetAddress\Plugin;
use Magento\Customer\Block\Address\Edit;
use O2TI\AdvancedStreetAddress\Helper\Config;
* CustomerAdvancedStreetAddress - Change Template.
class CustomerAdvancedStreetAddress
{
* @var Config
private $config;
* @param Config $config
public function __construct(
Config $config
) {
$this->config = $config;
}
* Change Template.
* @param Edit $subject
* @param string $result
* @return string
public function afterGetTemplate(Edit $subject, string $result): string
$subject
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function afterGetTemplate(/** @scrutinizer ignore-unused */ Edit $subject, string $result): string
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
if ($this->config->isEnabled()) {
if ($this->config->getConfigModule('apply_in_account')) {
return 'O2TI_AdvancedStreetAddress::account/address/edit.phtml';
return $result;
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.