Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'fix/#34-method-name-cannot-be-optional'
Browse files Browse the repository at this point in the history
Close #34
  • Loading branch information
Ocramius committed Jan 24, 2016
2 parents 6c9be80 + 12d1f17 commit da6920b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ All notable changes to this project will be documented in this file, in reverse

### Fixed

- Nothing.
- [#34](https://github.com/zendframework/zend-code/pull/34) method name cannot be optional when adding a method
to a class generator.

## 3.0.0 - 2016-01-13

Expand Down
8 changes: 7 additions & 1 deletion doc/book/generator/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,13 @@ class Zend\Code\Generator\ClassGenerator extends Zend\Code\Generator\AbstractGen
public function getProperties()
public function getProperty($propertyName)
public function addMethods(Array $methods)
public function addMethod($method)
public function addMethod(
$name,
Array $parameters = [],
$flags = Zend\Code\Generator\MethodGenerator::FLAG_PUBLIC,
$body = null,
$docBlock = null
)
public function getMethods()
public function getMethod($methodName)
public function hasMethod($methodName)
Expand Down
2 changes: 1 addition & 1 deletion src/Generator/ClassGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ public function addMethods(array $methods)
* @return ClassGenerator
*/
public function addMethod(
$name = null,
$name,
array $parameters = [],
$flags = MethodGenerator::FLAG_PUBLIC,
$body = null,
Expand Down

0 comments on commit da6920b

Please sign in to comment.