unfulvio /
wp-php-console
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | class AdminTestCest { |
||
| 4 | |||
| 5 | |||
| 6 | public function TestPluginActivationDeactivation( AcceptanceTester $I ) { |
||
| 7 | |||
| 8 | $I->wantTo( 'See if WP PHP Console is listed in the Plugins page.' ); |
||
| 9 | |||
| 10 | $I->loginAsAdmin(); |
||
|
0 ignored issues
–
show
|
|||
| 11 | $I->amOnPluginsPage(); |
||
|
0 ignored issues
–
show
The method
amOnPluginsPage does not exist on object<AcceptanceTester>? Since you implemented __call, maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('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...
|
|||
| 12 | |||
| 13 | $I->seePluginInstalled( 'wp-php-console' ); |
||
|
0 ignored issues
–
show
The method
seePluginInstalled does not exist on object<AcceptanceTester>? Since you implemented __call, maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('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...
|
|||
| 14 | |||
| 15 | $I->wantTo( 'Deactivate and reactivate WP PHP Console.' ); |
||
| 16 | |||
| 17 | $I->deactivatePlugin( 'wp-php-console' ); |
||
|
0 ignored issues
–
show
The method
deactivatePlugin does not exist on object<AcceptanceTester>? Since you implemented __call, maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('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...
|
|||
| 18 | $I->seePluginDeactivated( 'wp-php-console' ); |
||
| 19 | $I->activatePlugin( 'wp-php-console' ); |
||
| 20 | $I->seePluginActivated( 'wp-php-console' ); |
||
|
0 ignored issues
–
show
The method
seePluginActivated does not exist on object<AcceptanceTester>? Since you implemented __call, maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('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...
|
|||
| 21 | } |
||
| 22 | |||
| 23 | |||
| 24 | } |
||
| 25 |
If you implement
__calland you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__callis implemented by a parent class and only the child class knows which methods exist: