File tree Expand file tree Collapse file tree 2 files changed +31
-32
lines changed
app/code/Magento/Elasticsearch8 Expand file tree Collapse file tree 2 files changed +31
-32
lines changed Original file line number Diff line number Diff line change 1919 * Elasticsearch client
2020 * @deprecated Elasticsearch8 is no longer supported by Adobe
2121 * @see this class will be responsible for ES8 only
22- * phpstan:ignore "File has calls static method. (phpStaticMethodCalls)"
2322 */
2423class Elasticsearch implements ClientInterface
2524{
@@ -80,7 +79,7 @@ public function __construct(
8079 $ this ->clientOptions = $ options ;
8180 $ this ->fieldsMappingPreprocessors = $ fieldsMappingPreprocessors ;
8281 $ this ->dynamicTemplatesProvider = $ dynamicTemplatesProvider ?: ObjectManager::getInstance ()
83- ->get (DynamicTemplatesProvider::class); /** @phpstan-ignore-line */
82+ ->get (DynamicTemplatesProvider::class);
8483 }
8584
8685 /**
Original file line number Diff line number Diff line change 33 * Copyright 2025 Adobe
44 * All Rights Reserved.
55 */
6+
67declare (strict_types=1 );
78
89namespace Magento \Elasticsearch8 \Test \Unit \Model \Client ;
2728 * Class ElasticsearchTest to test Elasticsearch 8
2829 *
2930 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
30- * phpstan:ignore "File has calls static method. (phpStaticMethodCalls)"
3131 */
3232class ElasticsearchTest extends TestCase
3333{
@@ -61,43 +61,43 @@ class ElasticsearchTest extends TestCase
6161 */
6262 protected function setUp (): void
6363 {
64- BypassFinals::enable (); /** @phpstan-ignore-line */
64+ BypassFinals::enable ();
6565 $ this ->elasticsearchClientMock = $ this ->getMockBuilder (Client::class) /** @phpstan-ignore-line */
66- ->onlyMethods (
67- [
68- 'indices ' ,
69- 'ping ' ,
70- 'bulk ' ,
71- 'search ' ,
72- 'scroll ' ,
73- 'info ' ,
74- ]
75- )
66+ ->onlyMethods (
67+ [
68+ 'indices ' ,
69+ 'ping ' ,
70+ 'bulk ' ,
71+ 'search ' ,
72+ 'scroll ' ,
73+ 'info ' ,
74+ ]
75+ )
7676 ->disableOriginalConstructor ()
7777 ->getMock ();
7878 $ this ->indicesMock = $ this ->getMockBuilder (Indices::class) /** @phpstan-ignore-line */
79- ->onlyMethods (
80- [
81- 'exists ' ,
82- 'getSettings ' ,
83- 'create ' ,
84- 'delete ' ,
85- 'putMapping ' ,
86- 'getMapping ' ,
87- 'stats ' ,
88- 'updateAliases ' ,
89- 'existsAlias ' ,
90- 'getAlias ' ,
91- ]
92- )
79+ ->onlyMethods (
80+ [
81+ 'exists ' ,
82+ 'getSettings ' ,
83+ 'create ' ,
84+ 'delete ' ,
85+ 'putMapping ' ,
86+ 'getMapping ' ,
87+ 'stats ' ,
88+ 'updateAliases ' ,
89+ 'existsAlias ' ,
90+ 'getAlias ' ,
91+ ]
92+ )
9393 ->addMethods (['deleteMapping ' ])
9494 ->disableOriginalConstructor ()
9595 ->getMock ();
9696 $ this ->elasticsearchResponse = $ this ->getMockBuilder (ElasticsearchResponse::class) /** @phpstan-ignore-line */
97- ->onlyMethods ([
98- 'asBool ' ,
99- 'asArray ' ,
100- ])
97+ ->onlyMethods ([
98+ 'asBool ' ,
99+ 'asArray ' ,
100+ ])
101101 ->getMock ();
102102 $ this ->elasticsearchClientMock ->expects ($ this ->any ())
103103 ->method ('indices ' )
You can’t perform that action at this time.
0 commit comments