Skip to content

Commit

Permalink
Additional ApiGen error fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bcrowe committed Jan 24, 2014
1 parent 8a6fdbc commit cfca6b1
Show file tree
Hide file tree
Showing 15 changed files with 134 additions and 19 deletions.
1 change: 1 addition & 0 deletions src/Network/Http/Client.php
Expand Up @@ -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(
Expand Down
76 changes: 76 additions & 0 deletions src/Network/Http/Message.php
Expand Up @@ -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';

/**
Expand Down
1 change: 1 addition & 0 deletions src/ORM/Marshaller.php
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion src/ORM/Query.php
Expand Up @@ -144,6 +144,8 @@ class Query extends DatabaseQuery {
protected $_cache;

/**
* Constuctor
*
* @param Cake\Database\Connection $connection
* @param Cake\ORM\Table $table
*/
Expand Down Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion src/ORM/ResultSet.php
Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions src/ORM/ResultSetDecorator.php
Expand Up @@ -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));
Expand All @@ -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));
Expand Down
6 changes: 4 additions & 2 deletions src/ORM/Table.php
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 0 additions & 2 deletions src/Routing/DispatcherFilter.php
Expand Up @@ -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) {
}
Expand All @@ -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) {
}
Expand Down
2 changes: 1 addition & 1 deletion src/Routing/Route/Route.php
Expand Up @@ -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)) {
Expand Down
37 changes: 34 additions & 3 deletions src/Routing/Router.php
Expand Up @@ -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}';

/**
Expand Down
2 changes: 0 additions & 2 deletions src/TestSuite/TestCase.php
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions src/Utility/Folder.php
Expand Up @@ -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';

Expand Down
2 changes: 2 additions & 0 deletions src/View/Helper/TimeHelper.php
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions src/View/View.php
Expand Up @@ -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';

Expand Down
4 changes: 2 additions & 2 deletions src/View/ViewBlock.php
Expand Up @@ -30,14 +30,14 @@ class ViewBlock {
/**
* Append content
*
* @constant APPEND
* @var string
*/
const APPEND = 'append';

/**
* Prepend content
*
* @constant PREPEND
* @var string
*/
const PREPEND = 'prepend';

Expand Down

0 comments on commit cfca6b1

Please sign in to comment.