This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * @link https://github.com/paulzi/yii2-materialized-path |
||
4 | * @copyright Copyright (c) 2015 PaulZi <[email protected]> |
||
5 | * @license MIT (https://github.com/paulzi/yii2-materialized-path/blob/master/LICENSE) |
||
6 | */ |
||
7 | |||
8 | namespace paulzi\materializedPath\tests; |
||
9 | |||
10 | use paulzi\materializedPath\tests\migrations\TestMigration; |
||
11 | use paulzi\materializedPath\tests\models\AttributeModeNode; |
||
12 | use paulzi\materializedPath\tests\models\MultipleTreeNode; |
||
13 | use paulzi\materializedPath\tests\models\Node; |
||
14 | use Yii; |
||
15 | |||
16 | /** |
||
17 | * @author PaulZi <[email protected]> |
||
18 | */ |
||
19 | class MaterializedPathBehaviorTestCase extends BaseTestCase |
||
20 | { |
||
21 | View Code Duplication | public function testGetParents() |
|
0 ignored issues
–
show
|
|||
22 | { |
||
23 | $data = [1, 3]; |
||
24 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, Node::findOne(9)->parents)); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 9 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
25 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, AttributeModeNode::findOne(9)->parents)); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 9 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
26 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, MultipleTreeNode::findOne(9)->parents)); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 9 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
27 | |||
28 | $data = [17]; |
||
29 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, Node::findOne(24)->getParents(1)->all())); |
||
0 ignored issues
–
show
The method
getParents does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
Node::findOne() has too many arguments starting with 24 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
30 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, AttributeModeNode::findOne(24)->getParents(1)->all())); |
||
0 ignored issues
–
show
The method
getParents does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
AttributeModeNode::findOne() has too many arguments starting with 24 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
31 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, MultipleTreeNode::findOne(24)->getParents(1)->all())); |
||
0 ignored issues
–
show
The method
getParents does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
MultipleTreeNode::findOne() has too many arguments starting with 24 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
32 | } |
||
33 | |||
34 | View Code Duplication | public function testGetParent() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
35 | { |
||
36 | $data = 15; |
||
37 | $this->assertEquals($data, Node::findOne(18)->parent->id); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 18 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
38 | $this->assertEquals($data, AttributeModeNode::findOne(18)->parent->id); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 18 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
39 | $this->assertEquals($data, MultipleTreeNode::findOne(18)->parent->id); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 18 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
40 | |||
41 | $data = null; |
||
42 | $this->assertEquals($data, Node::findOne(1)->getParent()->one()); |
||
0 ignored issues
–
show
The method
getParent does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
Node::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
43 | $this->assertEquals($data, AttributeModeNode::findOne(1)->getParent()->one()); |
||
0 ignored issues
–
show
The method
getParent does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
AttributeModeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
44 | $this->assertEquals($data, MultipleTreeNode::findOne(1)->getParent()->one()); |
||
0 ignored issues
–
show
The method
getParent does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
MultipleTreeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
45 | } |
||
46 | |||
47 | public function testGetRoot() |
||
48 | { |
||
49 | $data = 1; |
||
50 | $this->assertEquals($data, Node::findOne(12)->root->id); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 12 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
51 | $this->assertEquals($data, AttributeModeNode::findOne(12)->root->id); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 12 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
52 | $this->assertEquals($data, MultipleTreeNode::findOne(12)->root->id); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 12 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
53 | |||
54 | $data = 1; |
||
55 | $this->assertEquals($data, Node::findOne(1)->getRoot()->one()->id); |
||
0 ignored issues
–
show
The method
getRoot does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
Node::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
56 | $this->assertEquals($data, AttributeModeNode::findOne(1)->getRoot()->one()->id); |
||
0 ignored issues
–
show
The method
getRoot does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
AttributeModeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
57 | $this->assertEquals($data, MultipleTreeNode::findOne(1)->getRoot()->one()->id); |
||
0 ignored issues
–
show
The method
getRoot does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
MultipleTreeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
58 | } |
||
59 | |||
60 | public function testGetDescendants() |
||
61 | { |
||
62 | $data = [2, 3, 4, 5, 8, 11, 12, 6, 9, 10, 7, 13]; |
||
63 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, Node::findOne(1)->descendants)); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
64 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, AttributeModeNode::findOne(1)->descendants)); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
65 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, MultipleTreeNode::findOne(1)->descendants)); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
66 | |||
67 | $data = [14, 15, 16, 17]; |
||
68 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, Node::findOne(14)->getDescendants(1, true)->all())); |
||
0 ignored issues
–
show
The method
getDescendants does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
Node::findOne() has too many arguments starting with 14 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
69 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, AttributeModeNode::findOne(14)->getDescendants(1, true)->all())); |
||
0 ignored issues
–
show
The method
getDescendants does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
AttributeModeNode::findOne() has too many arguments starting with 14 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
70 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, MultipleTreeNode::findOne(14)->getDescendants(1, true)->all())); |
||
0 ignored issues
–
show
The method
getDescendants does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
MultipleTreeNode::findOne() has too many arguments starting with 14 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
71 | } |
||
72 | |||
73 | View Code Duplication | public function testGetChildren() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
74 | { |
||
75 | $data = [24, 25, 26]; |
||
76 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, Node::findOne(17)->children)); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 17 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
77 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, AttributeModeNode::findOne(17)->children)); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 17 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
78 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, MultipleTreeNode::findOne(17)->children)); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 17 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
79 | |||
80 | $data = []; |
||
81 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, Node::findOne(13)->getChildren()->all())); |
||
0 ignored issues
–
show
The method
getChildren does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
Node::findOne() has too many arguments starting with 13 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
82 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, AttributeModeNode::findOne(13)->getChildren()->all())); |
||
0 ignored issues
–
show
The method
getChildren does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
AttributeModeNode::findOne() has too many arguments starting with 13 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
83 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, MultipleTreeNode::findOne(13)->getChildren()->all())); |
||
0 ignored issues
–
show
The method
getChildren does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
MultipleTreeNode::findOne() has too many arguments starting with 13 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
84 | } |
||
85 | |||
86 | public function testGetLeaves() |
||
87 | { |
||
88 | $data = [18, 21, 24, 25, 19, 22, 23, 20, 26]; |
||
89 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, Node::findOne(14)->leaves)); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 14 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
90 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, AttributeModeNode::findOne(14)->leaves)); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 14 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
91 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, MultipleTreeNode::findOne(14)->leaves)); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 14 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
92 | |||
93 | $data = []; |
||
94 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, Node::findOne(14)->getLeaves(1)->all())); |
||
0 ignored issues
–
show
The method
getLeaves does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
Node::findOne() has too many arguments starting with 14 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
95 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, AttributeModeNode::findOne(14)->getLeaves(1)->all())); |
||
0 ignored issues
–
show
The method
getLeaves does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
AttributeModeNode::findOne() has too many arguments starting with 14 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
96 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, MultipleTreeNode::findOne(14)->getLeaves(1)->all())); |
||
0 ignored issues
–
show
The method
getLeaves does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
MultipleTreeNode::findOne() has too many arguments starting with 14 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
97 | } |
||
98 | |||
99 | View Code Duplication | public function testGetPrev() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
100 | { |
||
101 | $data = 12; |
||
102 | $this->assertEquals($data, Node::findOne(13)->prev->id); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 13 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
103 | $this->assertEquals($data, AttributeModeNode::findOne(13)->prev->id); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 13 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
104 | $this->assertEquals($data, MultipleTreeNode::findOne(13)->prev->id); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 13 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
105 | |||
106 | $data = null; |
||
107 | $this->assertEquals($data, Node::findOne(15)->getPrev()->one()); |
||
0 ignored issues
–
show
The method
getPrev does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
Node::findOne() has too many arguments starting with 15 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
108 | $this->assertEquals($data, AttributeModeNode::findOne(15)->getPrev()->one()); |
||
0 ignored issues
–
show
The method
getPrev does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
AttributeModeNode::findOne() has too many arguments starting with 15 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
109 | $this->assertEquals($data, MultipleTreeNode::findOne(15)->getPrev()->one()); |
||
0 ignored issues
–
show
The method
getPrev does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
MultipleTreeNode::findOne() has too many arguments starting with 15 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
110 | } |
||
111 | |||
112 | View Code Duplication | public function testGetNext() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
113 | { |
||
114 | $data = 23; |
||
115 | $this->assertEquals($data, Node::findOne(22)->next->id); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 22 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
116 | $this->assertEquals($data, AttributeModeNode::findOne(22)->next->id); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 22 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
117 | $this->assertEquals($data, MultipleTreeNode::findOne(22)->next->id); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 22 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
118 | |||
119 | $data = null; |
||
120 | $this->assertEquals($data, Node::findOne(4)->getNext()->one()); |
||
0 ignored issues
–
show
The method
getNext does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
Node::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
121 | $this->assertEquals($data, AttributeModeNode::findOne(4)->getNext()->one()); |
||
0 ignored issues
–
show
The method
getNext does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
AttributeModeNode::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
122 | $this->assertEquals($data, MultipleTreeNode::findOne(4)->getNext()->one()); |
||
0 ignored issues
–
show
The method
getNext does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
MultipleTreeNode::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
123 | } |
||
124 | |||
125 | public function testGetParentPath() |
||
126 | { |
||
127 | $this->assertEquals('1/2', Node::findOne(7)->getParentPath()); |
||
0 ignored issues
–
show
The method
getParentPath does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
Node::findOne() has too many arguments starting with 7 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
128 | $this->assertEquals(null, AttributeModeNode::findOne(1)->getParentPath()); |
||
0 ignored issues
–
show
The method
getParentPath does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
AttributeModeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
129 | $this->assertEquals(['r', 'n1'], MultipleTreeNode::findOne(7)->getParentPath(true)); |
||
0 ignored issues
–
show
The method
getParentPath does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
MultipleTreeNode::findOne() has too many arguments starting with 7 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
130 | $this->assertEquals([], Node::findOne(14)->getParentPath(true)); |
||
0 ignored issues
–
show
The method
getParentPath does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
Node::findOne() has too many arguments starting with 14 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
131 | } |
||
132 | |||
133 | public function testPopulateTree() |
||
134 | { |
||
135 | $node = Node::findOne(4); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
136 | $node->populateTree(); |
||
0 ignored issues
–
show
The method
populateTree does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
137 | $this->assertEquals(true, $node->isRelationPopulated('children')); |
||
138 | $this->assertEquals(true, $node->children[0]->isRelationPopulated('children')); |
||
139 | $this->assertEquals(11, $node->children[0]->id); |
||
140 | |||
141 | $node = AttributeModeNode::findOne(4); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
142 | $node->populateTree(1); |
||
0 ignored issues
–
show
The method
populateTree does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
143 | $this->assertEquals(true, $node->isRelationPopulated('children')); |
||
144 | $this->assertEquals(false, $node->children[0]->isRelationPopulated('children')); |
||
145 | $this->assertEquals(11, $node->children[0]->id); |
||
146 | |||
147 | $node = MultipleTreeNode::findOne(19); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 19 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
148 | $node->populateTree(); |
||
0 ignored issues
–
show
The method
populateTree does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
149 | $this->assertEquals(true, $node->isRelationPopulated('children')); |
||
150 | |||
151 | $node = MultipleTreeNode::findOne(19); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 19 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
152 | $node->populateTree(1); |
||
0 ignored issues
–
show
The method
populateTree does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
153 | $this->assertEquals(true, $node->isRelationPopulated('children')); |
||
154 | } |
||
155 | |||
156 | View Code Duplication | public function testIsRoot() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
157 | { |
||
158 | $this->assertTrue(Node::findOne(1)->isRoot()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
isRoot does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
159 | $this->assertFalse(Node::findOne(3)->isRoot()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
isRoot does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
160 | |||
161 | $this->assertTrue(AttributeModeNode::findOne(1)->isRoot()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
isRoot does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
162 | $this->assertFalse(AttributeModeNode::findOne(3)->isRoot()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
isRoot does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
163 | |||
164 | $this->assertTrue(MultipleTreeNode::findOne(1)->isRoot()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
isRoot does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
165 | $this->assertFalse(MultipleTreeNode::findOne(3)->isRoot()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
isRoot does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
166 | } |
||
167 | |||
168 | public function testIsChildOf() |
||
169 | { |
||
170 | $this->assertTrue(Node::findOne(10)->isChildOf(Node::findOne(1))); |
||
0 ignored issues
–
show
The method
isChildOf does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
Node::findOne() has too many arguments starting with 10 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
171 | $this->assertTrue(Node::findOne(5)->isChildOf(Node::findOne(2))); |
||
0 ignored issues
–
show
The method
isChildOf does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
Node::findOne() has too many arguments starting with 5 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
172 | $this->assertFalse(Node::findOne(9)->isChildOf(Node::findOne(12))); |
||
0 ignored issues
–
show
The method
isChildOf does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
Node::findOne() has too many arguments starting with 9 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
173 | $this->assertFalse(Node::findOne(9)->isChildOf(Node::findOne(10))); |
||
0 ignored issues
–
show
The method
isChildOf does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
Node::findOne() has too many arguments starting with 9 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
174 | $this->assertFalse(Node::findOne(9)->isChildOf(Node::findOne(9))); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 9 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
isChildOf does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
175 | $this->assertFalse(Node::findOne(9)->isChildOf(Node::findOne(16))); |
||
0 ignored issues
–
show
The method
isChildOf does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
Node::findOne() has too many arguments starting with 9 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
176 | |||
177 | $this->assertTrue(AttributeModeNode::findOne(10)->isChildOf(AttributeModeNode::findOne(1))); |
||
0 ignored issues
–
show
The method
isChildOf does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
AttributeModeNode::findOne() has too many arguments starting with 10 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
178 | $this->assertTrue(AttributeModeNode::findOne(5)->isChildOf(AttributeModeNode::findOne(2))); |
||
0 ignored issues
–
show
The method
isChildOf does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
AttributeModeNode::findOne() has too many arguments starting with 5 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
179 | $this->assertFalse(AttributeModeNode::findOne(9)->isChildOf(AttributeModeNode::findOne(12))); |
||
0 ignored issues
–
show
The method
isChildOf does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
AttributeModeNode::findOne() has too many arguments starting with 9 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
180 | $this->assertFalse(AttributeModeNode::findOne(9)->isChildOf(AttributeModeNode::findOne(10))); |
||
0 ignored issues
–
show
The method
isChildOf does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
AttributeModeNode::findOne() has too many arguments starting with 9 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
181 | $this->assertFalse(AttributeModeNode::findOne(9)->isChildOf(AttributeModeNode::findOne(9))); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 9 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
isChildOf does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
182 | $this->assertFalse(AttributeModeNode::findOne(9)->isChildOf(AttributeModeNode::findOne(16))); |
||
0 ignored issues
–
show
The method
isChildOf does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
AttributeModeNode::findOne() has too many arguments starting with 9 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
183 | |||
184 | $this->assertTrue(MultipleTreeNode::findOne(10)->isChildOf(MultipleTreeNode::findOne(1))); |
||
0 ignored issues
–
show
The method
isChildOf does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
MultipleTreeNode::findOne() has too many arguments starting with 10 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
185 | $this->assertTrue(MultipleTreeNode::findOne(5)->isChildOf(MultipleTreeNode::findOne(2))); |
||
0 ignored issues
–
show
The method
isChildOf does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
MultipleTreeNode::findOne() has too many arguments starting with 5 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
186 | $this->assertFalse(MultipleTreeNode::findOne(9)->isChildOf(MultipleTreeNode::findOne(12))); |
||
0 ignored issues
–
show
The method
isChildOf does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
MultipleTreeNode::findOne() has too many arguments starting with 9 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
187 | $this->assertFalse(MultipleTreeNode::findOne(9)->isChildOf(MultipleTreeNode::findOne(10))); |
||
0 ignored issues
–
show
The method
isChildOf does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
MultipleTreeNode::findOne() has too many arguments starting with 9 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
188 | $this->assertFalse(MultipleTreeNode::findOne(9)->isChildOf(MultipleTreeNode::findOne(9))); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 9 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
isChildOf does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
189 | $this->assertFalse(MultipleTreeNode::findOne(9)->isChildOf(MultipleTreeNode::findOne(16))); |
||
0 ignored issues
–
show
The method
isChildOf does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() The call to
MultipleTreeNode::findOne() has too many arguments starting with 9 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
190 | } |
||
191 | |||
192 | View Code Duplication | public function testIsLeaf() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
193 | { |
||
194 | $this->assertTrue(Node::findOne(5)->isLeaf()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 5 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
isLeaf does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
195 | $this->assertFalse(Node::findOne(2)->isLeaf()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
isLeaf does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
196 | |||
197 | $this->assertTrue(AttributeModeNode::findOne(5)->isLeaf()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 5 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
isLeaf does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
198 | $this->assertFalse(AttributeModeNode::findOne(2)->isLeaf()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
isLeaf does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
199 | |||
200 | $this->assertTrue(MultipleTreeNode::findOne(5)->isLeaf()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 5 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
isLeaf does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
201 | $this->assertFalse(MultipleTreeNode::findOne(2)->isLeaf()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
isLeaf does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
202 | } |
||
203 | |||
204 | public function testMakeRootInsert() |
||
205 | { |
||
206 | (new TestMigration())->up(); |
||
207 | $dataSet = new ArrayDataSet(require(__DIR__ . '/data/empty.php')); |
||
208 | $this->getDatabaseTester()->setDataSet($dataSet); |
||
209 | $this->getDatabaseTester()->onSetUp(); |
||
210 | |||
211 | $node = new Node(['slug' => 'r']); |
||
212 | $this->assertTrue($node->makeRoot()->save()); |
||
0 ignored issues
–
show
The method
makeRoot does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
213 | |||
214 | $node = new AttributeModeNode(['slug' => 'r']); |
||
215 | $this->assertTrue($node->makeRoot()->save()); |
||
0 ignored issues
–
show
The method
makeRoot does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
216 | |||
217 | $node = new MultipleTreeNode(['slug' => 'r']); |
||
218 | $this->assertTrue($node->makeRoot()->save()); |
||
0 ignored issues
–
show
The method
makeRoot does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
219 | |||
220 | $node = new MultipleTreeNode([ |
||
221 | 'slug' => 'r', |
||
222 | 'tree' => 100, |
||
223 | ]); |
||
224 | $this->assertTrue($node->makeRoot()->save()); |
||
0 ignored issues
–
show
The method
makeRoot does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
225 | |||
226 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
227 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-make-root-insert.php')); |
||
228 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
229 | } |
||
230 | |||
231 | public function testMakeRootUpdate() |
||
232 | { |
||
233 | $node = Node::findOne(9); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 9 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
234 | $this->assertTrue($node->makeRoot()->save()); |
||
0 ignored issues
–
show
The method
makeRoot does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
235 | |||
236 | $node = AttributeModeNode::findOne(15); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 15 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
237 | $this->assertTrue($node->makeRoot()->save()); |
||
0 ignored issues
–
show
The method
makeRoot does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
238 | |||
239 | $node = MultipleTreeNode::findOne(17); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 17 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
240 | $this->assertTrue($node->makeRoot()->save()); |
||
0 ignored issues
–
show
The method
makeRoot does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
241 | |||
242 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
243 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-make-root-update.php')); |
||
244 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
245 | } |
||
246 | |||
247 | View Code Duplication | public function testPrependToInsertInNoEmpty() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
248 | { |
||
249 | $node = new Node(['slug' => 'new']); |
||
250 | $this->assertTrue($node->prependTo(Node::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
251 | |||
252 | $node = new AttributeModeNode(['slug' => 'new']); |
||
253 | $this->assertTrue($node->prependTo(AttributeModeNode::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
254 | |||
255 | $node = new MultipleTreeNode(['slug' => 'new']); |
||
256 | $this->assertTrue($node->prependTo(MultipleTreeNode::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
257 | |||
258 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
259 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-prepend-to-insert-in-no-empty.php')); |
||
260 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
261 | } |
||
262 | |||
263 | View Code Duplication | public function testPrependToInsertInEmpty() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
264 | { |
||
265 | $node = new Node(['slug' => 'new']); |
||
266 | $this->assertTrue($node->prependTo(Node::findOne(22))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 22 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
267 | |||
268 | $node = new AttributeModeNode(['slug' => 'new']); |
||
269 | $this->assertTrue($node->prependTo(AttributeModeNode::findOne(22))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 22 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
270 | |||
271 | $node = new MultipleTreeNode(['slug' => 'new']); |
||
272 | $this->assertTrue($node->prependTo(MultipleTreeNode::findOne(22))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 22 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
273 | |||
274 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
275 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-prepend-to-insert-in-empty.php')); |
||
276 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
277 | } |
||
278 | |||
279 | View Code Duplication | public function testPrependToUpdateSameNode() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
280 | { |
||
281 | $node = Node::findOne(4); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
282 | $this->assertTrue($node->prependTo(Node::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
283 | |||
284 | $node = AttributeModeNode::findOne(4); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
285 | $this->assertTrue($node->prependTo(AttributeModeNode::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
286 | |||
287 | $node = MultipleTreeNode::findOne(4); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
288 | $this->assertTrue($node->prependTo(MultipleTreeNode::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
289 | |||
290 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
291 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-prepend-to-update-same-node.php')); |
||
292 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
293 | } |
||
294 | |||
295 | View Code Duplication | public function testPrependToUpdateDeep() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
296 | { |
||
297 | $node = Node::findOne(16); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 16 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
298 | $this->assertTrue($node->prependTo(Node::findOne(19))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 19 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
299 | |||
300 | $node = AttributeModeNode::findOne(16); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 16 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
301 | $this->assertTrue($node->prependTo(AttributeModeNode::findOne(19))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 19 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
302 | |||
303 | $node = MultipleTreeNode::findOne(16); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 16 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
304 | $this->assertTrue($node->prependTo(MultipleTreeNode::findOne(19))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 19 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
305 | |||
306 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
307 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-prepend-to-update-deep.php')); |
||
308 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
309 | } |
||
310 | |||
311 | View Code Duplication | public function testPrependToUpdateOut() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
312 | { |
||
313 | $node = Node::findOne(12); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 12 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
314 | $this->assertTrue($node->prependTo(Node::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
315 | |||
316 | $node = AttributeModeNode::findOne(12); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 12 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
317 | $this->assertTrue($node->prependTo(AttributeModeNode::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
318 | |||
319 | $node = MultipleTreeNode::findOne(12); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 12 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
320 | $this->assertTrue($node->prependTo(MultipleTreeNode::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
321 | |||
322 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
323 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-prepend-to-update-out.php')); |
||
324 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
325 | } |
||
326 | |||
327 | View Code Duplication | public function testPrependToUpdateAnotherTree() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
328 | { |
||
329 | $node = Node::findOne(17); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 17 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
330 | $this->assertTrue($node->prependTo(Node::findOne(2))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
331 | |||
332 | $node = AttributeModeNode::findOne(17); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 17 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
333 | $this->assertTrue($node->prependTo(AttributeModeNode::findOne(2))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
334 | |||
335 | $node = MultipleTreeNode::findOne(17); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 17 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
336 | $this->assertTrue($node->prependTo(MultipleTreeNode::findOne(2))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
337 | |||
338 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
339 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-prepend-to-update-another-tree.php')); |
||
340 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
341 | } |
||
342 | |||
343 | View Code Duplication | public function testPrependToUpdateSelf() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
344 | { |
||
345 | $node = Node::findOne(2); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
346 | $this->assertTrue($node->prependTo(Node::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
347 | |||
348 | $node = AttributeModeNode::findOne(2); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
349 | $this->assertTrue($node->prependTo(AttributeModeNode::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
350 | |||
351 | $node = MultipleTreeNode::findOne(2); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
352 | $this->assertTrue($node->prependTo(MultipleTreeNode::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
353 | |||
354 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
355 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/data.php')); |
||
356 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
357 | } |
||
358 | |||
359 | /** |
||
360 | * @expectedException \yii\base\Exception |
||
361 | */ |
||
362 | public function testPrependToInsertExceptionIsRaisedWhenTargetIsNewRecord() |
||
363 | { |
||
364 | $node = new Node(['slug' => 'new']); |
||
365 | $node->prependTo(new Node())->save(); |
||
0 ignored issues
–
show
The method
prependTo does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
366 | } |
||
367 | |||
368 | /** |
||
369 | * @expectedException \yii\base\Exception |
||
370 | */ |
||
371 | public function testPrependToUpdateExceptionIsRaisedWhenTargetIsNewRecord() |
||
372 | { |
||
373 | $node = Node::findOne(2); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
374 | $node->prependTo(new Node())->save(); |
||
0 ignored issues
–
show
The method
prependTo does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
375 | } |
||
376 | |||
377 | /** |
||
378 | * @expectedException \yii\base\Exception |
||
379 | */ |
||
380 | public function testPrependToUpdateExceptionIsRaisedWhenTargetIsSame() |
||
381 | { |
||
382 | $node = Node::findOne(3); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
383 | $node->prependTo(Node::findOne(3))->save(); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
384 | } |
||
385 | |||
386 | /** |
||
387 | * @expectedException \yii\base\Exception |
||
388 | */ |
||
389 | public function testPrependToUpdateExceptionIsRaisedWhenTargetIsChild() |
||
390 | { |
||
391 | $node = Node::findOne(17); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 17 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
392 | $node->prependTo(Node::findOne(24))->save(); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 24 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
prependTo does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
393 | } |
||
394 | |||
395 | View Code Duplication | public function testAppendToInsertInNoEmpty() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
396 | { |
||
397 | $node = new Node(['slug' => 'new']); |
||
398 | $this->assertTrue($node->appendTo(Node::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
399 | |||
400 | $node = new AttributeModeNode(['slug' => 'new']); |
||
401 | $this->assertTrue($node->appendTo(AttributeModeNode::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
402 | |||
403 | $node = new MultipleTreeNode(['slug' => 'new']); |
||
404 | $this->assertTrue($node->appendTo(MultipleTreeNode::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
405 | |||
406 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
407 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-append-to-insert-in-no-empty.php')); |
||
408 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
409 | } |
||
410 | |||
411 | View Code Duplication | public function testAppendToInsertInEmpty() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
412 | { |
||
413 | $node = new Node(['slug' => 'new']); |
||
414 | $this->assertTrue($node->appendTo(Node::findOne(22))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 22 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
415 | |||
416 | $node = new AttributeModeNode(['slug' => 'new']); |
||
417 | $this->assertTrue($node->appendTo(AttributeModeNode::findOne(22))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 22 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
418 | |||
419 | $node = new MultipleTreeNode(['slug' => 'new']); |
||
420 | $this->assertTrue($node->appendTo(MultipleTreeNode::findOne(22))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 22 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
421 | |||
422 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
423 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-append-to-insert-in-empty.php')); |
||
424 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
425 | } |
||
426 | |||
427 | View Code Duplication | public function testAppendToUpdateSameNode() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
428 | { |
||
429 | $node = Node::findOne(2); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
430 | $this->assertTrue($node->appendTo(Node::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
431 | |||
432 | $node = AttributeModeNode::findOne(2); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
433 | $this->assertTrue($node->appendTo(AttributeModeNode::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
434 | |||
435 | $node = MultipleTreeNode::findOne(2); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
436 | $this->assertTrue($node->appendTo(MultipleTreeNode::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
437 | |||
438 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
439 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-append-to-update-same-node.php')); |
||
440 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
441 | } |
||
442 | |||
443 | View Code Duplication | public function testAppendToUpdateDeep() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
444 | { |
||
445 | $node = Node::findOne(16); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 16 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
446 | $this->assertTrue($node->appendTo(Node::findOne(19))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 19 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
447 | |||
448 | $node = AttributeModeNode::findOne(16); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 16 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
449 | $this->assertTrue($node->appendTo(AttributeModeNode::findOne(19))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 19 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
450 | |||
451 | $node = MultipleTreeNode::findOne(16); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 16 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
452 | $this->assertTrue($node->appendTo(MultipleTreeNode::findOne(19))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 19 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
453 | |||
454 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
455 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-append-to-update-deep.php')); |
||
456 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
457 | } |
||
458 | |||
459 | View Code Duplication | public function testAppendToUpdateOut() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
460 | { |
||
461 | $node = Node::findOne(12); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 12 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
462 | $this->assertTrue($node->appendTo(Node::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
463 | |||
464 | $node = AttributeModeNode::findOne(12); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 12 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
465 | $this->assertTrue($node->appendTo(AttributeModeNode::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
466 | |||
467 | $node = MultipleTreeNode::findOne(12); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 12 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
468 | $this->assertTrue($node->appendTo(MultipleTreeNode::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
469 | |||
470 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
471 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-append-to-update-out.php')); |
||
472 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
473 | } |
||
474 | |||
475 | View Code Duplication | public function testAppendToUpdateAnotherTree() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
476 | { |
||
477 | $node = Node::findOne(17); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 17 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
478 | $this->assertTrue($node->appendTo(Node::findOne(2))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
479 | |||
480 | $node = AttributeModeNode::findOne(17); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 17 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
481 | $this->assertTrue($node->appendTo(AttributeModeNode::findOne(2))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
482 | |||
483 | $node = MultipleTreeNode::findOne(17); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 17 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
484 | $this->assertTrue($node->appendTo(MultipleTreeNode::findOne(2))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
485 | |||
486 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
487 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-append-to-update-another-tree.php')); |
||
488 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
489 | } |
||
490 | |||
491 | View Code Duplication | public function testAppendToUpdateSelf() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
492 | { |
||
493 | $node = Node::findOne(4); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
494 | $this->assertTrue($node->appendTo(Node::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
495 | |||
496 | $node = AttributeModeNode::findOne(4); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
497 | $this->assertTrue($node->appendTo(AttributeModeNode::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
498 | |||
499 | $node = MultipleTreeNode::findOne(4); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
500 | $this->assertTrue($node->appendTo(MultipleTreeNode::findOne(1))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
501 | |||
502 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
503 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/data.php')); |
||
504 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
505 | } |
||
506 | |||
507 | /** |
||
508 | * @expectedException \yii\base\Exception |
||
509 | */ |
||
510 | public function testAppendToInsertExceptionIsRaisedWhenTargetIsNewRecord() |
||
511 | { |
||
512 | $node = new Node(['slug' => 'new']); |
||
513 | $node->appendTo(new Node())->save(); |
||
0 ignored issues
–
show
The method
appendTo does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
514 | } |
||
515 | |||
516 | /** |
||
517 | * @expectedException \yii\base\Exception |
||
518 | */ |
||
519 | public function testAppendToUpdateExceptionIsRaisedWhenTargetIsNewRecord() |
||
520 | { |
||
521 | $node = Node::findOne(2); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
522 | $node->appendTo(new Node())->save(); |
||
0 ignored issues
–
show
The method
appendTo does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
523 | } |
||
524 | |||
525 | /** |
||
526 | * @expectedException \yii\base\Exception |
||
527 | */ |
||
528 | public function testAppendToUpdateExceptionIsRaisedWhenTargetIsSame() |
||
529 | { |
||
530 | $node = Node::findOne(3); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
531 | $node->appendTo(Node::findOne(3))->save(); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
532 | } |
||
533 | |||
534 | /** |
||
535 | * @expectedException \yii\base\Exception |
||
536 | */ |
||
537 | public function testAppendToUpdateExceptionIsRaisedWhenTargetIsChild() |
||
538 | { |
||
539 | $node = Node::findOne(17); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 17 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
540 | $node->appendTo(Node::findOne(24))->save(); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 24 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
appendTo does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
541 | } |
||
542 | |||
543 | View Code Duplication | public function testInsertBeforeInsertNoGap() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
544 | { |
||
545 | $node = new Node(['slug' => 'new']); |
||
546 | $this->assertTrue($node->insertBefore(Node::findOne(4))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertBefore does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
547 | |||
548 | $node = new AttributeModeNode(['slug' => 'new']); |
||
549 | $this->assertTrue($node->insertBefore(AttributeModeNode::findOne(4))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertBefore does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
550 | |||
551 | $node = new MultipleTreeNode(['slug' => 'new']); |
||
552 | $this->assertTrue($node->insertBefore(MultipleTreeNode::findOne(4))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertBefore does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
553 | |||
554 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
555 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-insert-before-insert-no-gap.php')); |
||
556 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
557 | } |
||
558 | |||
559 | View Code Duplication | public function testInsertBeforeInsertGap() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
560 | { |
||
561 | $node = new Node(['slug' => 'new']); |
||
562 | $this->assertTrue($node->insertBefore(Node::findOne(10))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 10 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertBefore does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
563 | |||
564 | $node = new AttributeModeNode(['slug' => 'new']); |
||
565 | $this->assertTrue($node->insertBefore(AttributeModeNode::findOne(10))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 10 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertBefore does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
566 | |||
567 | $node = new MultipleTreeNode(['slug' => 'new']); |
||
568 | $this->assertTrue($node->insertBefore(MultipleTreeNode::findOne(10))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 10 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertBefore does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
569 | |||
570 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
571 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-insert-before-insert-gap.php')); |
||
572 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
573 | } |
||
574 | |||
575 | View Code Duplication | public function testInsertBeforeInsertBegin() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
576 | { |
||
577 | $node = new Node(['slug' => 'new']); |
||
578 | $this->assertTrue($node->insertBefore(Node::findOne(24))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 24 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertBefore does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
579 | |||
580 | $node = new AttributeModeNode(['slug' => 'new']); |
||
581 | $this->assertTrue($node->insertBefore(AttributeModeNode::findOne(24))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 24 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertBefore does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
582 | |||
583 | $node = new MultipleTreeNode(['slug' => 'new']); |
||
584 | $this->assertTrue($node->insertBefore(MultipleTreeNode::findOne(24))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 24 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertBefore does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
585 | |||
586 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
587 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-insert-before-insert-begin.php')); |
||
588 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
589 | } |
||
590 | |||
591 | |||
592 | View Code Duplication | public function testInsertBeforeUpdateSameNode() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
593 | { |
||
594 | $node = Node::findOne(2); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
595 | $this->assertTrue($node->insertBefore(Node::findOne(4))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertBefore does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
596 | |||
597 | $node = AttributeModeNode::findOne(2); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
598 | $this->assertTrue($node->insertBefore(AttributeModeNode::findOne(4))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertBefore does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
599 | |||
600 | $node = MultipleTreeNode::findOne(2); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
601 | $this->assertTrue($node->insertBefore(MultipleTreeNode::findOne(4))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertBefore does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
602 | |||
603 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
604 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-insert-before-update-same-node.php')); |
||
605 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
606 | } |
||
607 | |||
608 | View Code Duplication | public function testInsertBeforeUpdateNext() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
609 | { |
||
610 | $node = Node::findOne(3); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
611 | $this->assertTrue($node->insertBefore(Node::findOne(4))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertBefore does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
612 | |||
613 | $node = AttributeModeNode::findOne(3); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
614 | $this->assertTrue($node->insertBefore(AttributeModeNode::findOne(4))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertBefore does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
615 | |||
616 | $node = MultipleTreeNode::findOne(3); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
617 | $this->assertTrue($node->insertBefore(MultipleTreeNode::findOne(4))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertBefore does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
618 | |||
619 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
620 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/data.php')); |
||
621 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
622 | } |
||
623 | |||
624 | View Code Duplication | public function testInsertBeforeUpdateAnotherTree() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
625 | { |
||
626 | $node = Node::findOne(14); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 14 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
627 | $this->assertTrue($node->insertBefore(Node::findOne(10))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 10 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertBefore does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
628 | |||
629 | $node = AttributeModeNode::findOne(14); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 14 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
630 | $this->assertTrue($node->insertBefore(AttributeModeNode::findOne(10))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 10 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertBefore does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
631 | |||
632 | $node = MultipleTreeNode::findOne(14); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 14 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
633 | $this->assertTrue($node->insertBefore(MultipleTreeNode::findOne(10))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 10 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertBefore does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
634 | |||
635 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
636 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-insert-before-update-another-tree.php')); |
||
637 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
638 | } |
||
639 | |||
640 | /** |
||
641 | * @expectedException \yii\base\Exception |
||
642 | */ |
||
643 | public function testInsertBeforeInsertExceptionIsRaisedWhenTargetIsNewRecord() |
||
644 | { |
||
645 | $node = new Node(['slug' => 'new']); |
||
646 | $node->insertBefore(new Node())->save(); |
||
0 ignored issues
–
show
The method
insertBefore does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
647 | } |
||
648 | |||
649 | /** |
||
650 | * @expectedException \yii\base\Exception |
||
651 | */ |
||
652 | public function testInsertBeforeInsertExceptionIsRaisedWhenTargetIsRoot() |
||
653 | { |
||
654 | $node = new Node(['name' => 'new']); |
||
655 | $node->insertBefore(Node::findOne(1))->save(); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertBefore does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
656 | } |
||
657 | |||
658 | /** |
||
659 | * @expectedException \yii\base\Exception |
||
660 | */ |
||
661 | public function testInsertBeforeUpdateExceptionIsRaisedWhenTargetIsSame() |
||
662 | { |
||
663 | $node = Node::findOne(3); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
664 | $node->insertBefore(Node::findOne(3))->save(); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertBefore does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
665 | } |
||
666 | |||
667 | /** |
||
668 | * @expectedException \yii\base\Exception |
||
669 | */ |
||
670 | public function testInsertBeforeUpdateExceptionIsRaisedWhenTargetIsChild() |
||
671 | { |
||
672 | $node = Node::findOne(17); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 17 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
673 | $node->insertBefore(Node::findOne(24))->save(); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 24 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertBefore does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
674 | } |
||
675 | |||
676 | View Code Duplication | public function testInsertAfterInsertNoGap() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
677 | { |
||
678 | $node = new Node(['slug' => 'new']); |
||
679 | $this->assertTrue($node->insertAfter(Node::findOne(2))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertAfter does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
680 | |||
681 | $node = new AttributeModeNode(['slug' => 'new']); |
||
682 | $this->assertTrue($node->insertAfter(AttributeModeNode::findOne(2))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertAfter does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
683 | |||
684 | $node = new MultipleTreeNode(['slug' => 'new']); |
||
685 | $this->assertTrue($node->insertAfter(MultipleTreeNode::findOne(2))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertAfter does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
686 | |||
687 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
688 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-insert-after-insert-no-gap.php')); |
||
689 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
690 | } |
||
691 | |||
692 | View Code Duplication | public function testInsertAfterInsertGap() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
693 | { |
||
694 | $node = new Node(['slug' => 'new']); |
||
695 | $this->assertTrue($node->insertAfter(Node::findOne(11))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 11 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertAfter does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
696 | |||
697 | $node = new AttributeModeNode(['slug' => 'new']); |
||
698 | $this->assertTrue($node->insertAfter(AttributeModeNode::findOne(11))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 11 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertAfter does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
699 | |||
700 | $node = new MultipleTreeNode(['slug' => 'new']); |
||
701 | $this->assertTrue($node->insertAfter(MultipleTreeNode::findOne(11))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 11 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertAfter does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
702 | |||
703 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
704 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-insert-after-insert-gap.php')); |
||
705 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
706 | } |
||
707 | |||
708 | View Code Duplication | public function testInsertAfterInsertEnd() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
709 | { |
||
710 | $node = new Node(['slug' => 'new']); |
||
711 | $this->assertTrue($node->insertAfter(Node::findOne(23))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 23 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertAfter does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
712 | |||
713 | $node = new AttributeModeNode(['slug' => 'new']); |
||
714 | $this->assertTrue($node->insertAfter(AttributeModeNode::findOne(23))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 23 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertAfter does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
715 | |||
716 | $node = new MultipleTreeNode(['slug' => 'new']); |
||
717 | $this->assertTrue($node->insertAfter(MultipleTreeNode::findOne(23))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 23 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertAfter does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
718 | |||
719 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
720 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-insert-after-insert-end.php')); |
||
721 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
722 | } |
||
723 | |||
724 | View Code Duplication | public function testInsertAfterUpdateSameNode() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
725 | { |
||
726 | $node = Node::findOne(4); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
727 | $this->assertTrue($node->insertAfter(Node::findOne(2))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertAfter does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
728 | |||
729 | $node = AttributeModeNode::findOne(4); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
730 | $this->assertTrue($node->insertAfter(AttributeModeNode::findOne(2))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertAfter does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
731 | |||
732 | $node = MultipleTreeNode::findOne(4); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
733 | $this->assertTrue($node->insertAfter(MultipleTreeNode::findOne(2))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertAfter does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
734 | |||
735 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
736 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-insert-after-update-same-node.php')); |
||
737 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
738 | } |
||
739 | |||
740 | View Code Duplication | public function testInsertAfterUpdatePrev() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
741 | { |
||
742 | $node = Node::findOne(3); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
743 | $this->assertTrue($node->insertAfter(Node::findOne(2))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertAfter does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
744 | |||
745 | $node = AttributeModeNode::findOne(3); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
746 | $this->assertTrue($node->insertAfter(AttributeModeNode::findOne(2))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertAfter does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
747 | |||
748 | $node = MultipleTreeNode::findOne(3); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
749 | $this->assertTrue($node->insertAfter(MultipleTreeNode::findOne(2))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 2 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertAfter does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
750 | |||
751 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
752 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/data.php')); |
||
753 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
754 | } |
||
755 | |||
756 | View Code Duplication | public function testInsertAfterUpdateAnotherTree() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
757 | { |
||
758 | $node = Node::findOne(14); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 14 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
759 | $this->assertTrue($node->insertAfter(Node::findOne(11))->save()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 11 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertAfter does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
760 | |||
761 | $node = AttributeModeNode::findOne(14); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 14 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
762 | $this->assertTrue($node->insertAfter(AttributeModeNode::findOne(11))->save()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 11 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertAfter does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
763 | |||
764 | $node = MultipleTreeNode::findOne(14); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 14 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
765 | $this->assertTrue($node->insertAfter(MultipleTreeNode::findOne(11))->save()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 11 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertAfter does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
766 | |||
767 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
768 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-insert-after-update-another-tree.php')); |
||
769 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
770 | } |
||
771 | |||
772 | /** |
||
773 | * @expectedException \yii\base\Exception |
||
774 | */ |
||
775 | public function testInsertAfterInsertExceptionIsRaisedWhenTargetIsNewRecord() |
||
776 | { |
||
777 | $node = new Node(['slug' => 'new']); |
||
778 | $node->insertAfter(new Node())->save(); |
||
0 ignored issues
–
show
The method
insertAfter does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
779 | } |
||
780 | |||
781 | /** |
||
782 | * @expectedException \yii\base\Exception |
||
783 | */ |
||
784 | public function testInsertAfterInsertExceptionIsRaisedWhenTargetIsRoot() |
||
785 | { |
||
786 | $node = new Node(['slug' => 'new']); |
||
787 | $node->insertAfter(Node::findOne(1))->save(); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertAfter does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
788 | } |
||
789 | |||
790 | /** |
||
791 | * @expectedException \yii\base\Exception |
||
792 | */ |
||
793 | public function testInsertAfterUpdateExceptionIsRaisedWhenTargetIsSame() |
||
794 | { |
||
795 | $node = Node::findOne(3); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
796 | $node->insertAfter(Node::findOne(3))->save(); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertAfter does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
797 | } |
||
798 | |||
799 | /** |
||
800 | * @expectedException \yii\base\Exception |
||
801 | */ |
||
802 | public function testInsertAfterUpdateExceptionIsRaisedWhenTargetIsChild() |
||
803 | { |
||
804 | $node = Node::findOne(17); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 17 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
805 | $node->insertAfter(Node::findOne(24))->save(); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 24 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
insertAfter does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
806 | } |
||
807 | |||
808 | View Code Duplication | public function testDelete() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
809 | { |
||
810 | $this->assertEquals(1, Node::findOne(3)->delete()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
811 | |||
812 | $this->assertEquals(1, AttributeModeNode::findOne(3)->delete()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
813 | |||
814 | $this->assertEquals(1, MultipleTreeNode::findOne(3)->delete()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
815 | |||
816 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
817 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-delete.php')); |
||
818 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
819 | } |
||
820 | |||
821 | /** |
||
822 | * @expectedException \yii\base\Exception |
||
823 | */ |
||
824 | public function testDeleteRoot() |
||
825 | { |
||
826 | Node::findOne(1)->delete(); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
827 | } |
||
828 | |||
829 | /** |
||
830 | * @expectedException \yii\base\Exception |
||
831 | */ |
||
832 | public function testDeleteExceptionIsRaisedWhenNodeIsNewRecord() |
||
833 | { |
||
834 | $node = new Node(['slug' => 'new']); |
||
835 | $node->delete(); |
||
836 | } |
||
837 | |||
838 | View Code Duplication | public function testDeleteWithChildren() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
839 | { |
||
840 | $this->assertEquals(4, Node::findOne(3)->deleteWithChildren()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
deleteWithChildren does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
841 | |||
842 | $this->assertEquals(4, AttributeModeNode::findOne(3)->deleteWithChildren()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
deleteWithChildren does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
843 | |||
844 | $this->assertEquals(4, MultipleTreeNode::findOne(3)->deleteWithChildren()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
deleteWithChildren does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
845 | |||
846 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
847 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-delete-with-children.php')); |
||
848 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
849 | } |
||
850 | |||
851 | View Code Duplication | public function testDeleteWithChildrenRoot() |
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
852 | { |
||
853 | $this->assertEquals(13, Node::findOne(1)->deleteWithChildren()); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
deleteWithChildren does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
854 | |||
855 | $this->assertEquals(13, AttributeModeNode::findOne(1)->deleteWithChildren()); |
||
0 ignored issues
–
show
The call to
AttributeModeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
deleteWithChildren does not exist on object<paulzi\materializ...dels\AttributeModeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
856 | |||
857 | $this->assertEquals(13, MultipleTreeNode::findOne(1)->deleteWithChildren()); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 1 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
deleteWithChildren does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
858 | |||
859 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
860 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-delete-with-children-root.php')); |
||
861 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
862 | } |
||
863 | |||
864 | /** |
||
865 | * @expectedException \yii\base\Exception |
||
866 | */ |
||
867 | public function testDeleteWithChildrenExceptionIsRaisedWhenNodeIsNewRecord() |
||
868 | { |
||
869 | $node = new Node(['slug' => 'new']); |
||
870 | $node->deleteWithChildren(); |
||
0 ignored issues
–
show
The method
deleteWithChildren does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
871 | } |
||
872 | |||
873 | public function testReorderChildren() |
||
874 | { |
||
875 | $this->assertEquals(true, Node::findOne(4)->reorderChildren(true) > 0); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
reorderChildren does not exist on object<paulzi\materializedPath\tests\models\Node> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
876 | |||
877 | $this->assertEquals(true, MultipleTreeNode::findOne(4)->reorderChildren(false) > 0); |
||
0 ignored issues
–
show
The call to
MultipleTreeNode::findOne() has too many arguments starting with 4 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() The method
reorderChildren does not exist on object<paulzi\materializ...odels\MultipleTreeNode> ? Since you implemented __call , maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
![]() |
|||
878 | |||
879 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
880 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-reorder-children.php')); |
||
881 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
882 | } |
||
883 | |||
884 | /** |
||
885 | * @expectedException \yii\base\NotSupportedException |
||
886 | */ |
||
887 | public function testExceptionIsRaisedWhenInsertIsCalled() |
||
888 | { |
||
889 | $node = new Node(['slug' => 'new']); |
||
890 | $node->insert(); |
||
891 | } |
||
892 | |||
893 | public function testUpdate() |
||
894 | { |
||
895 | $node = Node::findOne(3); |
||
0 ignored issues
–
show
The call to
Node::findOne() has too many arguments starting with 3 .
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the ![]() |
|||
896 | $node->slug = 'update'; |
||
897 | $this->assertEquals(1, $node->update()); |
||
898 | } |
||
899 | |||
900 | } |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.