Skip to content

Commit 274cae5

Browse files
committed
Merge branch '2.3-develop-php74' of https://github.com/magento-commerce/magento2ce into MC-40559
2 parents 118323e + d7e1f8f commit 274cae5

File tree

4 files changed

+12
-17
lines changed

4 files changed

+12
-17
lines changed

dev/tests/static/framework/Magento/TestFramework/Utility/AutogeneratedClassNotInConstructorFinder.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
use ReflectionNamedType;
99

1010
/**
11-
* Find classes created by object manager that are not requested in constructor. All autogenerated classes should be
12-
* requested in constructor, otherwise compiler will not be able to find and generate these classes
11+
* Find classes created by object manager that are not requested in constructor.
1312
*/
1413
class AutogeneratedClassNotInConstructorFinder
1514
{
@@ -99,8 +98,8 @@ private function getConstructorArguments($className)
9998
/**
10099
* Match partial namespace
101100
*
102-
* @param $fileContent
103-
* @param $shortName
101+
* @param string $fileContent
102+
* @param string $shortName
104103
* @return string
105104
*/
106105
private function matchPartialNamespace($fileContent, $shortName)

dev/tests/static/testsuite/Magento/Test/Integrity/PublicCodeTest.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,9 @@ private function getWhitelist(): array
4242
);
4343
$whiteListItems = [];
4444
foreach (glob($whiteListFiles) as $fileName) {
45-
$whiteListItems = array_merge(
46-
$whiteListItems,
47-
file($fileName, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)
48-
);
45+
$whiteListItems[] = file($fileName, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
4946
}
50-
$this->blockWhitelist = $whiteListItems;
47+
$this->blockWhitelist = array_merge([], ...$whiteListItems);
5148
}
5249
return $this->blockWhitelist;
5350
}
@@ -123,7 +120,7 @@ public function testAllPHPClassesReferencedFromPublicClassesArePublic($class)
123120
$returnTypes = [];
124121
if ($method->hasReturnType()) {
125122
if (!$method->getReturnType()->isBuiltin()) {
126-
$returnTypes = [trim($method->getReturnType()->__toString(), '?[]')];
123+
$returnTypes = [trim($method->getReturnType()->getName(), '?[]')];
127124
}
128125
} else {
129126
$returnTypes = $this->getReturnTypesFromDocComment($method->getDocComment());
@@ -278,7 +275,7 @@ private function checkParameters($class, \ReflectionMethod $method, array $nonPu
278275
foreach ($method->getParameters() as $parameter) {
279276
if ($parameter->hasType()
280277
&& !$parameter->getType()->isBuiltin()
281-
&& !$this->isGenerated($parameter->getType()->__toString())
278+
&& !$this->isGenerated($parameter->getType()->getName())
282279
) {
283280
$parameterClass = $parameter->getClass();
284281
/*

lib/internal/Magento/Framework/DB/Sql/UnionExpression.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Magento\Framework\DB\Select;
99

1010
/**
11-
* Class UnionExpression
11+
* Class UnionExpression handles the build of union clauses in database queries
1212
*/
1313
class UnionExpression extends Expression
1414
{

lib/internal/Magento/Framework/MessageQueue/BatchConsumer.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
use Magento\Framework\MessageQueue\Consumer\ConfigInterface as ConsumerConfig;
1111

1212
/**
13-
* Class BatchConsumer
13+
* BatchConsumer is a consumer class which implements the consumer interface
14+
*
1415
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1516
*/
1617
class BatchConsumer implements ConsumerInterface
@@ -74,9 +75,7 @@ class BatchConsumer implements ConsumerInterface
7475
* @param ConsumerConfigurationInterface $configuration
7576
* @param int $interval [optional]
7677
* @param int $batchSize [optional]
77-
* @param MessageProcessorLoader $messageProcessorLoader [optional]
78-
* @param MessageController $messageController [optional]
79-
* @param ConsumerConfig $consumerConfig [optional]
78+
* @param MessageProcessorLoader|null $messageProcessorLoader [optional]
8079
*
8180
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
8281
*/
@@ -103,7 +102,7 @@ public function __construct(
103102
}
104103

105104
/**
106-
* {@inheritdoc}
105+
* @inheritdoc
107106
*/
108107
public function process($maxNumberOfMessages = null)
109108
{

0 commit comments

Comments
 (0)