Skip to content

Commit 0cb6ecf

Browse files
committed
[GITHUB] Moves common code to all auto-generated Interceptor classes into a trait
Fix integration tests
1 parent 73542a6 commit 0cb6ecf

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

dev/tests/integration/testsuite/Magento/Framework/Code/_expected/SourceClassWithNamespaceInterceptor.php.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Magento\Framework\Code\GeneratorTest\SourceClassWithNamespace;
55
* Copyright © 2015 Magento. All rights reserved.
66
* See COPYING.txt for license details.
77
*/
8-
class Interceptor extends \Magento\Framework\Code\GeneratorTest\SourceClassWithNamespace
8+
class Interceptor extends \Magento\Framework\Code\GeneratorTest\SourceClassWithNamespace implements \Magento\Framework\Interception\InterceptorInterface
99
{
1010
use \Magento\Framework\Interception\Interceptor;
1111

lib/internal/Magento/Framework/Interception/Chain/Chain.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,13 @@ public function __construct(PluginListInterface $pluginList)
3535
* @param array $arguments
3636
* @return mixed|void
3737
*/
38-
public function invokeNext($type, $method, InterceptorInterface $subject, array $arguments, $previousPluginCode = null)
39-
{
38+
public function invokeNext(
39+
$type,
40+
$method,
41+
InterceptorInterface $subject,
42+
array $arguments,
43+
$previousPluginCode = null
44+
) {
4045
$pluginInfo = $this->pluginList->getNext($type, $method, $previousPluginCode);
4146
$capMethod = ucfirst($method);
4247
$result = null;

lib/internal/Magento/Framework/Interception/ChainInterface.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,11 @@ interface ChainInterface
1616
* @param string $previousPluginCode
1717
* @return mixed
1818
*/
19-
public function invokeNext($type, $method, InterceptorInterface $subject, array $arguments, $previousPluginCode = null);
19+
public function invokeNext(
20+
$type,
21+
$method,
22+
InterceptorInterface $subject,
23+
array $arguments,
24+
$previousPluginCode = null
25+
);
2026
}

0 commit comments

Comments
 (0)