File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -117,12 +117,9 @@ private function resolveByWebUrl(string $uri): string
117117 */
118118 private function calculatePreferenceScore (Store $ store ): int
119119 {
120- $ score = 0 ;
121120 $ website = $ store ->getWebsite ();
122- if ($ website ->getIsDefault ()) {
123- // Bonus point for the stores which are part of one of the groups from the default website.
124- $ score = in_array ($ store ->getGroupId (), $ website ->getGroupIds ()) ? 2 : 1 ;
125- }
121+ // Bonus point for the stores which are part of one of the groups from the default website.
122+ $ score = $ website ->getIsDefault () ? 2 : 0 ;
126123 // Extra point for the stores which are part of the default group of its website.
127124 $ score += (int )$ website ->getDefaultGroup ()->getDefaultStoreId () === (int )$ store ->getId () ? 1 : 0 ;
128125 // Extra point is the store is the default one of its group.
You can’t perform that action at this time.
0 commit comments