src/Factory/DataDriver.php 1 location
|
@@ 75-85 (lines=11) @@
|
72 |
|
* |
73 |
|
* @return ClassMethod |
74 |
|
*/ |
75 |
|
protected function createSetterMethod(array $setter): ClassMethod |
76 |
|
{ |
77 |
|
return $this->builder->method($setter['method']) |
78 |
|
->setDocComment('') |
79 |
|
->addParam($this->builder->param($setter['property'])) |
80 |
|
->addStmt( |
81 |
|
new Class_( |
82 |
|
sprintf(Constants::SETTER_FORMAT, $setter['property'], $setter['property']) |
83 |
|
) |
84 |
|
)->makePublic()->getNode(); |
85 |
|
} |
86 |
|
} |
87 |
|
|
src/Factory/PropertyReference.php 1 location
|
@@ 62-74 (lines=13) @@
|
59 |
|
* |
60 |
|
* @return ClassMethod |
61 |
|
*/ |
62 |
|
protected function createPropertyMethod(array $setter): ClassMethod |
63 |
|
{ |
64 |
|
$detectAccessLevel = $this->setAccessLevel(); |
65 |
|
|
66 |
|
return $this->builder->method($setter['method']) |
67 |
|
->setDocComment('') |
68 |
|
->addParam($this->builder->param($setter['property'])) |
69 |
|
->addStmt( |
70 |
|
new \PhpParser\Node\Stmt\Class_( |
71 |
|
sprintf(Constants::SETTER_FORMAT, $setter['property'], $setter['property']) |
72 |
|
) |
73 |
|
)->$detectAccessLevel()->getNode(); |
74 |
|
} |
75 |
|
} |
76 |
|
|