File tree Expand file tree Collapse file tree 4 files changed +11
-9
lines changed Expand file tree Collapse file tree 4 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -261,7 +261,8 @@ public function getStyleViewModel()
261261 /**
262262 * @return string
263263 */
264- public function getPageParamName (){
264+ public function getPageParamName ()
265+ {
265266 return $ this ->config ->getPagePaginationType () !== 'p ' ? 'page ' : 'p ' ;
266267 }
267268}
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public function __construct(
3030 Context $ context ,
3131 array $ data = [],
3232 Config $ config = null
33- ){
33+ ) {
3434 parent ::__construct ($ context , $ data );
3535 $ objectManager = \Magento \Framework \App \ObjectManager::getInstance ();
3636 $ this ->config = $ config ?: $ objectManager ->create (Config::class);
@@ -169,7 +169,8 @@ public function getPagerHtml()
169169 /**
170170 * @return string
171171 */
172- public function getPageParamName (){
172+ public function getPageParamName ()
173+ {
173174 return $ this ->config ->getPagePaginationType () !== 'p ' ? 'page ' : 'p ' ;
174175 }
175176}
Original file line number Diff line number Diff line change @@ -129,10 +129,10 @@ public function getPagerUrl($params = [])
129129 $ urlParams ['_query ' ] = $ params ;
130130
131131 $ pageNumber = $ params ['page ' ] ?? ($ params ['p ' ] ?? null );
132- if ($ this ->getPagePaginationType () !== '2 ' ){
132+ if ($ this ->getPagePaginationType () !== '2 ' ) {
133133 $ urlParams ['_query ' ] = [$ this ->getPagePaginationType () => $ pageNumber ];
134134 $ url = $ this ->getUrl ($ this ->getPath (), $ urlParams );
135- }else {
135+ } else {
136136 unset($ urlParams ['_current ' ]);
137137 unset($ urlParams ['_query ' ]);
138138 unset($ urlParams ['_fragment ' ]);
@@ -143,11 +143,11 @@ public function getPagerUrl($params = [])
143143 $ page = '/page/ ' . $ params ['page ' ];
144144 }
145145 $ url = $ this ->getUrl ($ this ->getPath (), $ urlParams );
146- if ($ parsed = explode ('/ ' , parse_url ($ url )['path ' ])){
146+ if ($ parsed = explode ('/ ' , parse_url ($ url )['path ' ])) {
147147 $ key = array_search ('page ' , $ parsed );
148- if ($ key && isset ($ parsed [$ key + 1 ]) && intval ($ parsed [$ key + 1 ])){
148+ if ($ key && isset ($ parsed [$ key + 1 ]) && intval ($ parsed [$ key + 1 ])) {
149149 $ url = str_replace ('/page/ ' . $ parsed [$ key + 1 ], $ page , $ url );
150- }else {
150+ } else {
151151 $ url = $ url . $ page ;
152152 }
153153 }
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ class UrlResolver implements UrlResolverInterface
5959 /**
6060 * @var Config|mixed
6161 */
62- protected $ config ;
62+ protected $ config ;
6363
6464 /**
6565 * UrlResolver constructor.
You can’t perform that action at this time.
0 commit comments