Skip to content

Commit

Permalink
"Refactor the Brightpearl module": #224
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Jun 25, 2021
1 parent 48d3cd3 commit 8f8cc57
Show file tree
Hide file tree
Showing 572 changed files with 2,205 additions and 2,205 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Form extends \Magento\Backend\Block\Widget\Form
{
protected $formFactory;

public function __construct(
function __construct(
\Magento\Backend\Block\Template\Context $context,
\Magento\Framework\Data\FormFactory $formFactory,
array $data = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ protected function _construct()
$this->updateButton( 'save', 'label', __( 'Submit' ) );
}

public function getHeaderText()
function getHeaderText()
{
return __( 'Brightpearl authorisation' );
}

public function getFormActionUrl()
function getFormActionUrl()
{
if ($this->hasFormActionUrl()) {
return $this->getData('form_action_url');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
class Confirm extends \Magento\Framework\View\Element\Template
{

public function getAccount()
function getAccount()
{
return $this->getRequest()->getParam( 'account' );
}

public function getCode()
function getCode()
{
return $this->getRequest()->getParam( 'code' );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Start extends \Magento\Framework\View\Element\Template
protected $brightpearlHelper;
protected $backendHelper;

public function __construct(
function __construct(
\Magento\Framework\View\Element\Template\Context $context,

\Magento\Backend\Helper\Data $backendHelper,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class Info extends \Magento\Shipping\Block\Adminhtml\View\Items
{

public function getBundleItems()
function getBundleItems()
{
$orderItem = $this->getParentBlock()->getItem();
$result = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class StaticElement extends \Magento\Backend\Block\AbstractBlock implements \Magento\Framework\Data\Form\Element\Renderer\RendererInterface
{

public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element)
function render(\Magento\Framework\Data\Form\Element\AbstractElement $element)
{
$template = <<<EOF
<tr class="system-fieldset-sub-foot" id="row_%s_static">
Expand All @@ -29,7 +29,7 @@ public function render(\Magento\Framework\Data\Form\Element\AbstractElement $ele
return $html;
}

public function getValue(\Magento\Framework\Data\Form\Element\AbstractElement $element)
function getValue(\Magento\Framework\Data\Form\Element\AbstractElement $element)
{
return $this->escapeHtml( $element->getValue() );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Company extends \Magento\Framework\View\Element\Html\Select
{
protected $source;

public function __construct(
function __construct(
\Magento\Framework\View\Element\Context $context,
\Hotlink\Brightpearl\Model\Config\Source\Brightpearl\Customer\Company $source,
array $data = []
Expand All @@ -14,12 +14,12 @@ public function __construct(
parent::__construct( $context, $data );
}

public function setInputName( $value )
function setInputName( $value )
{
return $this->setName( $value );
}

public function _toHtml()
function _toHtml()
{
if ( !$this->getOptions() )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Attribute extends \Magento\Framework\View\Element\Html\Select
*/
protected $interactionConfigFieldProductAttributes;

public function __construct(
function __construct(
\Magento\Framework\View\Element\Context $context,
\Hotlink\Framework\Model\Config\Field\Product\Attributes $interactionConfigFieldProductAttributes,
array $data = []
Expand All @@ -21,12 +21,12 @@ public function __construct(
);
}

public function setInputName( $value )
function setInputName( $value )
{
return $this->setName( $value );
}

public function _toHtml()
function _toHtml()
{
if ( !$this->getOptions() ) {
if ( !$this->getOptions()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Status extends \Magento\Framework\View\Element\Html\Select
{
protected $bpOrderStatusSource;

public function __construct(
function __construct(
\Magento\Framework\View\Element\Context $context,
\Hotlink\Brightpearl\Model\Config\Source\Brightpearl\Order\Status $bpOrderStatusSource,
array $data = []
Expand All @@ -14,12 +14,12 @@ public function __construct(
parent::__construct( $context, $data );
}

public function setInputName( $value )
function setInputName( $value )
{
return $this->setName( $value );
}

public function _toHtml()
function _toHtml()
{
if ( !$this->getOptions() )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Method extends \Magento\Framework\View\Element\Html\Select
{
protected $paymentMethodSource;

public function __construct(
function __construct(
\Magento\Framework\View\Element\Context $context,
\Hotlink\Brightpearl\Model\Config\Source\Brightpearl\Order\Payment\Method $paymentMethodSource,
array $data = []
Expand All @@ -14,12 +14,12 @@ public function __construct(
parent::__construct( $context, $data );
}

public function setInputName( $value )
function setInputName( $value )
{
return $this->setName( $value );
}

public function _toHtml()
function _toHtml()
{
if ( !$this->getOptions() )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Method extends \Magento\Framework\View\Element\Html\Select
{
protected $source;

public function __construct(
function __construct(
\Magento\Framework\View\Element\Context $context,
\Hotlink\Brightpearl\Model\Config\Source\Brightpearl\Order\Shipping\Method $source,
array $data = []
Expand All @@ -14,12 +14,12 @@ public function __construct(
parent::__construct( $context, $data );
}

public function setInputName( $value )
function setInputName( $value )
{
return $this->setName( $value );
}

public function _toHtml()
function _toHtml()
{
if ( !$this->getOptions() )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Group extends \Magento\Framework\View\Element\Html\Select
*/
protected $customerSourceGroup;

public function __construct(
function __construct(
\Magento\Framework\View\Element\Context $context,
\Magento\Customer\Model\Customer\Source\Group $customerSourceGroup,
array $data = []
Expand All @@ -21,12 +21,12 @@ public function __construct(
);
}

public function setInputName( $value )
function setInputName( $value )
{
return $this->setName( $value );
}

public function clean( $item )
function clean( $item )
{
if ( is_array( $item ) )
{
Expand All @@ -40,7 +40,7 @@ public function clean( $item )
return $this->escapeJsQuote( $item );
}

public function _toHtml()
function _toHtml()
{
if ( !$this->getOptions() )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Processing extends \Magento\Framework\View\Element\Html\Select

protected $processing;

public function __construct(
function __construct(
\Magento\Framework\View\Element\Context $context,
\Hotlink\Brightpearl\Model\Config\Source\Brightpearl\Order\Customisation\Processing $processing,
array $data = []
Expand All @@ -16,12 +16,12 @@ public function __construct(
parent::__construct( $context, $data );
}

public function setInputName( $value )
function setInputName( $value )
{
return $this->setName( $value );
}

public function _toHtml()
function _toHtml()
{
if ( !$this->getOptions() )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Status extends \Magento\Framework\View\Element\Html\Select
{
protected $mageOrderStatusSource;

public function __construct(
function __construct(
\Magento\Framework\View\Element\Context $context,
\Hotlink\Framework\Model\Config\Field\Order\Status\Source $mageOrderStatusSource,
array $data = []
Expand All @@ -14,12 +14,12 @@ public function __construct(
parent::__construct( $context, $data );
}

public function setInputName( $value )
function setInputName( $value )
{
return $this->setName( $value );
}

public function _toHtml()
function _toHtml()
{
if ( !$this->getOptions() )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Method extends \Magento\Framework\View\Element\Html\Select
{
protected $paymentMethodSurce;

public function __construct(
function __construct(
\Magento\Framework\View\Element\Context $context,
\Hotlink\Brightpearl\Model\Config\Source\Magento\Payment\Method\Allowed $paymentMethodSurce,
array $data = []
Expand All @@ -14,12 +14,12 @@ public function __construct(
parent::__construct( $context, $data );
}

public function setInputName( $value )
function setInputName( $value )
{
return $this->setName( $value );
}

public function _toHtml()
function _toHtml()
{
if ( !$this->getOptions() )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Behaviour extends \Magento\Framework\View\Element\Html\Select
*/
protected $brightpearlConfigSourceBrightpearlPriceMissingBehaviour;

public function __construct(
function __construct(
\Magento\Framework\View\Element\Context $context,
\Hotlink\Brightpearl\Model\Config\Source\Brightpearl\Price\Missing\Behaviour $brightpearlConfigSourceBrightpearlPriceMissingBehaviour,
array $data = []
Expand All @@ -21,12 +21,12 @@ public function __construct(
);
}

public function setInputName( $value )
function setInputName( $value )
{
return $this->setName( $value );
}

public function _toHtml()
function _toHtml()
{
if ( !$this->getOptions() )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class BreakRenderer extends \Magento\Framework\View\Element\Html\Select
*/
protected $brightpearlConfigSourceBrightpearlPriceTierBreak;

public function __construct(
function __construct(
\Magento\Framework\View\Element\Context $context,
\Hotlink\Brightpearl\Model\Config\Source\Brightpearl\Price\Tier\BreakTier $brightpearlConfigSourceBrightpearlPriceTierBreak,
array $data = []
Expand All @@ -21,12 +21,12 @@ public function __construct(
);
}

public function setInputName( $value )
function setInputName( $value )
{
return $this->setName( $value );
}

public function _toHtml()
function _toHtml()
{
if ( !$this->getOptions() )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ListPrice extends \Magento\Framework\View\Element\Html\Select
*/
protected $brightpearlConfigSourceBrightpearlPriceLists;

public function __construct(
function __construct(
\Magento\Framework\View\Element\Context $context,
\Hotlink\Brightpearl\Model\Config\Source\Brightpearl\Price\Lists $brightpearlConfigSourceBrightpearlPriceLists,
array $data = []
Expand All @@ -21,12 +21,12 @@ public function __construct(
);
}

public function setInputName( $value )
function setInputName( $value )
{
return $this->setName( $value );
}

public function _toHtml()
function _toHtml()
{
if ( !$this->getOptions() )
{
Expand Down
Loading

0 comments on commit 8f8cc57

Please sign in to comment.