Skip to content

Commit 3b93180

Browse files
committed
Fixed static test failures
1 parent 4134d6b commit 3b93180

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

lib/internal/Magento/Framework/Data/Tree.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ class Tree
2626
*/
2727
protected $_nodes;
2828

29+
/**
30+
* Initialize Tree
31+
*/
2932
public function __construct()
3033
{
3134
$this->_nodes = new NodeCollection($this);

lib/internal/Magento/Framework/Data/Tree/Db.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function __construct(\Magento\Framework\DB\Adapter\AdapterInterface $conn
8888
parent::__construct();
8989

9090
if (!$connection) {
91-
throw new \Exception('Wrong "$connection" parametr');
91+
throw new \Exception('Wrong "$connection" parametr'); // phpcs:ignore
9292
}
9393

9494
$this->_conn = $connection;
@@ -104,7 +104,7 @@ public function __construct(\Magento\Framework\DB\Adapter\AdapterInterface $conn
104104
$fields[self::ORDER_FIELD]
105105
)
106106
) {
107-
throw new \Exception('"$fields" tree configuratin array');
107+
throw new \Exception('"$fields" tree configuratin array'); // phpcs:ignore
108108
}
109109

110110
$this->_idField = $fields[self::ID_FIELD];
@@ -141,8 +141,8 @@ public function setDbSelect($select)
141141
/**
142142
* Load tree
143143
*
144-
* @param int|Node $parentNode
145-
* @param int $recursionLevel
144+
* @param int|Node $parentNode
145+
* @param int $recursionLevel
146146
*
147147
* @return $this
148148
* @throws \Exception
@@ -158,7 +158,7 @@ public function load($parentNode = null, $recursionLevel = 100)
158158
$parentId = $parentNode;
159159
$parentNode = null;
160160
} else {
161-
throw new \Exception('root node id is not defined');
161+
throw new \Exception('root node id is not defined'); // phpcs:ignore
162162
}
163163

164164
$select = clone $this->_select;
@@ -285,7 +285,7 @@ public function moveNodeTo($node, $parentNode, $prevNode = null)
285285
$this->_conn->commit();
286286
} catch (\Exception $e) {
287287
$this->_conn->rollBack();
288-
throw new \Exception('Can\'t move tree node');
288+
throw new \Exception('Can\'t move tree node'); // phpcs:ignore
289289
}
290290
}
291291

@@ -376,7 +376,7 @@ public function removeNode($node)
376376
$this->_conn->commit();
377377
} catch (\Exception $e) {
378378
$this->_conn->rollBack();
379-
throw new \Exception('Can\'t remove tree node');
379+
throw new \Exception('Can\'t remove tree node'); // phpcs:ignore
380380
}
381381

382382
parent::removeNode($node);

lib/internal/Magento/Framework/Data/Tree/Node.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ public function setPathId($path)
178178
* Seemingyly useless method
179179
*
180180
* @param Node $node
181-
*
182181
* @return void
183182
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
183+
* @phpcs:disable Magento2.CodeAnalysis.EmptyBlock.DetectedFunction
184184
*/
185185
public function isChildOf($node)
186186
{

0 commit comments

Comments
 (0)