Skip to content

Commit

Permalink
Fixed some API doc in i18n and network.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbasso committed Jul 29, 2011
1 parent 552791d commit 070980b
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 21 deletions.
1 change: 1 addition & 0 deletions lib/Cake/I18n/I18n.php
Expand Up @@ -356,6 +356,7 @@ private function __bindTextDomain($domain) {
*
* @param resource $file Binary .mo file to load
* @param string $domain Domain where to load file in
* @return void
*/
private function __loadMo($file, $domain) {
$data = file_get_contents($file);
Expand Down
3 changes: 2 additions & 1 deletion lib/Cake/I18n/L10n.php
Expand Up @@ -340,6 +340,7 @@ public function __construct() {
* the method will get the settings from L10n::__setLanguage();
*
* @param string $language Language (if null will use DEFAULT_LANGUAGE if defined)
* @return mixed
*/
public function get($language = null) {
if ($language !== null) {
Expand All @@ -354,7 +355,7 @@ public function get($language = null) {
* If $language is null it will use the DEFAULT_LANGUAGE if defined
*
* @param string $language Language (if null will use DEFAULT_LANGUAGE if defined)
* @access private
* @return mixed
*/
private function __setLanguage($language = null) {
$langKey = null;
Expand Down
9 changes: 3 additions & 6 deletions lib/Cake/I18n/Multibyte.php
Expand Up @@ -278,7 +278,7 @@ class Multibyte {
* Converts a multibyte character string
* to the decimal value of the character
*
* @param multibyte string $string
* @param string $string
* @return array
*/
public static function utf8($string) {
Expand Down Expand Up @@ -341,8 +341,8 @@ public static function ascii($array) {
/**
* Find position of first occurrence of a case-insensitive string.
*
* @param multi-byte string $haystack The string from which to get the position of the first occurrence of $needle.
* @param multi-byte string $needle The string to find in $haystack.
* @param string $haystack The string from which to get the position of the first occurrence of $needle.
* @param string $needle The string to find in $haystack.
* @param integer $offset The position in $haystack to start searching.
* @return integer|boolean The numeric position of the first occurrence of $needle in the $haystack string,
* or false if $needle is not found.
Expand Down Expand Up @@ -803,10 +803,7 @@ public static function strtolower($string) {
* Make a string uppercase
*
* @param string $string The string being uppercased.
* @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used.
* @return string with all alphabetic characters converted to uppercase.
* @access public
* @static
*/
public static function strtoupper($string) {
$utf8Map = Multibyte::utf8($string);
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Network/CakeRequest.php
Expand Up @@ -769,7 +769,7 @@ public function offsetExists($name) {
/**
* Array access unset() implementation
*
* @param $name Name to unset.
* @param string $name Name to unset.
* @return void
*/
public function offsetUnset($name) {
Expand Down
8 changes: 4 additions & 4 deletions lib/Cake/Network/CakeResponse.php
Expand Up @@ -358,8 +358,8 @@ public function send() {
/**
* Sends a header to the client.
*
* @param $name the header name
* @param $value the header value
* @param string $name the header name
* @param string $value the header value
* @return void
*/
protected function _sendHeader($name, $value = null) {
Expand All @@ -375,7 +375,7 @@ protected function _sendHeader($name, $value = null) {
/**
* Sends a content string to the client.
*
* @param $content string to send as response body
* @param string $content string to send as response body
* @return void
*/
protected function _sendContent($content) {
Expand Down Expand Up @@ -565,7 +565,7 @@ public function getMimeType($alias) {
*
* e.g `mapType('application/pdf'); // returns 'pdf'`
*
* @param mixed $type Either a string content type to map, or an array of types.
* @param mixed $ctype Either a string content type to map, or an array of types.
* @return mixed Aliases for the types provided.
*/
public function mapType($ctype) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Network/Email/AbstractTransport.php
Expand Up @@ -34,7 +34,7 @@ abstract class AbstractTransport {
/**
* Send mail
*
* @params object $email CakeEmail
* @param CakeEmail $email CakeEmail
* @return boolean
*/
abstract public function send(CakeEmail $email);
Expand Down
3 changes: 2 additions & 1 deletion lib/Cake/Network/Email/CakeEmail.php
Expand Up @@ -533,7 +533,7 @@ public function subject($subject = null) {
/**
* Sets headers for the message
*
* @param array Associative array containing headers to be set.
* @param array $headers Associative array containing headers to be set.
* @return object $this
* @throws SocketException
*/
Expand Down Expand Up @@ -906,6 +906,7 @@ public function config($config = null) {
/**
* Send an email using the specified content, template and layout
*
* @param string|array $content
* @return boolean Success
* @throws SocketException
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Network/Email/DebugTransport.php
Expand Up @@ -28,7 +28,7 @@ class DebugTransport extends AbstractTransport {
/**
* Send mail
*
* @params object $email CakeEmail
* @param CakeEmail $email CakeEmail
* @return boolean
*/
public function send(CakeEmail $email) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Network/Email/MailTransport.php
Expand Up @@ -27,7 +27,7 @@ class MailTransport extends AbstractTransport {
/**
* Send mail
*
* @params object $email CakeEmail
* @param CakeEmail $email CakeEmail
* @return boolean
*/
public function send(CakeEmail $email) {
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Network/Email/SmtpTransport.php
Expand Up @@ -28,21 +28,21 @@ class SmtpTransport extends AbstractTransport {
/**
* Socket to SMTP server
*
* @var object CakeScoket
* @var CakeSocket
*/
protected $_socket;

/**
* CakeEmail
*
* @var object CakeEmail
* @var CakeEmail
*/
protected $_cakeEmail;

/**
* Send mail
*
* @params object $email CakeEmail
* @param CakeEmail $email CakeEmail
* @return boolean
* @throws SocketException
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Network/Http/DigestAuthentication.php
Expand Up @@ -45,7 +45,7 @@ public static function authentication(HttpSocket $http, &$authInfo) {
* Retrive information about the authetication
*
* @param HttpSocket $http
* @parma array $authInfo
* @param array $authInfo
* @return boolean
*/
protected static function _getServerInformation(HttpSocket $http, &$authInfo) {
Expand Down
4 changes: 3 additions & 1 deletion lib/Cake/Network/Http/HttpResponse.php
Expand Up @@ -71,6 +71,7 @@ class HttpResponse implements ArrayAccess {
/**
* Contructor
*
* @param string $message
*/
public function __construct($message = null) {
if ($message !== null) {
Expand All @@ -91,6 +92,7 @@ public function body() {
* Get header in case insensitive
*
* @param string $name Header name
* @param array $headers
* @return mixed String if header exists or null
*/
public function getHeader($name, $headers = null) {
Expand Down Expand Up @@ -417,7 +419,7 @@ public function offsetSet($offset, $value) {
/**
* ArrayAccess - Offset Unset
*
* @param mixed @offset
* @param mixed $offset
* @return void
*/
public function offsetUnset($offset) {
Expand Down

0 comments on commit 070980b

Please sign in to comment.