Skip to content

Commit

Permalink
Fix ApiGen errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rockingeric committed Feb 7, 2014
1 parent 96048f4 commit 2793dca
Show file tree
Hide file tree
Showing 18 changed files with 194 additions and 17 deletions.
4 changes: 4 additions & 0 deletions lib/Cake/Console/Command/ServerShell.php
Expand Up @@ -26,11 +26,15 @@ class ServerShell extends AppShell {

/**
* Default ServerHost
*
* @var string
*/
const DEFAULT_HOST = 'localhost';

/**
* Default ListenPort
*
* @var integer
*/
const DEFAULT_PORT = 80;

Expand Down
1 change: 1 addition & 0 deletions lib/Cake/Console/Command/Task/ExtractTask.php
Expand Up @@ -501,6 +501,7 @@ protected function _extractPluginValidationMessages($plugin = null) {
* @param array $rules the set of validation rules for the field
* @param string $file the file name where this validation rule was found
* @param string $domain default domain to bind the validations to
* @param string $category the translation category
* @return void
*/
protected function _processValidationRules($field, $rules, $file, $domain, $category = 'LC_MESSAGES') {
Expand Down
8 changes: 8 additions & 0 deletions lib/Cake/Console/ConsoleOutput.php
Expand Up @@ -46,21 +46,29 @@ class ConsoleOutput {

/**
* Raw output constant - no modification of output text.
*
* @var integer
*/
const RAW = 0;

/**
* Plain output - tags will be stripped.
*
* @var integer
*/
const PLAIN = 1;

/**
* Color output - Convert known tags in to ANSI color escape codes.
*
* @var integer
*/
const COLOR = 2;

/**
* Constant for a newline.
*
* @var string
*/
const LF = PHP_EOL;

Expand Down
6 changes: 6 additions & 0 deletions lib/Cake/Console/Shell.php
Expand Up @@ -33,16 +33,22 @@ class Shell extends Object {

/**
* Output constant making verbose shells.
*
* @var integer
*/
const VERBOSE = 2;

/**
* Output constant for making normal shells.
*
* @var integer
*/
const NORMAL = 1;

/**
* Output constants for making quiet shells.
*
* @var integer
*/
const QUIET = 0;

Expand Down
6 changes: 6 additions & 0 deletions lib/Cake/Controller/Component/Acl/PhpAcl.php
Expand Up @@ -26,11 +26,15 @@ class PhpAcl extends Object implements AclInterface {

/**
* Constant for deny
*
* @var boolean
*/
const DENY = false;

/**
* Constant for allow
*
* @var boolean
*/
const ALLOW = true;

Expand Down Expand Up @@ -364,6 +368,8 @@ class PhpAro {
/**
* role to resolve to when a provided ARO is not listed in
* the internal tree
*
* @var string
*/
const DEFAULT_ROLE = 'Role/default';

Expand Down
2 changes: 2 additions & 0 deletions lib/Cake/Controller/Component/AuthComponent.php
Expand Up @@ -39,6 +39,8 @@ class AuthComponent extends Component {

/**
* Constant for 'all'
*
* @var string
*/
const ALL = 'all';

Expand Down
8 changes: 4 additions & 4 deletions lib/Cake/Core/App.php
Expand Up @@ -66,28 +66,28 @@ class App {
/**
* Append paths
*
* @constant APPEND
* @var string
*/
const APPEND = 'append';

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

/**
* Register package
*
* @constant REGISTER
* @var string
*/
const REGISTER = 'register';

/**
* Reset paths instead of merging
*
* @constant RESET
* @var boolean
*/
const RESET = true;

Expand Down
2 changes: 2 additions & 0 deletions lib/Cake/Core/Object.php
Expand Up @@ -152,6 +152,8 @@ protected function _stop($status = 0) {
*
* @param string $msg Log message
* @param integer $type Error type constant. Defined in app/Config/core.php.
* @param null|string|array $scope The scope(s) a log message is being created in.
* See CakeLog::config() for more information on logging scopes.
* @return boolean Success of log write
*/
public function log($msg, $type = LOG_ERR, $scope = null) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Error/ErrorHandler.php
@@ -1,6 +1,6 @@
<?php
/**
* Error handler
* ErrorHandler class
*
* Provides Error Capturing for Framework errors.
*
Expand Down
2 changes: 2 additions & 0 deletions lib/Cake/Model/Datasource/Database/Sqlserver.php
Expand Up @@ -103,6 +103,8 @@ class Sqlserver extends DboSource {
/**
* Magic column name used to provide pagination support for SQLServer 2008
* which lacks proper limit/offset support.
*
* @var string
*/
const ROW_COUNTER = '_cake_page_rownum_';

Expand Down
11 changes: 6 additions & 5 deletions lib/Cake/Network/Email/CakeEmail.php
Expand Up @@ -36,35 +36,35 @@ class CakeEmail {
/**
* Default X-Mailer
*
* @constant EMAIL_CLIENT
* @var string
*/
const EMAIL_CLIENT = 'CakePHP Email';

/**
* Line length - no should more - RFC 2822 - 2.1.1
*
* @constant LINE_LENGTH_SHOULD
* @var integer
*/
const LINE_LENGTH_SHOULD = 78;

/**
* Line length - no must more - RFC 2822 - 2.1.1
*
* @constant LINE_LENGTH_MUST
* @var integer
*/
const LINE_LENGTH_MUST = 998;

/**
* Type of message - HTML
*
* @constant MESSAGE_HTML
* @var string
*/
const MESSAGE_HTML = 'html';

/**
* Type of message - TEXT
*
* @constant MESSAGE_TEXT
* @var string
*/
const MESSAGE_TEXT = 'text';

Expand Down Expand Up @@ -1308,6 +1308,7 @@ protected function _encodeString($text, $charset) {
* Wrap the message to follow the RFC 2822 - 2.1.1
*
* @param string $message Message to wrap
* @param integer $wrapLength The line length
* @return array Wrapped message
*/
protected function _wrap($message, $wrapLength = CakeEmail::LINE_LENGTH_MUST) {
Expand Down
35 changes: 33 additions & 2 deletions lib/Cake/Routing/Router.php
Expand Up @@ -85,14 +85,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 Expand Up @@ -269,7 +300,7 @@ public static function resourceMap($resourceMap = null) {
*
* Shows connecting a route with custom route parameters as well as providing patterns for those parameters.
* Patterns for routing parameters do not need capturing groups, as one will be added for each route params.
*
*
* $defaults is merged with the results of parsing the request URL to form the final routing destination and its
* parameters. This destination is expressed as an associative array by Router. See the output of {@link parse()}.
*
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Utility/Folder.php
Expand Up @@ -26,23 +26,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
24 changes: 24 additions & 0 deletions lib/Cake/View/Helper/NumberHelper.php
Expand Up @@ -73,6 +73,8 @@ public function __call($method, $params) {
}

/**
* Formats a number with a level of precision.
*
* @see CakeNumber::precision()
*
* @param float $number A floating point number.
Expand All @@ -85,6 +87,8 @@ public function precision($number, $precision = 3) {
}

/**
* Returns a formatted-for-humans file size.
*
* @see CakeNumber::toReadableSize()
*
* @param integer $size Size in bytes
Expand All @@ -96,6 +100,8 @@ public function toReadableSize($size) {
}

/**
* - `multiply`: Multiply the input value by 100 for decimal percentages.
*
* @see CakeNumber::toPercentage()
*
* @param float $number A floating point number
Expand All @@ -109,6 +115,8 @@ public function toPercentage($number, $precision = 2, $options = array()) {
}

/**
* Formats a number into a currency format.
*
* @see CakeNumber::format()
*
* @param float $number A floating point number
Expand All @@ -122,6 +130,8 @@ public function format($number, $options = false) {
}

/**
* Formats a number into a currency format.
*
* @see CakeNumber::currency()
*
* @param float $number
Expand All @@ -137,6 +147,18 @@ public function currency($number, $currency = null, $options = array()) {
}

/**
* Add a currency format to the Number helper. Makes reusing
* currency formats easier.
*
* {{{ $this->Number->addFormat('NOK', array('before' => 'Kr. ')); }}}
*
* You can now use `NOK` as a shortform when formatting currency amounts.
*
* {{{ $this->Number->currency($value, 'NOK'); }}}
*
* Added formats are merged with the defaults defined in Cake\Utility\Number::$_currencyDefaults
* See Cake\Utility\Number::currency() for more information on the various options and their function.
*
* @see CakeNumber::addFormat()
*
* @param string $formatName The format name to be used in the future.
Expand All @@ -150,6 +172,8 @@ public function addFormat($formatName, $options) {
}

/**
* Getter/setter for default currency
*
* @see CakeNumber::defaultCurrency()
*
* @param string $currency The currency to be used in the future.
Expand Down

0 comments on commit 2793dca

Please sign in to comment.