@@ -39,29 +39,32 @@ public static function content(Model $model, string $field)
39
39
'[store_street_line_1] ' => Rapidez::config ('general/store_information/street_line1 ' ),
40
40
'[store_street_line_2] ' => Rapidez::config ('general/store_information/street_line2 ' ),
41
41
'[store_city] ' => Rapidez::config ('general/store_information/city ' ),
42
- '[store_postcode] ' => Rapidez::config ('general/store_information/postcode ' )
42
+ '[store_postcode] ' => Rapidez::config ('general/store_information/postcode ' ),
43
43
]));
44
44
45
45
// Remove double spaces
46
46
return preg_replace ('/\s+/ ' , ' ' , $ value );
47
47
}
48
48
49
- protected static function getModelType (Model $ model ) {
49
+ protected static function getModelType (Model $ model )
50
+ {
50
51
return match (true ) {
51
- $ model instanceof Product => 1 ,
52
+ $ model instanceof Product => 1 ,
52
53
$ model instanceof Category => 2
53
54
};
54
55
}
55
56
56
- protected static function getReplaceKeys (string $ value ) {
57
+ protected static function getReplaceKeys (string $ value )
58
+ {
57
59
preg_match_all ('/\[(.*?)\]/ ' , $ value , $ matches );
58
60
59
61
return $ matches [0 ];
60
62
}
61
63
62
- protected static function getReplaceValue (Model $ model , string $ replaceKey ) {
64
+ protected static function getReplaceValue (Model $ model , string $ replaceKey )
65
+ {
63
66
$ replace = match (true ) {
64
- $ model instanceof Product => str_replace ('product_ ' , '' , $ replaceKey ),
67
+ $ model instanceof Product => str_replace ('product_ ' , '' , $ replaceKey ),
65
68
$ model instanceof Category => str_replace ('category_ ' , '' , $ replaceKey )
66
69
};
67
70
0 commit comments