Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 15 |
Ratio | 100 % |
Metric | Value |
---|---|
dl | 15 |
loc | 15 |
rs | 9.4286 |
cc | 1 |
eloc | 10 |
nc | 1 |
nop | 0 |
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
Loading history...
|
|||
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
Loading history...
|
|||
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
Loading history...
|
|||
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 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
Loading history...
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 { }
Loading history...
|
|||
30 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, AttributeModeNode::findOne(24)->getParents(1)->all())); |
||
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
Loading history...
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 { }
Loading history...
|
|||
31 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, MultipleTreeNode::findOne(24)->getParents(1)->all())); |
||
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
Loading history...
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 { }
Loading history...
|
|||
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.
Loading history...
|
|||
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
Loading history...
|
|||
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
Loading history...
|
|||
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
Loading history...
|
|||
40 | |||
41 | $data = null; |
||
42 | $this->assertEquals($data, Node::findOne(1)->getParent()->one()); |
||
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
Loading history...
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 { }
Loading history...
|
|||
43 | $this->assertEquals($data, AttributeModeNode::findOne(1)->getParent()->one()); |
||
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
Loading history...
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 { }
Loading history...
|
|||
44 | $this->assertEquals($data, MultipleTreeNode::findOne(1)->getParent()->one()); |
||
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
Loading history...
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 { }
Loading history...
|
|||
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
Loading history...
|
|||
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
Loading history...
|
|||
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
Loading history...
|
|||
53 | |||
54 | $data = 1; |
||
55 | $this->assertEquals($data, Node::findOne(1)->getRoot()->one()->id); |
||
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
Loading history...
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 { }
Loading history...
|
|||
56 | $this->assertEquals($data, AttributeModeNode::findOne(1)->getRoot()->one()->id); |
||
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
Loading history...
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 { }
Loading history...
|
|||
57 | $this->assertEquals($data, MultipleTreeNode::findOne(1)->getRoot()->one()->id); |
||
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
Loading history...
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 { }
Loading history...
|
|||
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
Loading history...
|
|||
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
Loading history...
|
|||
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
Loading history...
|
|||
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 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
Loading history...
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 { }
Loading history...
|
|||
69 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, AttributeModeNode::findOne(14)->getDescendants(1, true)->all())); |
||
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
Loading history...
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 { }
Loading history...
|
|||
70 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, MultipleTreeNode::findOne(14)->getDescendants(1, true)->all())); |
||
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
Loading history...
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 { }
Loading history...
|
|||
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.
Loading history...
|
|||
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
Loading history...
|
|||
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
Loading history...
|
|||
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
Loading history...
|
|||
79 | |||
80 | $data = []; |
||
81 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, Node::findOne(13)->getChildren()->all())); |
||
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
Loading history...
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 { }
Loading history...
|
|||
82 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, AttributeModeNode::findOne(13)->getChildren()->all())); |
||
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
Loading history...
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 { }
Loading history...
|
|||
83 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, MultipleTreeNode::findOne(13)->getChildren()->all())); |
||
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
Loading history...
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 { }
Loading history...
|
|||
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
Loading history...
|
|||
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
Loading history...
|
|||
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
Loading history...
|
|||
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 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
Loading history...
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 { }
Loading history...
|
|||
95 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, AttributeModeNode::findOne(14)->getLeaves(1)->all())); |
||
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
Loading history...
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 { }
Loading history...
|
|||
96 | $this->assertEquals($data, array_map(function ($value) { return $value->id; }, MultipleTreeNode::findOne(14)->getLeaves(1)->all())); |
||
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
Loading history...
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 { }
Loading history...
|
|||
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.
Loading history...
|
|||
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
Loading history...
|
|||
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
Loading history...
|
|||
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
Loading history...
|
|||
105 | |||
106 | $data = null; |
||
107 | $this->assertEquals($data, Node::findOne(15)->getPrev()->one()); |
||
0 ignored issues
–
show
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
Loading history...
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 { }
Loading history...
|
|||
108 | $this->assertEquals($data, AttributeModeNode::findOne(15)->getPrev()->one()); |
||
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
Loading history...
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 { }
Loading history...
|
|||
109 | $this->assertEquals($data, MultipleTreeNode::findOne(15)->getPrev()->one()); |
||
0 ignored issues
–
show
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
Loading history...
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 { }
Loading history...
|
|||
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.
Loading history...
|
|||
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
Loading history...
|
|||
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
Loading history...
|
|||
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
Loading history...
|
|||
118 | |||
119 | $data = null; |
||
120 | $this->assertEquals($data, Node::findOne(4)->getNext()->one()); |
||
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
Loading history...
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 { }
Loading history...
|
|||
121 | $this->assertEquals($data, AttributeModeNode::findOne(4)->getNext()->one()); |
||
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
Loading history...
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 { }
Loading history...
|
|||
122 | $this->assertEquals($data, MultipleTreeNode::findOne(4)->getNext()->one()); |
||
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
Loading history...
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 { }
Loading history...
|
|||
123 | } |
||
124 | |||
125 | public function testGetParentPath() |
||
126 | { |
||
127 | $this->assertEquals('1/2', Node::findOne(7)->getParentPath()); |
||
0 ignored issues
–
show
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
Loading history...
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 { }
Loading history...
|
|||
128 | $this->assertEquals(null, AttributeModeNode::findOne(1)->getParentPath()); |
||
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
Loading history...
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 { }
Loading history...
|
|||
129 | $this->assertEquals(['r', 'n1'], MultipleTreeNode::findOne(7)->getParentPath(true)); |
||
0 ignored issues
–
show
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
Loading history...
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 { }
Loading history...
|
|||
130 | $this->assertEquals([], Node::findOne(14)->getParentPath(true)); |
||
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
Loading history...
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 { }
Loading history...
|
|||
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
Loading history...
|
|||
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 { }
Loading history...
|
|||
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
Loading history...
|
|||
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 { }
Loading history...
|
|||
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
Loading history...
|
|||
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 { }
Loading history...
|
|||
149 | $this->assertEquals(true, $node->isRelationPopulated('children')); |
||
150 | } |
||
151 | |||
152 | 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.
Loading history...
|
|||
153 | { |
||
154 | $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
Loading history...
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 { }
Loading history...
|
|||
155 | $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
Loading history...
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 { }
Loading history...
|
|||
156 | |||
157 | $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
Loading history...
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 { }
Loading history...
|
|||
158 | $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
Loading history...
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 { }
Loading history...
|
|||
159 | |||
160 | $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
Loading history...
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 { }
Loading history...
|
|||
161 | $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
Loading history...
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 { }
Loading history...
|
|||
162 | } |
||
163 | |||
164 | public function testIsChildOf() |
||
165 | { |
||
166 | $this->assertTrue(Node::findOne(10)->isChildOf(Node::findOne(1))); |
||
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
Loading history...
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
Loading history...
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 { }
Loading history...
|
|||
167 | $this->assertTrue(Node::findOne(5)->isChildOf(Node::findOne(2))); |
||
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
Loading history...
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
Loading history...
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 { }
Loading history...
|
|||
168 | $this->assertFalse(Node::findOne(9)->isChildOf(Node::findOne(12))); |
||
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
Loading history...
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
Loading history...
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 { }
Loading history...
|
|||
169 | $this->assertFalse(Node::findOne(9)->isChildOf(Node::findOne(10))); |
||
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
Loading history...
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
Loading history...
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 { }
Loading history...
|
|||
170 | $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
Loading history...
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 { }
Loading history...
|
|||
171 | $this->assertFalse(Node::findOne(9)->isChildOf(Node::findOne(16))); |
||
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
Loading history...
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
Loading history...
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 { }
Loading history...
|
|||
172 | |||
173 | $this->assertTrue(AttributeModeNode::findOne(10)->isChildOf(AttributeModeNode::findOne(1))); |
||
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
Loading history...
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
Loading history...
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 { }
Loading history...
|
|||
174 | $this->assertTrue(AttributeModeNode::findOne(5)->isChildOf(AttributeModeNode::findOne(2))); |
||
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
Loading history...
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
Loading history...
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 { }
Loading history...
|
|||
175 | $this->assertFalse(AttributeModeNode::findOne(9)->isChildOf(AttributeModeNode::findOne(12))); |
||
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
Loading history...
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
Loading history...
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 { }
Loading history...
|
|||
176 | $this->assertFalse(AttributeModeNode::findOne(9)->isChildOf(AttributeModeNode::findOne(10))); |
||
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
Loading history...
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
Loading history...
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 { }
Loading history...
|
|||
177 | $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
Loading history...
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 { }
Loading history...
|
|||
178 | $this->assertFalse(AttributeModeNode::findOne(9)->isChildOf(AttributeModeNode::findOne(16))); |
||
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
Loading history...
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
Loading history...
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 { }
Loading history...
|
|||
179 | |||
180 | $this->assertTrue(MultipleTreeNode::findOne(10)->isChildOf(MultipleTreeNode::findOne(1))); |
||
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
Loading history...
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
Loading history...
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 { }
Loading history...
|
|||
181 | $this->assertTrue(MultipleTreeNode::findOne(5)->isChildOf(MultipleTreeNode::findOne(2))); |
||
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
Loading history...
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
Loading history...
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 { }
Loading history...
|
|||
182 | $this->assertFalse(MultipleTreeNode::findOne(9)->isChildOf(MultipleTreeNode::findOne(12))); |
||
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
Loading history...
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
Loading history...
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 { }
Loading history...
|
|||
183 | $this->assertFalse(MultipleTreeNode::findOne(9)->isChildOf(MultipleTreeNode::findOne(10))); |
||
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
Loading history...
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
Loading history...
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 { }
Loading history...
|
|||
184 | $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
Loading history...
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 { }
Loading history...
|
|||
185 | $this->assertFalse(MultipleTreeNode::findOne(9)->isChildOf(MultipleTreeNode::findOne(16))); |
||
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
Loading history...
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
Loading history...
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 { }
Loading history...
|
|||
186 | } |
||
187 | |||
188 | 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.
Loading history...
|
|||
189 | { |
||
190 | $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
Loading history...
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 { }
Loading history...
|
|||
191 | $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
Loading history...
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 { }
Loading history...
|
|||
192 | |||
193 | $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
Loading history...
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 { }
Loading history...
|
|||
194 | $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
Loading history...
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 { }
Loading history...
|
|||
195 | |||
196 | $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
Loading history...
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 { }
Loading history...
|
|||
197 | $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
Loading history...
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 { }
Loading history...
|
|||
198 | } |
||
199 | |||
200 | public function testMakeRootInsert() |
||
201 | { |
||
202 | (new TestMigration())->up(); |
||
203 | $dataSet = new ArrayDataSet(require(__DIR__ . '/data/empty.php')); |
||
204 | $this->getDatabaseTester()->setDataSet($dataSet); |
||
205 | $this->getDatabaseTester()->onSetUp(); |
||
206 | |||
207 | $node = new Node(['slug' => 'r']); |
||
208 | $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 { }
Loading history...
|
|||
209 | |||
210 | $node = new AttributeModeNode(['slug' => 'r']); |
||
211 | $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 { }
Loading history...
|
|||
212 | |||
213 | $node = new MultipleTreeNode(['slug' => 'r']); |
||
214 | $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 { }
Loading history...
|
|||
215 | |||
216 | $node = new MultipleTreeNode([ |
||
217 | 'slug' => 'r', |
||
218 | 'tree' => 100, |
||
219 | ]); |
||
220 | $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 { }
Loading history...
|
|||
221 | |||
222 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
223 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-make-root-insert.php')); |
||
224 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
225 | } |
||
226 | |||
227 | public function testMakeRootUpdate() |
||
228 | { |
||
229 | $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
Loading history...
|
|||
230 | $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 { }
Loading history...
|
|||
231 | |||
232 | $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
Loading history...
|
|||
233 | $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 { }
Loading history...
|
|||
234 | |||
235 | $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
Loading history...
|
|||
236 | $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 { }
Loading history...
|
|||
237 | |||
238 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
239 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-make-root-update.php')); |
||
240 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
241 | } |
||
242 | |||
243 | 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.
Loading history...
|
|||
244 | { |
||
245 | $node = new Node(['slug' => 'new']); |
||
246 | $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
Loading history...
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 { }
Loading history...
|
|||
247 | |||
248 | $node = new AttributeModeNode(['slug' => 'new']); |
||
249 | $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
Loading history...
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 { }
Loading history...
|
|||
250 | |||
251 | $node = new MultipleTreeNode(['slug' => 'new']); |
||
252 | $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
Loading history...
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 { }
Loading history...
|
|||
253 | |||
254 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
255 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-prepend-to-insert-in-no-empty.php')); |
||
256 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
257 | } |
||
258 | |||
259 | 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.
Loading history...
|
|||
260 | { |
||
261 | $node = new Node(['slug' => 'new']); |
||
262 | $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
Loading history...
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 { }
Loading history...
|
|||
263 | |||
264 | $node = new AttributeModeNode(['slug' => 'new']); |
||
265 | $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
Loading history...
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 { }
Loading history...
|
|||
266 | |||
267 | $node = new MultipleTreeNode(['slug' => 'new']); |
||
268 | $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
Loading history...
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 { }
Loading history...
|
|||
269 | |||
270 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
271 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-prepend-to-insert-in-empty.php')); |
||
272 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
273 | } |
||
274 | |||
275 | 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.
Loading history...
|
|||
276 | { |
||
277 | $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
Loading history...
|
|||
278 | $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
Loading history...
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 { }
Loading history...
|
|||
279 | |||
280 | $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
Loading history...
|
|||
281 | $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
Loading history...
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 { }
Loading history...
|
|||
282 | |||
283 | $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
Loading history...
|
|||
284 | $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
Loading history...
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 { }
Loading history...
|
|||
285 | |||
286 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
287 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-prepend-to-update-same-node.php')); |
||
288 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
289 | } |
||
290 | |||
291 | 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.
Loading history...
|
|||
292 | { |
||
293 | $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
Loading history...
|
|||
294 | $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
Loading history...
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 { }
Loading history...
|
|||
295 | |||
296 | $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
Loading history...
|
|||
297 | $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
Loading history...
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 { }
Loading history...
|
|||
298 | |||
299 | $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
Loading history...
|
|||
300 | $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
Loading history...
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 { }
Loading history...
|
|||
301 | |||
302 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
303 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-prepend-to-update-deep.php')); |
||
304 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
305 | } |
||
306 | |||
307 | 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.
Loading history...
|
|||
308 | { |
||
309 | $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
Loading history...
|
|||
310 | $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
Loading history...
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 { }
Loading history...
|
|||
311 | |||
312 | $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
Loading history...
|
|||
313 | $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
Loading history...
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 { }
Loading history...
|
|||
314 | |||
315 | $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
Loading history...
|
|||
316 | $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
Loading history...
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 { }
Loading history...
|
|||
317 | |||
318 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
319 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-prepend-to-update-out.php')); |
||
320 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
321 | } |
||
322 | |||
323 | 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.
Loading history...
|
|||
324 | { |
||
325 | $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
Loading history...
|
|||
326 | $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
Loading history...
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 { }
Loading history...
|
|||
327 | |||
328 | $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
Loading history...
|
|||
329 | $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
Loading history...
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 { }
Loading history...
|
|||
330 | |||
331 | $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
Loading history...
|
|||
332 | $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
Loading history...
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 { }
Loading history...
|
|||
333 | |||
334 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
335 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-prepend-to-update-another-tree.php')); |
||
336 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
337 | } |
||
338 | |||
339 | 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.
Loading history...
|
|||
340 | { |
||
341 | $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
Loading history...
|
|||
342 | $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
Loading history...
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 { }
Loading history...
|
|||
343 | |||
344 | $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
Loading history...
|
|||
345 | $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
Loading history...
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 { }
Loading history...
|
|||
346 | |||
347 | $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
Loading history...
|
|||
348 | $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
Loading history...
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 { }
Loading history...
|
|||
349 | |||
350 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
351 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/data.php')); |
||
352 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
353 | } |
||
354 | |||
355 | /** |
||
356 | * @expectedException \yii\base\Exception |
||
357 | */ |
||
358 | public function testPrependToInsertExceptionIsRaisedWhenTargetIsNewRecord() |
||
359 | { |
||
360 | $node = new Node(['slug' => 'new']); |
||
361 | $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 { }
Loading history...
|
|||
362 | } |
||
363 | |||
364 | /** |
||
365 | * @expectedException \yii\base\Exception |
||
366 | */ |
||
367 | public function testPrependToUpdateExceptionIsRaisedWhenTargetIsNewRecord() |
||
368 | { |
||
369 | $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
Loading history...
|
|||
370 | $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 { }
Loading history...
|
|||
371 | } |
||
372 | |||
373 | /** |
||
374 | * @expectedException \yii\base\Exception |
||
375 | */ |
||
376 | public function testPrependToUpdateExceptionIsRaisedWhenTargetIsSame() |
||
377 | { |
||
378 | $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
Loading history...
|
|||
379 | $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
Loading history...
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 { }
Loading history...
|
|||
380 | } |
||
381 | |||
382 | /** |
||
383 | * @expectedException \yii\base\Exception |
||
384 | */ |
||
385 | public function testPrependToUpdateExceptionIsRaisedWhenTargetIsChild() |
||
386 | { |
||
387 | $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
Loading history...
|
|||
388 | $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
Loading history...
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 { }
Loading history...
|
|||
389 | } |
||
390 | |||
391 | 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.
Loading history...
|
|||
392 | { |
||
393 | $node = new Node(['slug' => 'new']); |
||
394 | $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
Loading history...
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 { }
Loading history...
|
|||
395 | |||
396 | $node = new AttributeModeNode(['slug' => 'new']); |
||
397 | $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
Loading history...
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 { }
Loading history...
|
|||
398 | |||
399 | $node = new MultipleTreeNode(['slug' => 'new']); |
||
400 | $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
Loading history...
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 { }
Loading history...
|
|||
401 | |||
402 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
403 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-append-to-insert-in-no-empty.php')); |
||
404 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
405 | } |
||
406 | |||
407 | 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.
Loading history...
|
|||
408 | { |
||
409 | $node = new Node(['slug' => 'new']); |
||
410 | $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
Loading history...
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 { }
Loading history...
|
|||
411 | |||
412 | $node = new AttributeModeNode(['slug' => 'new']); |
||
413 | $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
Loading history...
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 { }
Loading history...
|
|||
414 | |||
415 | $node = new MultipleTreeNode(['slug' => 'new']); |
||
416 | $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
Loading history...
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 { }
Loading history...
|
|||
417 | |||
418 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
419 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-append-to-insert-in-empty.php')); |
||
420 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
421 | } |
||
422 | |||
423 | 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.
Loading history...
|
|||
424 | { |
||
425 | $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
Loading history...
|
|||
426 | $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
Loading history...
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 { }
Loading history...
|
|||
427 | |||
428 | $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
Loading history...
|
|||
429 | $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
Loading history...
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 { }
Loading history...
|
|||
430 | |||
431 | $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
Loading history...
|
|||
432 | $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
Loading history...
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 { }
Loading history...
|
|||
433 | |||
434 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
435 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-append-to-update-same-node.php')); |
||
436 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
437 | } |
||
438 | |||
439 | 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.
Loading history...
|
|||
440 | { |
||
441 | $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
Loading history...
|
|||
442 | $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
Loading history...
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 { }
Loading history...
|
|||
443 | |||
444 | $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
Loading history...
|
|||
445 | $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
Loading history...
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 { }
Loading history...
|
|||
446 | |||
447 | $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
Loading history...
|
|||
448 | $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
Loading history...
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 { }
Loading history...
|
|||
449 | |||
450 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
451 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-append-to-update-deep.php')); |
||
452 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
453 | } |
||
454 | |||
455 | 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.
Loading history...
|
|||
456 | { |
||
457 | $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
Loading history...
|
|||
458 | $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
Loading history...
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 { }
Loading history...
|
|||
459 | |||
460 | $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
Loading history...
|
|||
461 | $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
Loading history...
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 { }
Loading history...
|
|||
462 | |||
463 | $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
Loading history...
|
|||
464 | $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
Loading history...
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 { }
Loading history...
|
|||
465 | |||
466 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
467 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-append-to-update-out.php')); |
||
468 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
469 | } |
||
470 | |||
471 | 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.
Loading history...
|
|||
472 | { |
||
473 | $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
Loading history...
|
|||
474 | $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
Loading history...
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 { }
Loading history...
|
|||
475 | |||
476 | $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
Loading history...
|
|||
477 | $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
Loading history...
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 { }
Loading history...
|
|||
478 | |||
479 | $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
Loading history...
|
|||
480 | $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
Loading history...
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 { }
Loading history...
|
|||
481 | |||
482 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
483 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-append-to-update-another-tree.php')); |
||
484 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
485 | } |
||
486 | |||
487 | 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.
Loading history...
|
|||
488 | { |
||
489 | $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
Loading history...
|
|||
490 | $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
Loading history...
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 { }
Loading history...
|
|||
491 | |||
492 | $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
Loading history...
|
|||
493 | $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
Loading history...
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 { }
Loading history...
|
|||
494 | |||
495 | $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
Loading history...
|
|||
496 | $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
Loading history...
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 { }
Loading history...
|
|||
497 | |||
498 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
499 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/data.php')); |
||
500 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
501 | } |
||
502 | |||
503 | /** |
||
504 | * @expectedException \yii\base\Exception |
||
505 | */ |
||
506 | public function testAppendToInsertExceptionIsRaisedWhenTargetIsNewRecord() |
||
507 | { |
||
508 | $node = new Node(['slug' => 'new']); |
||
509 | $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 { }
Loading history...
|
|||
510 | } |
||
511 | |||
512 | /** |
||
513 | * @expectedException \yii\base\Exception |
||
514 | */ |
||
515 | public function testAppendToUpdateExceptionIsRaisedWhenTargetIsNewRecord() |
||
516 | { |
||
517 | $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
Loading history...
|
|||
518 | $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 { }
Loading history...
|
|||
519 | } |
||
520 | |||
521 | /** |
||
522 | * @expectedException \yii\base\Exception |
||
523 | */ |
||
524 | public function testAppendToUpdateExceptionIsRaisedWhenTargetIsSame() |
||
525 | { |
||
526 | $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
Loading history...
|
|||
527 | $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
Loading history...
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 { }
Loading history...
|
|||
528 | } |
||
529 | |||
530 | /** |
||
531 | * @expectedException \yii\base\Exception |
||
532 | */ |
||
533 | public function testAppendToUpdateExceptionIsRaisedWhenTargetIsChild() |
||
534 | { |
||
535 | $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
Loading history...
|
|||
536 | $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
Loading history...
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 { }
Loading history...
|
|||
537 | } |
||
538 | |||
539 | 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.
Loading history...
|
|||
540 | { |
||
541 | $node = new Node(['slug' => 'new']); |
||
542 | $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
Loading history...
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 { }
Loading history...
|
|||
543 | |||
544 | $node = new AttributeModeNode(['slug' => 'new']); |
||
545 | $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
Loading history...
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 { }
Loading history...
|
|||
546 | |||
547 | $node = new MultipleTreeNode(['slug' => 'new']); |
||
548 | $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
Loading history...
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 { }
Loading history...
|
|||
549 | |||
550 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
551 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-insert-before-insert-no-gap.php')); |
||
552 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
553 | } |
||
554 | |||
555 | 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.
Loading history...
|
|||
556 | { |
||
557 | $node = new Node(['slug' => 'new']); |
||
558 | $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
Loading history...
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 { }
Loading history...
|
|||
559 | |||
560 | $node = new AttributeModeNode(['slug' => 'new']); |
||
561 | $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
Loading history...
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 { }
Loading history...
|
|||
562 | |||
563 | $node = new MultipleTreeNode(['slug' => 'new']); |
||
564 | $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
Loading history...
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 { }
Loading history...
|
|||
565 | |||
566 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
567 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-insert-before-insert-gap.php')); |
||
568 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
569 | } |
||
570 | |||
571 | 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.
Loading history...
|
|||
572 | { |
||
573 | $node = new Node(['slug' => 'new']); |
||
574 | $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
Loading history...
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 { }
Loading history...
|
|||
575 | |||
576 | $node = new AttributeModeNode(['slug' => 'new']); |
||
577 | $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
Loading history...
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 { }
Loading history...
|
|||
578 | |||
579 | $node = new MultipleTreeNode(['slug' => 'new']); |
||
580 | $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
Loading history...
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 { }
Loading history...
|
|||
581 | |||
582 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
583 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-insert-before-insert-begin.php')); |
||
584 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
585 | } |
||
586 | |||
587 | |||
588 | 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.
Loading history...
|
|||
589 | { |
||
590 | $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
Loading history...
|
|||
591 | $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
Loading history...
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 { }
Loading history...
|
|||
592 | |||
593 | $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
Loading history...
|
|||
594 | $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
Loading history...
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 { }
Loading history...
|
|||
595 | |||
596 | $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
Loading history...
|
|||
597 | $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
Loading history...
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 { }
Loading history...
|
|||
598 | |||
599 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
600 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-insert-before-update-same-node.php')); |
||
601 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
602 | } |
||
603 | |||
604 | 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.
Loading history...
|
|||
605 | { |
||
606 | $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
Loading history...
|
|||
607 | $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
Loading history...
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 { }
Loading history...
|
|||
608 | |||
609 | $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
Loading history...
|
|||
610 | $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
Loading history...
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 { }
Loading history...
|
|||
611 | |||
612 | $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
Loading history...
|
|||
613 | $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
Loading history...
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 { }
Loading history...
|
|||
614 | |||
615 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
616 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/data.php')); |
||
617 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
618 | } |
||
619 | |||
620 | 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.
Loading history...
|
|||
621 | { |
||
622 | $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
Loading history...
|
|||
623 | $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
Loading history...
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 { }
Loading history...
|
|||
624 | |||
625 | $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
Loading history...
|
|||
626 | $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
Loading history...
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 { }
Loading history...
|
|||
627 | |||
628 | $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
Loading history...
|
|||
629 | $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
Loading history...
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 { }
Loading history...
|
|||
630 | |||
631 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
632 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-insert-before-update-another-tree.php')); |
||
633 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
634 | } |
||
635 | |||
636 | /** |
||
637 | * @expectedException \yii\base\Exception |
||
638 | */ |
||
639 | public function testInsertBeforeInsertExceptionIsRaisedWhenTargetIsNewRecord() |
||
640 | { |
||
641 | $node = new Node(['slug' => 'new']); |
||
642 | $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 { }
Loading history...
|
|||
643 | } |
||
644 | |||
645 | /** |
||
646 | * @expectedException \yii\base\Exception |
||
647 | */ |
||
648 | public function testInsertBeforeInsertExceptionIsRaisedWhenTargetIsRoot() |
||
649 | { |
||
650 | $node = new Node(['name' => 'new']); |
||
651 | $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
Loading history...
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 { }
Loading history...
|
|||
652 | } |
||
653 | |||
654 | /** |
||
655 | * @expectedException \yii\base\Exception |
||
656 | */ |
||
657 | public function testInsertBeforeUpdateExceptionIsRaisedWhenTargetIsSame() |
||
658 | { |
||
659 | $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
Loading history...
|
|||
660 | $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
Loading history...
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 { }
Loading history...
|
|||
661 | } |
||
662 | |||
663 | /** |
||
664 | * @expectedException \yii\base\Exception |
||
665 | */ |
||
666 | public function testInsertBeforeUpdateExceptionIsRaisedWhenTargetIsChild() |
||
667 | { |
||
668 | $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
Loading history...
|
|||
669 | $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
Loading history...
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 { }
Loading history...
|
|||
670 | } |
||
671 | |||
672 | 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.
Loading history...
|
|||
673 | { |
||
674 | $node = new Node(['slug' => 'new']); |
||
675 | $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
Loading history...
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 { }
Loading history...
|
|||
676 | |||
677 | $node = new AttributeModeNode(['slug' => 'new']); |
||
678 | $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
Loading history...
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 { }
Loading history...
|
|||
679 | |||
680 | $node = new MultipleTreeNode(['slug' => 'new']); |
||
681 | $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
Loading history...
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 { }
Loading history...
|
|||
682 | |||
683 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
684 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-insert-after-insert-no-gap.php')); |
||
685 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
686 | } |
||
687 | |||
688 | 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.
Loading history...
|
|||
689 | { |
||
690 | $node = new Node(['slug' => 'new']); |
||
691 | $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
Loading history...
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 { }
Loading history...
|
|||
692 | |||
693 | $node = new AttributeModeNode(['slug' => 'new']); |
||
694 | $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
Loading history...
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 { }
Loading history...
|
|||
695 | |||
696 | $node = new MultipleTreeNode(['slug' => 'new']); |
||
697 | $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
Loading history...
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 { }
Loading history...
|
|||
698 | |||
699 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
700 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-insert-after-insert-gap.php')); |
||
701 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
702 | } |
||
703 | |||
704 | 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.
Loading history...
|
|||
705 | { |
||
706 | $node = new Node(['slug' => 'new']); |
||
707 | $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
Loading history...
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 { }
Loading history...
|
|||
708 | |||
709 | $node = new AttributeModeNode(['slug' => 'new']); |
||
710 | $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
Loading history...
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 { }
Loading history...
|
|||
711 | |||
712 | $node = new MultipleTreeNode(['slug' => 'new']); |
||
713 | $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
Loading history...
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 { }
Loading history...
|
|||
714 | |||
715 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
716 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-insert-after-insert-end.php')); |
||
717 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
718 | } |
||
719 | |||
720 | 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.
Loading history...
|
|||
721 | { |
||
722 | $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
Loading history...
|
|||
723 | $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
Loading history...
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 { }
Loading history...
|
|||
724 | |||
725 | $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
Loading history...
|
|||
726 | $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
Loading history...
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 { }
Loading history...
|
|||
727 | |||
728 | $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
Loading history...
|
|||
729 | $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
Loading history...
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 { }
Loading history...
|
|||
730 | |||
731 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
732 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-insert-after-update-same-node.php')); |
||
733 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
734 | } |
||
735 | |||
736 | 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.
Loading history...
|
|||
737 | { |
||
738 | $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
Loading history...
|
|||
739 | $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
Loading history...
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 { }
Loading history...
|
|||
740 | |||
741 | $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
Loading history...
|
|||
742 | $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
Loading history...
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 { }
Loading history...
|
|||
743 | |||
744 | $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
Loading history...
|
|||
745 | $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
Loading history...
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 { }
Loading history...
|
|||
746 | |||
747 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
748 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/data.php')); |
||
749 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
750 | } |
||
751 | |||
752 | 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.
Loading history...
|
|||
753 | { |
||
754 | $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
Loading history...
|
|||
755 | $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
Loading history...
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 { }
Loading history...
|
|||
756 | |||
757 | $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
Loading history...
|
|||
758 | $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
Loading history...
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 { }
Loading history...
|
|||
759 | |||
760 | $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
Loading history...
|
|||
761 | $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
Loading history...
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 { }
Loading history...
|
|||
762 | |||
763 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
764 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-insert-after-update-another-tree.php')); |
||
765 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
766 | } |
||
767 | |||
768 | /** |
||
769 | * @expectedException \yii\base\Exception |
||
770 | */ |
||
771 | public function testInsertAfterInsertExceptionIsRaisedWhenTargetIsNewRecord() |
||
772 | { |
||
773 | $node = new Node(['slug' => 'new']); |
||
774 | $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 { }
Loading history...
|
|||
775 | } |
||
776 | |||
777 | /** |
||
778 | * @expectedException \yii\base\Exception |
||
779 | */ |
||
780 | public function testInsertAfterInsertExceptionIsRaisedWhenTargetIsRoot() |
||
781 | { |
||
782 | $node = new Node(['slug' => 'new']); |
||
783 | $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
Loading history...
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 { }
Loading history...
|
|||
784 | } |
||
785 | |||
786 | /** |
||
787 | * @expectedException \yii\base\Exception |
||
788 | */ |
||
789 | public function testInsertAfterUpdateExceptionIsRaisedWhenTargetIsSame() |
||
790 | { |
||
791 | $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
Loading history...
|
|||
792 | $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
Loading history...
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 { }
Loading history...
|
|||
793 | } |
||
794 | |||
795 | /** |
||
796 | * @expectedException \yii\base\Exception |
||
797 | */ |
||
798 | public function testInsertAfterUpdateExceptionIsRaisedWhenTargetIsChild() |
||
799 | { |
||
800 | $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
Loading history...
|
|||
801 | $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
Loading history...
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 { }
Loading history...
|
|||
802 | } |
||
803 | |||
804 | 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.
Loading history...
|
|||
805 | { |
||
806 | $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
Loading history...
|
|||
807 | |||
808 | $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
Loading history...
|
|||
809 | |||
810 | $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
Loading history...
|
|||
811 | |||
812 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
813 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-delete.php')); |
||
814 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
815 | } |
||
816 | |||
817 | /** |
||
818 | * @expectedException \yii\base\Exception |
||
819 | */ |
||
820 | public function testDeleteRoot() |
||
821 | { |
||
822 | 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
Loading history...
|
|||
823 | } |
||
824 | |||
825 | /** |
||
826 | * @expectedException \yii\base\Exception |
||
827 | */ |
||
828 | public function testDeleteExceptionIsRaisedWhenNodeIsNewRecord() |
||
829 | { |
||
830 | $node = new Node(['slug' => 'new']); |
||
831 | $node->delete(); |
||
832 | } |
||
833 | |||
834 | 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.
Loading history...
|
|||
835 | { |
||
836 | $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
Loading history...
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 { }
Loading history...
|
|||
837 | |||
838 | $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
Loading history...
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 { }
Loading history...
|
|||
839 | |||
840 | $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
Loading history...
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 { }
Loading history...
|
|||
841 | |||
842 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
843 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-delete-with-children.php')); |
||
844 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
845 | } |
||
846 | |||
847 | 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.
Loading history...
|
|||
848 | { |
||
849 | $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
Loading history...
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 { }
Loading history...
|
|||
850 | |||
851 | $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
Loading history...
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 { }
Loading history...
|
|||
852 | |||
853 | $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
Loading history...
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 { }
Loading history...
|
|||
854 | |||
855 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
856 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-delete-with-children-root.php')); |
||
857 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
858 | } |
||
859 | |||
860 | /** |
||
861 | * @expectedException \yii\base\Exception |
||
862 | */ |
||
863 | public function testDeleteWithChildrenExceptionIsRaisedWhenNodeIsNewRecord() |
||
864 | { |
||
865 | $node = new Node(['slug' => 'new']); |
||
866 | $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 { }
Loading history...
|
|||
867 | } |
||
868 | |||
869 | public function testReorderChildren() |
||
870 | { |
||
871 | $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
Loading history...
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 { }
Loading history...
|
|||
872 | |||
873 | $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
Loading history...
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 { }
Loading history...
|
|||
874 | |||
875 | $dataSet = $this->getConnection()->createDataSet(['tree', 'attribute_mode_tree', 'multiple_tree']); |
||
876 | $expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-reorder-children.php')); |
||
877 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
||
878 | } |
||
879 | |||
880 | /** |
||
881 | * @expectedException \yii\base\NotSupportedException |
||
882 | */ |
||
883 | public function testExceptionIsRaisedWhenInsertIsCalled() |
||
884 | { |
||
885 | $node = new Node(['slug' => 'new']); |
||
886 | $node->insert(); |
||
887 | } |
||
888 | |||
889 | public function testUpdate() |
||
890 | { |
||
891 | $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
Loading history...
|
|||
892 | $node->slug = 'update'; |
||
893 | $this->assertEquals(1, $node->update()); |
||
894 | } |
||
895 | |||
896 | } |
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.