Skip to content

Commit ba51b43

Browse files
committed
Introduce strict_types
1 parent 6be7d1e commit ba51b43

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

app/code/Magento/Version/Controller/Index/Index.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
7+
declare(strict_types=1);
78

89
namespace Magento\Version\Controller\Index;
910

10-
use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
1111
use Magento\Framework\App\Action\Action;
1212
use Magento\Framework\App\Action\Context;
13+
use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
1314
use 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
}

app/code/Magento/Version/Test/Unit/Controller/Index/IndexTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77

88
namespace Magento\Version\Test\Unit\Controller\Index;
99

10-
use Magento\Version\Controller\Index\Index as VersionIndex;
1110
use Magento\Framework\App\Action\Context;
1211
use Magento\Framework\App\ProductMetadataInterface;
1312
use Magento\Framework\App\ResponseInterface;
1413
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
14+
use Magento\Version\Controller\Index\Index as VersionIndex;
1515
use PHPUnit\Framework\TestCase;
1616

1717
class 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');

0 commit comments

Comments
 (0)