mash2 / cobby-magento2

Open Software License 3.0
4 stars 3 forks source link

Code naming: productfactory and product ? #3

Closed tobi-pb closed 6 years ago

tobi-pb commented 7 years ago

https://github.com/mash2/cobby-magento2/blob/dfea5dcc3a7a9fe550519a59fb11df34f62faeed/Model/ProductManagement.php#L91

$factory = $this->productFactory->create();

I think productFactory->create creates an product, not a factory. So could be nice to rename $factory to $product.

$product = $factory->load($productId);

In this case $product und $factory referencing same object, aren't they? Would be great to rename factory to product and just use it

 $product->load($productId);
slavkodick commented 6 years ago

solved with commit 159e63a