1.2.317. Create Magic Property¶
This command creates a link DEFINITION between a
__getand__setcalls, and its equivalent magic method.
It also adds links between __invoke and __toString in adapted situations.
This command may not detect all possible link for the __get and __set call. It may be missing information about the nature of the object.
<?php
class x {
function foo() {
// This is linked to __set
$this->a = 1;
// This is linked to __get
return $this->b;
}
function __get($name) {
return 1;
}
function __set($name, $value) {
// Store the value
}
}
?>
1.2.317.1. Connex PHP features¶
1.2.317.1.1. Specs¶
Short name |
Complete/CreateMagicProperty |
Rulesets |
|
Exakat since |
1.9.2 |
PHP Version |
All |
Severity |
|
Time To Fix |
|
Precision |
High |
Available in |