Browse files

Additional ApiGen error fixes

  • Loading branch information...
1 parent 8a6fdbc commit cfca6b1829cc305dd7563c431c3cf0c74c5defad @bcrowe bcrowe committed Jan 24, 2014
View
1 src/Network/Http/Client.php
@@ -296,6 +296,7 @@ public function head($url, $data = [], $options = []) {
*
* @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(
View
76 src/Network/Http/Message.php
@@ -21,19 +21,95 @@
*/
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';
/**
View
1 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;
View
4 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 @@ public function hydrate($enable = null) {
/**
* 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) {
View
1 src/ORM/ResultSet.php
@@ -231,7 +231,6 @@ public function serialize() {
* Part of Serializable interface.
*
* @param string Serialized object
- * @return ResultSet The hydrated result set.
*/
public function unserialize($serialized) {
$this->_results = unserialize($serialized);
View
3 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 @@ public function serialize() {
* Part of Serializable interface.
*
* @param string Serialized object
- * @return ResultSet The hydrated result set.
*/
public function unserialize($serialized) {
parent::__construct(unserialize($serialized));
View
6 src/ORM/Table.php
@@ -1470,7 +1470,7 @@ public function callFinder($type, Query $query, $options = []) {
*
* @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 @@ public function __call($method, $args) {
*
* @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 @@ public function entityValidator() {
* @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 @@ public function newEntity(array $data, $associations = null) {
* @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) {
View
2 src/Routing/DispatcherFilter.php
@@ -82,7 +82,6 @@ public function implementedEvents() {
*
* @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 @@ public function beforeDispatch(Event $event) {
*
* @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) {
}
View
2 src/Routing/Route/Route.php
@@ -218,7 +218,7 @@ protected function _writeRoute() {
* 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)) {
View
37 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}';
/**
View
2 src/TestSuite/TestCase.php
@@ -192,8 +192,6 @@ protected function assertPostConditions() {
/**
* 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.
View
6 src/Utility/Folder.php
@@ -25,23 +25,23 @@ class Folder {
* Default scheme for Folder::copy
* Recursively merges subfolders with the same name
*
- * @constant MERGE
+ * @var string
*/
const MERGE = 'merge';
/**
* Overwrite scheme for Folder::copy
* subfolders with the same name will be replaced
*
- * @constant OVERWRITE
+ * @var string
*/
const OVERWRITE = 'overwrite';
/**
* Skip scheme for Folder::copy
* if a subfolder with the same name exists it will be skipped
*
- * @constant SKIP
+ * @var string
*/
const SKIP = 'skip';
View
2 src/View/Helper/TimeHelper.php
@@ -291,6 +291,8 @@ public function toAtom($dateString, $timezone = null) {
}
/**
+ * Formats date for RSS feeds
+ *
* @see Cake\Utility\Time::toRSS()
*
* @param integer|string|DateTime $dateString UNIX timestamp, strtotime() valid string or DateTime object
View
6 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';
View
4 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';

0 comments on commit cfca6b1

Please sign in to comment.