Problem/Motivation

After merge of #2984803: Transform PHP Native class from Plugin Factory we have some standards and documentation miss in code base.

Proposed resolution

Fix errors and refactor/document all obscures methods.

Comments

woprrr created an issue. See original summary.

woprrr’s picture

Status: Active » Needs review
StatusFileSize
new20.59 KB
woprrr’s picture

Status: Needs review » Needs work
+++ b/src/AbstractAutomatedCrop.php
@@ -211,24 +220,13 @@ abstract class AbstractAutomatedCrop extends PluginBase implements AutomatedCrop
+  public function setAnchor(array $coordinates = []) {
     return array_merge($coordinates, $this->cropBox);
   }

Best practice miss !! this not respect the return in Interface this will break LSP. We should return $this here.

woprrr’s picture

Status: Needs work » Needs review
StatusFileSize
new20.71 KB

Here the patch with LSP violation fixed.

woprrr’s picture

Status: Needs review » Needs work

We have a last major issue to be really SOLID :)

see https://scrutinizer-ci.com/g/woprrr/automated_crop/code-structure/8.x-1....

The code duplication in AutomatedCropDefault plugins need to be fixed.

woprrr’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new32.1 KB

  • woprrr committed edf38dc on 8.x-1.x
    Issue #2985368 by woprrr: Optimise Plugin Factory
    
woprrr’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.