| @@ 82-93 (lines=12) @@ | ||
| 79 | return $this->properties; |
|
| 80 | } |
|
| 81 | ||
| 82 | public function addProperty($name, $visibility = 'public') |
|
| 83 | { |
|
| 84 | $visibility = strtolower($visibility); |
|
| 85 | ||
| 86 | if (!in_array($visibility, array('public', 'private', 'protected'))) { |
|
| 87 | throw new InvalidArgumentException(sprintf( |
|
| 88 | '`%s` property visibility is not supported.', $visibility |
|
| 89 | )); |
|
| 90 | } |
|
| 91 | ||
| 92 | $this->properties[$name] = $visibility; |
|
| 93 | } |
|
| 94 | ||
| 95 | /** |
|
| 96 | * @return MethodNode[] |
|
| @@ 54-65 (lines=12) @@ | ||
| 51 | /** |
|
| 52 | * @param string $visibility |
|
| 53 | */ |
|
| 54 | public function setVisibility($visibility) |
|
| 55 | { |
|
| 56 | $visibility = strtolower($visibility); |
|
| 57 | ||
| 58 | if (!in_array($visibility, array('public', 'private', 'protected'))) { |
|
| 59 | throw new InvalidArgumentException(sprintf( |
|
| 60 | '`%s` method visibility is not supported.', $visibility |
|
| 61 | )); |
|
| 62 | } |
|
| 63 | ||
| 64 | $this->visibility = $visibility; |
|
| 65 | } |
|
| 66 | ||
| 67 | public function isStatic() |
|
| 68 | { |
|