Skip to content

Instantly share code, notes, and snippets.

@stephenreay
Created February 24, 2012 04:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephenreay/1897888 to your computer and use it in GitHub Desktop.
Save stephenreay/1897888 to your computer and use it in GitHub Desktop.
Autocode bug
<?php
/* Based on the method below, Autocode produces the wrong docblock. The expected docblock is shown further below */
class Bad {
/**
* Summary
* @param Object array Description
* @param Object array Description
* @return Object Description
*/
public function __construct(array &$project, array &$lineItems) {
$this->project = $project;
$this->loadLineItems();
}
}
class Good {
/**
* Summary
* @param array $project Description
* @param array $lineItems Description
* @return Object Description
*/
public function __construct(array &$project, array &$lineItems) {
$this->project = $project;
$this->loadLineItems();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment