scout-extended icon indicating copy to clipboard operation
scout-extended copied to clipboard

Refactoring needed in class `Algolia\ScoutExtended\Settings\LocalFactory::class`

Open nunomaduro opened this issue 6 years ago • 3 comments
trafficstars

The class Algolia\ScoutExtended\Settings\LocalFactory::class is responsable to detect settings out of Laravel models. We should consider a re-write this logic, and split it into multiple classes.

nunomaduro avatar Feb 19 '19 09:02 nunomaduro

it's a fix or a new feature for you ? For me it's just a fix

TomKlotzPro avatar Mar 19 '19 14:03 TomKlotzPro

@TomKlotzPro Neither. You should create a branch: refacto/local-factory. Please write your plan before coding.

nunomaduro avatar Mar 19 '19 14:03 nunomaduro

My solution is to have an interface SettingAttributeInterface with one method(key,value,array)return array . Add for each different SettingAttribute class implements the interface then on factory call the object and their method.

TomKlotzPro avatar Mar 19 '19 14:03 TomKlotzPro