File tree 1 file changed +4
-7
lines changed
app/code/Magento/Customer/Block/Account 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
+ declare (strict_types=1 );
6
7
7
8
namespace Magento \Customer \Block \Account ;
8
9
@@ -21,7 +22,7 @@ class Navigation extends Links
21
22
* {@inheritdoc}
22
23
* @since 100.2.0
23
24
*/
24
- public function getLinks ()
25
+ public function getLinks (): array
25
26
{
26
27
$ links = $ this ->_layout ->getChildBlocks ($ this ->getNameInLayout ());
27
28
$ sortableLink = [];
@@ -44,12 +45,8 @@ public function getLinks()
44
45
* @return int
45
46
* @SuppressWarnings(PHPMD.UnusedPrivateMethod)
46
47
*/
47
- private function compare (SortLinkInterface $ firstLink , SortLinkInterface $ secondLink )
48
+ private function compare (SortLinkInterface $ firstLink , SortLinkInterface $ secondLink ): int
48
49
{
49
- if ($ firstLink ->getSortOrder () == $ secondLink ->getSortOrder ()) {
50
- return 0 ;
51
- }
52
-
53
- return ($ firstLink ->getSortOrder () < $ secondLink ->getSortOrder ()) ? 1 : -1 ;
50
+ return $ firstLink ->getSortOrder () <=> $ secondLink ->getSortOrder ();
54
51
}
55
52
}
You can’t perform that action at this time.
0 commit comments