File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Test/Unit/Controller/Index Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 44 * Copyright © Magento, Inc. All rights reserved.
55 * See COPYING.txt for license details.
66 */
7+ declare (strict_types=1 );
78
89namespace Magento \Version \Controller \Index ;
910
10- use Magento \Framework \App \Action \HttpGetActionInterface as HttpGetActionInterface ;
1111use Magento \Framework \App \Action \Action ;
1212use Magento \Framework \App \Action \Context ;
13+ use Magento \Framework \App \Action \HttpGetActionInterface as HttpGetActionInterface ;
1314use Magento \Framework \App \ProductMetadataInterface ;
1415
1516/**
@@ -40,7 +41,7 @@ public function __construct(Context $context, ProductMetadataInterface $productM
4041 *
4142 * @return void
4243 */
43- public function execute ()
44+ public function execute (): void
4445 {
4546 $ version = $ this ->productMetadata ->getVersion ();
4647 $ versionParts = explode ('. ' , $ version );
@@ -61,7 +62,7 @@ public function execute()
6162 * @param string $fullVersion
6263 * @return bool
6364 */
64- private function isGitBasedInstallation ($ fullVersion )
65+ private function isGitBasedInstallation ($ fullVersion ): bool
6566 {
6667 return 0 === strpos ($ fullVersion , self ::DEV_PREFIX );
6768 }
Original file line number Diff line number Diff line change 77
88namespace Magento \Version \Test \Unit \Controller \Index ;
99
10- use Magento \Version \Controller \Index \Index as VersionIndex ;
1110use Magento \Framework \App \Action \Context ;
1211use Magento \Framework \App \ProductMetadataInterface ;
1312use Magento \Framework \App \ResponseInterface ;
1413use Magento \Framework \TestFramework \Unit \Helper \ObjectManager ;
14+ use Magento \Version \Controller \Index \Index as VersionIndex ;
1515use PHPUnit \Framework \TestCase ;
1616
1717class IndexTest extends TestCase
@@ -73,7 +73,7 @@ protected function setUp()
7373 /**
7474 * Git Base version does not return information about version
7575 */
76- public function testGitBasedInstallationDoesNotReturnVersion ()
76+ public function testGitBasedInstallationDoesNotReturnVersion (): void
7777 {
7878 $ this ->productMetadataMock ->expects ($ this ->any ())
7979 ->method ('getVersion ' )
@@ -88,7 +88,7 @@ public function testGitBasedInstallationDoesNotReturnVersion()
8888 /**
8989 * Magento Community returns information about major and minor version of product
9090 */
91- public function testCommunityVersionDisplaysMajorMinorVersionAndEditionName ()
91+ public function testCommunityVersionDisplaysMajorMinorVersionAndEditionName (): void
9292 {
9393 $ this ->productMetadataMock ->expects ($ this ->any ())->method ('getVersion ' )->willReturn ('2.3.3 ' );
9494 $ this ->productMetadataMock ->expects ($ this ->any ())->method ('getEdition ' )->willReturn ('Community ' );
You can’t perform that action at this time.
0 commit comments