Browse Source

Additional ApiGen error fixes

Bryan Crowe 12 years ago
parent
commit
cfca6b1829

+ 1 - 0
src/Network/Http/Client.php

@@ -296,6 +296,7 @@ class Client {
  *
  * @param string $method HTTP method.
  * @param string $url URL to request.
+ * @return Cake\Network\Http\Response
  */
 	protected function _doRequest($method, $url, $data, $options) {
 		$request = $this->_createRequest(

+ 76 - 0
src/Network/Http/Message.php

@@ -21,19 +21,95 @@ namespace Cake\Network\Http;
  */
 class Message {
 
+/**
+ * HTTP 200 code
+ *
+ * @var integer
+ */
 	const STATUS_OK = 200;
+
+/**
+ * HTTP 201 code
+ *
+ * @var integer
+ */
 	const STATUS_CREATED = 201;
+
+/**
+ * HTTP 202 code
+ *
+ * @var integer
+ */
 	const STATUS_ACCEPTED = 202;
+
+/**
+ * HTTP 301 code
+ *
+ * @var integer
+ */
 	const STATUS_MOVED_PERMANENTLY = 301;
+
+/**
+ * HTTP 302 code
+ *
+ * @var integer
+ */
 	const STATUS_FOUND = 302;
+
+/**
+ * HTTP 303 code
+ *
+ * @var integer
+ */
 	const STATUS_SEE_OTHER = 303;
+
+/**
+ * HTTP 307 code
+ *
+ * @var integer
+ */
 	const STATUS_TEMPORARY_REDIRECT = 307;
 
+/**
+ * HTTP GET method
+ *
+ * @var string
+ */
 	const METHOD_GET = 'GET';
+
+/**
+ * HTTP POST method
+ *
+ * @var string
+ */
 	const METHOD_POST = 'POST';
+
+/**
+ * HTTP PUT method
+ *
+ * @var string
+ */
 	const METHOD_PUT = 'PUT';
+
+/**
+ * HTTP DELETE method
+ *
+ * @var string
+ */
 	const METHOD_DELETE = 'DELETE';
+
+/**
+ * HTTP PATCH method
+ *
+ * @var string
+ */
 	const METHOD_PATCH = 'PATCH';
+
+/**
+ * HTTP HEAD method
+ *
+ * @var string
+ */
 	const METHOD_HEAD = 'HEAD';
 
 /**

+ 1 - 0
src/ORM/Marshaller.php

@@ -46,6 +46,7 @@ class Marshaller {
  * Constructor.
  *
  * @param Cake\ORM\Table $table
+ * @param boolean Whether or not this masrhaller in safe mode
  */
 	public function __construct(Table $table, $safe = false) {
 		$this->_table = $table;

+ 3 - 1
src/ORM/Query.php

@@ -144,6 +144,8 @@ class Query extends DatabaseQuery {
 	protected $_cache;
 
 /**
+ * Constuctor
+ *
  * @param Cake\Database\Connection $connection
  * @param Cake\ORM\Table $table
  */
@@ -908,7 +910,7 @@ class Query extends DatabaseQuery {
 /**
  * Decorates the ResultSet iterator with MapReduce routines
  *
- * @param $results Cake\ORM\ResultCollectionTrait original results
+ * @param $result Cake\ORM\ResultCollectionTrait original results
  * @return Cake\ORM\ResultCollectionTrait
  */
 	protected function _decorateResults($result) {

+ 0 - 1
src/ORM/ResultSet.php

@@ -231,7 +231,6 @@ class ResultSet implements Countable, Iterator, Serializable, JsonSerializable {
  * Part of Serializable interface.
  *
  * @param string Serialized object
- * @return ResultSet The hydrated result set.
  */
 	public function unserialize($serialized) {
 		$this->_results = unserialize($serialized);

+ 1 - 2
src/ORM/ResultSetDecorator.php

@@ -39,7 +39,7 @@ class ResultSetDecorator extends Collection implements Countable, Serializable,
  * will convert the underlying traversable object into an array and
  * get the count of the underlying data.
  *
- * @return integer.
+ * @return integer
  */
 	public function count() {
 		return count(iterator_to_array($this));
@@ -62,7 +62,6 @@ class ResultSetDecorator extends Collection implements Countable, Serializable,
  * Part of Serializable interface.
  *
  * @param string Serialized object
- * @return ResultSet The hydrated result set.
  */
 	public function unserialize($serialized) {
 		parent::__construct(unserialize($serialized));

+ 4 - 2
src/ORM/Table.php

@@ -1470,7 +1470,7 @@ class Table implements EventListener {
  *
  * @param string $method The method name that was fired.
  * @param array $args List of arguments passed to the function.
- * @return mixed.
+ * @return mixed
  * @throws Cake\Error\Exception when there are missing arguments, or when
  *  and & or are combined.
  */
@@ -1559,7 +1559,7 @@ class Table implements EventListener {
  *
  * @param boolean $safe Whether or not this marshaller
  *   should be in safe mode.
- * @return Cake\ORM\Marhsaller;
+ * @return Cake\ORM\Marhsaller
  * @see Cake\ORM\Marshaller
  */
 	public function marshaller($safe = false) {
@@ -1606,6 +1606,7 @@ class Table implements EventListener {
  * @param array $data The data to build an entity with.
  * @param array $associations A whitelist of associations
  *   to hydrate. Defaults to all associations
+ * @return Cake\ORM\Entity
  */
 	public function newEntity(array $data, $associations = null) {
 		if ($associations === null) {
@@ -1640,6 +1641,7 @@ class Table implements EventListener {
  * @param array $data The data to build an entity with.
  * @param array $associations A whitelist of associations
  *   to hydrate. Defaults to all associations
+ * @return array An array of hydrated records.
  */
 	public function newEntities(array $data, $associations = null) {
 		if ($associations === null) {

+ 0 - 2
src/Routing/DispatcherFilter.php

@@ -82,7 +82,6 @@ abstract class DispatcherFilter implements EventListener {
  *
  * @param Cake\Event\Event $event container object having the `request`, `response` and `additionalParams`
  *    keys in the data property.
- * @return Cake\Network\Response|boolean
  */
 	public function beforeDispatch(Event $event) {
 	}
@@ -97,7 +96,6 @@ abstract class DispatcherFilter implements EventListener {
  *
  * @param Cake\Event\Event $event container object having the `request` and  `response`
  *    keys in the data property.
- * @return mixed boolean to stop the event dispatching or null to continue
  */
 	public function afterDispatch(Event $event) {
 	}

+ 1 - 1
src/Routing/Route/Route.php

@@ -218,7 +218,7 @@ class Route {
  * for a route. This will compile a route if it has not
  * already been compiled.
  *
- * @return string.
+ * @return string
  */
 	public function getName() {
 		if (!empty($this->_name)) {

+ 34 - 3
src/Routing/Router.php

@@ -77,14 +77,45 @@ class Router {
 	protected static $_validExtensions = array();
 
 /**
- * 'Constant' regular expression definitions for named route elements
- *
- */
+  * Regular expression for action names
+  *
+  * @var string
+  */
 	const ACTION = 'index|show|add|create|edit|update|remove|del|delete|view|item';
+
+/**
+  * Regular expression for years
+  *
+  * @var string
+  */
 	const YEAR = '[12][0-9]{3}';
+
+/**
+  * Regular expression for months
+  *
+  * @var string
+  */
 	const MONTH = '0[1-9]|1[012]';
+
+/**
+  * Regular expression for days
+  *
+  * @var string
+  */
 	const DAY = '0[1-9]|[12][0-9]|3[01]';
+
+/**
+  * Regular expression for auto increment IDs
+  *
+  * @var string
+  */
 	const ID = '[0-9]+';
+
+/**
+  * Regular expression for UUIds
+  *
+  * @var string
+  */
 	const UUID = '[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}';
 
 /**

+ 0 - 2
src/TestSuite/TestCase.php

@@ -192,8 +192,6 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
 /**
  * Chooses which fixtures to load for a given test
  *
- * @param string $fixture Each parameter is a model name that corresponds to a
- *                        fixture, i.e. 'Post', 'Author', etc.
  * @return void
  * @see Cake\TestSuite\TestCase::$autoFixtures
  * @throws \Exception when no fixture manager is available.

+ 3 - 3
src/Utility/Folder.php

@@ -25,7 +25,7 @@ class Folder {
  * Default scheme for Folder::copy
  * Recursively merges subfolders with the same name
  *
- * @constant MERGE
+ * @var string
  */
 	const MERGE = 'merge';
 
@@ -33,7 +33,7 @@ class Folder {
  * Overwrite scheme for Folder::copy
  * subfolders with the same name will be replaced
  *
- * @constant OVERWRITE
+ * @var string
  */
 	const OVERWRITE = 'overwrite';
 
@@ -41,7 +41,7 @@ class Folder {
  * Skip scheme for Folder::copy
  * if a subfolder with the same name exists it will be skipped
  *
- * @constant SKIP
+ * @var string
  */
 	const SKIP = 'skip';
 

+ 2 - 0
src/View/Helper/TimeHelper.php

@@ -291,6 +291,8 @@ class TimeHelper extends Helper {
 	}
 
 /**
+ * Formats date for RSS feeds
+ *
  * @see Cake\Utility\Time::toRSS()
  *
  * @param integer|string|DateTime $dateString UNIX timestamp, strtotime() valid string or DateTime object

+ 6 - 0
src/View/View.php

@@ -294,16 +294,22 @@ class View extends Object {
 
 /**
  * Constant for view file type 'view'
+ *
+ * @var string
  */
 	const TYPE_VIEW = 'view';
 
 /**
  * Constant for view file type 'element'
+ *
+ * @var string
  */
 	const TYPE_ELEMENT = 'element';
 
 /**
  * Constant for view file type 'layout'
+ *
+ * @var string
  */
 	const TYPE_LAYOUT = 'layout';
 

+ 2 - 2
src/View/ViewBlock.php

@@ -30,14 +30,14 @@ class ViewBlock {
 /**
  * Append content
  *
- * @constant APPEND
+ * @var string
  */
 	const APPEND = 'append';
 
 /**
  * Prepend content
  *
- * @constant PREPEND
+ * @var string
  */
 	const PREPEND = 'prepend';