Skip to content

Commit 070980b

Browse files
committed
Fixed some API doc in i18n and network.
1 parent 552791d commit 070980b

12 files changed

+23
-21
lines changed

lib/Cake/I18n/I18n.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ private function __bindTextDomain($domain) {
356356
*
357357
* @param resource $file Binary .mo file to load
358358
* @param string $domain Domain where to load file in
359+
* @return void
359360
*/
360361
private function __loadMo($file, $domain) {
361362
$data = file_get_contents($file);

lib/Cake/I18n/L10n.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ public function __construct() {
340340
* the method will get the settings from L10n::__setLanguage();
341341
*
342342
* @param string $language Language (if null will use DEFAULT_LANGUAGE if defined)
343+
* @return mixed
343344
*/
344345
public function get($language = null) {
345346
if ($language !== null) {
@@ -354,7 +355,7 @@ public function get($language = null) {
354355
* If $language is null it will use the DEFAULT_LANGUAGE if defined
355356
*
356357
* @param string $language Language (if null will use DEFAULT_LANGUAGE if defined)
357-
* @access private
358+
* @return mixed
358359
*/
359360
private function __setLanguage($language = null) {
360361
$langKey = null;

lib/Cake/I18n/Multibyte.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ class Multibyte {
278278
* Converts a multibyte character string
279279
* to the decimal value of the character
280280
*
281-
* @param multibyte string $string
281+
* @param string $string
282282
* @return array
283283
*/
284284
public static function utf8($string) {
@@ -341,8 +341,8 @@ public static function ascii($array) {
341341
/**
342342
* Find position of first occurrence of a case-insensitive string.
343343
*
344-
* @param multi-byte string $haystack The string from which to get the position of the first occurrence of $needle.
345-
* @param multi-byte string $needle The string to find in $haystack.
344+
* @param string $haystack The string from which to get the position of the first occurrence of $needle.
345+
* @param string $needle The string to find in $haystack.
346346
* @param integer $offset The position in $haystack to start searching.
347347
* @return integer|boolean The numeric position of the first occurrence of $needle in the $haystack string,
348348
* or false if $needle is not found.
@@ -803,10 +803,7 @@ public static function strtolower($string) {
803803
* Make a string uppercase
804804
*
805805
* @param string $string The string being uppercased.
806-
* @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used.
807806
* @return string with all alphabetic characters converted to uppercase.
808-
* @access public
809-
* @static
810807
*/
811808
public static function strtoupper($string) {
812809
$utf8Map = Multibyte::utf8($string);

lib/Cake/Network/CakeRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ public function offsetExists($name) {
769769
/**
770770
* Array access unset() implementation
771771
*
772-
* @param $name Name to unset.
772+
* @param string $name Name to unset.
773773
* @return void
774774
*/
775775
public function offsetUnset($name) {

lib/Cake/Network/CakeResponse.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,8 @@ public function send() {
358358
/**
359359
* Sends a header to the client.
360360
*
361-
* @param $name the header name
362-
* @param $value the header value
361+
* @param string $name the header name
362+
* @param string $value the header value
363363
* @return void
364364
*/
365365
protected function _sendHeader($name, $value = null) {
@@ -375,7 +375,7 @@ protected function _sendHeader($name, $value = null) {
375375
/**
376376
* Sends a content string to the client.
377377
*
378-
* @param $content string to send as response body
378+
* @param string $content string to send as response body
379379
* @return void
380380
*/
381381
protected function _sendContent($content) {
@@ -565,7 +565,7 @@ public function getMimeType($alias) {
565565
*
566566
* e.g `mapType('application/pdf'); // returns 'pdf'`
567567
*
568-
* @param mixed $type Either a string content type to map, or an array of types.
568+
* @param mixed $ctype Either a string content type to map, or an array of types.
569569
* @return mixed Aliases for the types provided.
570570
*/
571571
public function mapType($ctype) {

lib/Cake/Network/Email/AbstractTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ abstract class AbstractTransport {
3434
/**
3535
* Send mail
3636
*
37-
* @params object $email CakeEmail
37+
* @param CakeEmail $email CakeEmail
3838
* @return boolean
3939
*/
4040
abstract public function send(CakeEmail $email);

lib/Cake/Network/Email/CakeEmail.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ public function subject($subject = null) {
533533
/**
534534
* Sets headers for the message
535535
*
536-
* @param array Associative array containing headers to be set.
536+
* @param array $headers Associative array containing headers to be set.
537537
* @return object $this
538538
* @throws SocketException
539539
*/
@@ -906,6 +906,7 @@ public function config($config = null) {
906906
/**
907907
* Send an email using the specified content, template and layout
908908
*
909+
* @param string|array $content
909910
* @return boolean Success
910911
* @throws SocketException
911912
*/

lib/Cake/Network/Email/DebugTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class DebugTransport extends AbstractTransport {
2828
/**
2929
* Send mail
3030
*
31-
* @params object $email CakeEmail
31+
* @param CakeEmail $email CakeEmail
3232
* @return boolean
3333
*/
3434
public function send(CakeEmail $email) {

lib/Cake/Network/Email/MailTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class MailTransport extends AbstractTransport {
2727
/**
2828
* Send mail
2929
*
30-
* @params object $email CakeEmail
30+
* @param CakeEmail $email CakeEmail
3131
* @return boolean
3232
*/
3333
public function send(CakeEmail $email) {

lib/Cake/Network/Email/SmtpTransport.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,21 @@ class SmtpTransport extends AbstractTransport {
2828
/**
2929
* Socket to SMTP server
3030
*
31-
* @var object CakeScoket
31+
* @var CakeSocket
3232
*/
3333
protected $_socket;
3434

3535
/**
3636
* CakeEmail
3737
*
38-
* @var object CakeEmail
38+
* @var CakeEmail
3939
*/
4040
protected $_cakeEmail;
4141

4242
/**
4343
* Send mail
4444
*
45-
* @params object $email CakeEmail
45+
* @param CakeEmail $email CakeEmail
4646
* @return boolean
4747
* @throws SocketException
4848
*/

lib/Cake/Network/Http/DigestAuthentication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static function authentication(HttpSocket $http, &$authInfo) {
4545
* Retrive information about the authetication
4646
*
4747
* @param HttpSocket $http
48-
* @parma array $authInfo
48+
* @param array $authInfo
4949
* @return boolean
5050
*/
5151
protected static function _getServerInformation(HttpSocket $http, &$authInfo) {

lib/Cake/Network/Http/HttpResponse.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ class HttpResponse implements ArrayAccess {
7171
/**
7272
* Contructor
7373
*
74+
* @param string $message
7475
*/
7576
public function __construct($message = null) {
7677
if ($message !== null) {
@@ -91,6 +92,7 @@ public function body() {
9192
* Get header in case insensitive
9293
*
9394
* @param string $name Header name
95+
* @param array $headers
9496
* @return mixed String if header exists or null
9597
*/
9698
public function getHeader($name, $headers = null) {
@@ -417,7 +419,7 @@ public function offsetSet($offset, $value) {
417419
/**
418420
* ArrayAccess - Offset Unset
419421
*
420-
* @param mixed @offset
422+
* @param mixed $offset
421423
* @return void
422424
*/
423425
public function offsetUnset($offset) {

0 commit comments

Comments
 (0)