src/app/code/community/EbayEnterprise/Catalog/Helper/Map.php 1 location
|
@@ 58-71 (lines=14) @@
|
55 |
|
*/ |
56 |
|
protected $_categoryCollection = null; |
57 |
|
|
58 |
|
public function __construct(array $initParams = []) |
59 |
|
{ |
60 |
|
list( |
61 |
|
$this->coreHelper, |
62 |
|
$this->catalogHelper, |
63 |
|
$this->logger, |
64 |
|
$this->context |
65 |
|
) = $this->checkTypes( |
66 |
|
$this->nullCoalesce($initParams, 'core_helper', Mage::helper('eb2ccore')), |
67 |
|
$this->nullCoalesce($initParams, 'catalog_helper', Mage::helper('ebayenterprise_catalog')), |
68 |
|
$this->nullCoalesce($initParams, 'logger', Mage::helper('ebayenterprise_magelog')), |
69 |
|
$this->nullCoalesce($initParams, 'context', Mage::helper('ebayenterprise_magelog/context')) |
70 |
|
); |
71 |
|
} |
72 |
|
|
73 |
|
/** |
74 |
|
* Type hinting for self::__construct $initParams |
src/app/code/community/EbayEnterprise/Eb2cCustomerService/Overrides/Model/Admin/Session.php 1 location
|
@@ 26-34 (lines=9) @@
|
23 |
|
/** @var Mage_Adminhtml_Model_Url */ |
24 |
|
protected $url; |
25 |
|
|
26 |
|
public function __construct(array $initParams = []) |
27 |
|
{ |
28 |
|
list($this->logger, $this->context, $this->url) = $this->checkTypes( |
29 |
|
$this->nullCoalesce($initParams, 'logger', Mage::helper('ebayenterprise_magelog')), |
30 |
|
$this->nullCoalesce($initParams, 'context', Mage::helper('ebayenterprise_magelog/context')), |
31 |
|
$this->nullCoalesce($initParams, 'url', Mage::getSingleton('adminhtml/url')) |
32 |
|
); |
33 |
|
parent::__construct($this->removeKnownKeys($initParams)); |
34 |
|
} |
35 |
|
|
36 |
|
/** |
37 |
|
* Populate a new array with keys that not in the array of known keys. |
src/app/code/community/EbayEnterprise/Inventory/Model/Allocation/Allocator.php 1 location
|
@@ 40-54 (lines=15) @@
|
37 |
|
/** @var EbayEnterprise_Inventory_Model_Allocation_Reservation */ |
38 |
|
protected $reservation; |
39 |
|
|
40 |
|
public function __construct(array $init = []) |
41 |
|
{ |
42 |
|
list( |
43 |
|
$this->helper, |
44 |
|
$this->coreHelper, |
45 |
|
$this->logger, |
46 |
|
$this->logContext |
47 |
|
) = $this->checkTypes( |
48 |
|
$this->nullCoalesce('helper', $init, Mage::helper('ebayenterprise_inventory')), |
49 |
|
$this->nullCoalesce('core_helper', $init, Mage::helper('eb2ccore')), |
50 |
|
$this->nullCoalesce('logger', $init, Mage::helper('ebayenterprise_magelog')), |
51 |
|
$this->nullCoalesce('log_context', $init, Mage::helper('ebayenterprise_magelog/context')) |
52 |
|
); |
53 |
|
$this->reservation = Mage::getModel('ebayenterprise_inventory/allocation_reservation'); |
54 |
|
} |
55 |
|
|
56 |
|
protected function checkTypes( |
57 |
|
EbayEnterprise_Inventory_Helper_Data $helper, |
src/app/code/community/EbayEnterprise/Inventory/Model/Allocation/Deallocator.php 1 location
|
@@ 37-50 (lines=14) @@
|
34 |
|
/** @var EbayEnterprise_MageLog_Helper_Context */ |
35 |
|
protected $logContext; |
36 |
|
|
37 |
|
public function __construct(array $init = []) |
38 |
|
{ |
39 |
|
list( |
40 |
|
$this->coreHelper, |
41 |
|
$this->helper, |
42 |
|
$this->logger, |
43 |
|
$this->logContext |
44 |
|
) = $this->checkTypes( |
45 |
|
$this->nullCoalesce('core_helper', $init, Mage::helper('eb2ccore')), |
46 |
|
$this->nullCoalesce('helper', $init, Mage::helper('ebayenterprise_inventory')), |
47 |
|
$this->nullCoalesce('logger', $init, Mage::helper('ebayenterprise_magelog')), |
48 |
|
$this->nullCoalesce('log_context', $init, Mage::helper('ebayenterprise_magelog/context')) |
49 |
|
); |
50 |
|
} |
51 |
|
|
52 |
|
protected function checkTypes( |
53 |
|
EbayEnterprise_Eb2cCore_Helper_Data $coreHelper, |
src/app/code/community/EbayEnterprise/Inventory/Model/Allocation/Service.php 1 location
|
@@ 29-38 (lines=10) @@
|
26 |
|
/** @var EbayEnterprise_Inventory_Model_Quantity_Service */ |
27 |
|
protected $quantityService; |
28 |
|
|
29 |
|
public function __construct($init = []) |
30 |
|
{ |
31 |
|
list($this->invHelper, $this->logger, $this->logContext, $this->quantityService) = |
32 |
|
$this->checkTypes( |
33 |
|
$this->nullCoalesce($init, 'inv_helper', Mage::helper('ebayenterprise_inventory')), |
34 |
|
$this->nullCoalesce($init, 'logger', Mage::helper('ebayenterprise_magelog')), |
35 |
|
$this->nullCoalesce($init, 'log_context', Mage::helper('ebayenterprise_magelog/context')), |
36 |
|
$this->nullCoalesce($init, 'quantity_service', Mage::getModel('ebayenterprise_inventory/quantity_service')) |
37 |
|
); |
38 |
|
} |
39 |
|
|
40 |
|
/** |
41 |
|
* enforce types |
src/app/code/community/EbayEnterprise/Inventory/Model/Details/Request/Builder.php 1 location
|
@@ 32-45 (lines=14) @@
|
29 |
|
/** @var IInventoryDetailsRequest */ |
30 |
|
protected $request; |
31 |
|
|
32 |
|
public function __construct(array $init = []) |
33 |
|
{ |
34 |
|
list( |
35 |
|
$this->request, |
36 |
|
$this->logger, |
37 |
|
$this->logContext, |
38 |
|
$this->itemHelper |
39 |
|
) = $this->checkTypes( |
40 |
|
$init['request'], |
41 |
|
$this->nullCoalesce('logger', $init, Mage::helper('ebayenterprise_magelog')), |
42 |
|
$this->nullCoalesce('log_context', $init, Mage::helper('ebayenterprise_magelog/context')), |
43 |
|
$this->nullCoalesce('item_helper', $init, Mage::helper('ebayenterprise_inventory/details_item')) |
44 |
|
); |
45 |
|
} |
46 |
|
|
47 |
|
/** |
48 |
|
* Fill in default values. |
src/app/code/community/EbayEnterprise/Inventory/Model/Order/Create/Item/Allocation.php 1 location
|
@@ 46-63 (lines=18) @@
|
43 |
|
* - logger => EbayEnterprise_MageLog_Helper_Data |
44 |
|
* - log_context => EbayEnterprise_MageLog_Helper_Context |
45 |
|
*/ |
46 |
|
public function __construct(array $init = []) |
47 |
|
{ |
48 |
|
list( |
49 |
|
$this->invHelper, |
50 |
|
$this->allocationService, |
51 |
|
$this->logger, |
52 |
|
$this->logContext |
53 |
|
) = $this->checkTypes( |
54 |
|
$this->nullCoalesce($init, 'helper', Mage::helper('ebayenterprise_inventory')), |
55 |
|
$this->nullCoalesce( |
56 |
|
$init, |
57 |
|
'allocation_service', |
58 |
|
Mage::getModel('ebayenterprise_inventory/allocation_service') |
59 |
|
), |
60 |
|
$this->nullCoalesce($init, 'logger', Mage::helper('ebayenterprise_magelog')), |
61 |
|
$this->nullCoalesce($init, 'log_context', Mage::helper('ebayenterprise_magelog/context')) |
62 |
|
); |
63 |
|
} |
64 |
|
|
65 |
|
/** |
66 |
|
* Enforce type checks on constructor init params. |
src/app/code/community/EbayEnterprise/Tax/Helper/Data.php 1 location
|
@@ 42-55 (lines=14) @@
|
39 |
|
* - logger => EbayEnterprise_MageLog_Helper_Data |
40 |
|
* - log_context => EbayEnterprise_MageLog_Helper_Context |
41 |
|
*/ |
42 |
|
public function __construct(array $args = []) |
43 |
|
{ |
44 |
|
list( |
45 |
|
$this->coreHelper, |
46 |
|
$this->taxFactory, |
47 |
|
$this->logger, |
48 |
|
$this->logContext |
49 |
|
) = $this->checkTypes( |
50 |
|
$this->nullCoalesce($args, 'core_helper', Mage::helper('eb2ccore')), |
51 |
|
$this->nullCoalesce($args, 'tax_factory', Mage::helper('ebayenterprise_tax/factory')), |
52 |
|
$this->nullCoalesce($args, 'logger', Mage::helper('ebayenterprise_magelog')), |
53 |
|
$this->nullCoalesce($args, 'log_context', Mage::helper('ebayenterprise_magelog/context')) |
54 |
|
); |
55 |
|
} |
56 |
|
|
57 |
|
/** |
58 |
|
* Enforce type checks on constructor init params. |
src/app/code/community/EbayEnterprise/Catalog/Helper/Map/Stock.php 1 location
|
@@ 29-37 (lines=9) @@
|
26 |
|
/** @var EbayEnterprise_Catalog_Helper_Factory */ |
27 |
|
protected $factory; |
28 |
|
|
29 |
|
public function __construct(array $parameters = []) |
30 |
|
{ |
31 |
|
list($this->catalogHelper, $this->coreHelper, $this->factory) = $this->checkTypes( |
32 |
|
$this->nullCoalesce($parameters, 'catalog_helper', Mage::helper('ebayenterprise_catalog')), |
33 |
|
$this->nullCoalesce($parameters, 'core_helper', Mage::helper('eb2ccore')), |
34 |
|
$this->nullCoalesce($parameters, 'factory', Mage::helper('ebayenterprise_catalog/factory')) |
35 |
|
); |
36 |
|
$this->stockMap = $this->nullCoalesce($parameters, 'stock_map', $this->getDefaultStockMap()); |
37 |
|
} |
38 |
|
|
39 |
|
/** |
40 |
|
* extract the SalesClass from DOMNOdeList object and map to a known Magento 'backorder' value |
src/app/code/community/EbayEnterprise/Tax/Model/Observer.php 1 location
|
@@ 32-45 (lines=14) @@
|
29 |
|
/** |
30 |
|
* @param array |
31 |
|
*/ |
32 |
|
public function __construct(array $args = []) |
33 |
|
{ |
34 |
|
list( |
35 |
|
$this->taxCollector, |
36 |
|
$this->coreSession, |
37 |
|
$this->logger, |
38 |
|
$this->logContext |
39 |
|
) = $this->checkTypes( |
40 |
|
$this->nullCoalesce($args, 'tax_collector', Mage::getModel('ebayenterprise_tax/collector')), |
41 |
|
$this->nullCoalesce($args, 'core_session', null), |
42 |
|
$this->nullCoalesce($args, 'logger', Mage::helper('ebayenterprise_magelog')), |
43 |
|
$this->nullCoalesce($args, 'log_context', Mage::helper('ebayenterprise_magelog/context')) |
44 |
|
); |
45 |
|
} |
46 |
|
|
47 |
|
/** |
48 |
|
* Enforce type checks on construct args array. |