Use more specific datatypes in PHPDoc

This commit is contained in:
Edgaras Janušauskas 2016-01-28 23:03:24 +02:00
parent fde1d08b43
commit 6e54a7391c
5 changed files with 11 additions and 9 deletions

View file

@ -89,7 +89,7 @@ class AuthComponent extends Component {
/** /**
* Objects that will be used for authentication checks. * Objects that will be used for authentication checks.
* *
* @var array * @var BaseAuthenticate[]
*/ */
protected $_authenticateObjects = array(); protected $_authenticateObjects = array();
@ -129,7 +129,7 @@ class AuthComponent extends Component {
/** /**
* Objects that will be used for authorization checks. * Objects that will be used for authorization checks.
* *
* @var array * @var BaseAuthorize[]
*/ */
protected $_authorizeObjects = array(); protected $_authorizeObjects = array();
@ -653,7 +653,7 @@ class AuthComponent extends Component {
* cookies + sessions will be used. * cookies + sessions will be used.
* *
* @param string $key field to retrieve. Leave null to get entire User record * @param string $key field to retrieve. Leave null to get entire User record
* @return array|null User record. or null if no user is logged in. * @return mixed|null User record. or null if no user is logged in.
* @link http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#accessing-the-logged-in-user * @link http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#accessing-the-logged-in-user
*/ */
public static function user($key = null) { public static function user($key = null) {

View file

@ -102,7 +102,7 @@ class CakeEvent {
/** /**
* Returns the subject of this event * Returns the subject of this event
* *
* @return string * @return object
*/ */
public function subject() { public function subject() {
return $this->_subject; return $this->_subject;

View file

@ -36,7 +36,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable {
/** /**
* Holds the CakeValidationSet objects array * Holds the CakeValidationSet objects array
* *
* @var array * @var CakeValidationSet[]
*/ */
protected $_fields = array(); protected $_fields = array();
@ -386,7 +386,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable {
* Processes the passed fieldList and returns the list of fields to be validated * Processes the passed fieldList and returns the list of fields to be validated
* *
* @param array $fieldList list of fields to be used for validation * @param array $fieldList list of fields to be used for validation
* @return array List of validation rules to be applied * @return CakeValidationSet[] List of validation rules to be applied
*/ */
protected function _validationList($fieldList = array()) { protected function _validationList($fieldList = array()) {
if (empty($fieldList) || Hash::dimensions($fieldList) > 1) { if (empty($fieldList) || Hash::dimensions($fieldList) > 1) {

View file

@ -32,7 +32,7 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable {
/** /**
* Holds the CakeValidationRule objects * Holds the CakeValidationRule objects
* *
* @var array * @var CakeValidationRule[]
*/ */
protected $_rules = array(); protected $_rules = array();
@ -172,7 +172,7 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable {
/** /**
* Returns all rules for this validation set * Returns all rules for this validation set
* *
* @return array * @return CakeValidationRule[]
*/ */
public function getRules() { public function getRules() {
return $this->_rules; return $this->_rules;

View file

@ -339,7 +339,7 @@ class CakeEmail {
/** /**
* An instance of the EmailConfig class can be set here * An instance of the EmailConfig class can be set here
* *
* @var string * @var EmailConfig
*/ */
protected $_configInstance; protected $_configInstance;
@ -1204,6 +1204,7 @@ class CakeEmail {
*/ */
public static function deliver($to = null, $subject = null, $message = null, $transportConfig = 'fast', $send = true) { public static function deliver($to = null, $subject = null, $message = null, $transportConfig = 'fast', $send = true) {
$class = __CLASS__; $class = __CLASS__;
/** @var CakeEmail $instance */
$instance = new $class($transportConfig); $instance = new $class($transportConfig);
if ($to !== null) { if ($to !== null) {
$instance->to($to); $instance->to($to);
@ -1673,6 +1674,7 @@ class CakeEmail {
App::uses($viewClass, $plugin . 'View'); App::uses($viewClass, $plugin . 'View');
} }
/** @var View $View */
$View = new $viewClass(null); $View = new $viewClass(null);
$View->viewVars = $this->_viewVars; $View->viewVars = $this->_viewVars;
$View->helpers = $this->_helpers; $View->helpers = $this->_helpers;