diff --git a/lib/Doctrine/Connection/Profiler.php b/lib/Doctrine/Connection/Profiler.php index 1b7894b53..4f1d7cd5c 100644 --- a/lib/Doctrine/Connection/Profiler.php +++ b/lib/Doctrine/Connection/Profiler.php @@ -107,7 +107,7 @@ public function __call($m, $a) * get * * @param mixed $key - * @return Doctrine_Event + * @return Doctrine_Event|null */ public function get($key) { @@ -121,7 +121,7 @@ public function get($key) * getAll * returns all profiled events as an array * - * @return array all events in an array + * @return Doctrine_Event[] All events in an array */ public function getAll() { @@ -154,7 +154,7 @@ public function count() /** * pop the last event from the event stack * - * @return Doctrine_Event + * @return Doctrine_Event|null */ public function pop() { diff --git a/lib/Doctrine/Connection/Sqlite.php b/lib/Doctrine/Connection/Sqlite.php index 83e508c5b..6a29b654e 100644 --- a/lib/Doctrine/Connection/Sqlite.php +++ b/lib/Doctrine/Connection/Sqlite.php @@ -90,7 +90,7 @@ public function __construct(Doctrine_Manager $manager, $adapter) public function connect() { if ($this->isConnected) { - return false; + return; } // If customer configure it diff --git a/lib/Doctrine/Record.php b/lib/Doctrine/Record.php index 1777e9af7..4ab93f04d 100644 --- a/lib/Doctrine/Record.php +++ b/lib/Doctrine/Record.php @@ -815,7 +815,6 @@ public function unserialize($serialized) $array = unserialize($serialized); $this->__unserialize($array); - } /** diff --git a/lib/Doctrine/Table.php b/lib/Doctrine/Table.php index a76a7bdfc..a9cad793f 100644 --- a/lib/Doctrine/Table.php +++ b/lib/Doctrine/Table.php @@ -31,8 +31,6 @@ * @version $Revision$ * @link www.doctrine-project.org * @since 1.0 - * @method mixed findBy*(mixed $value) magic finders; @see __call() - * @method mixed findOneBy*(mixed $value) magic finders; @see __call() */ class Doctrine_Table extends Doctrine_Configurable implements Countable, Serializable { @@ -561,7 +559,7 @@ public function getRecordInstance() /** * Checks whether a column is inherited from a component further up in the hierarchy. * - * @param $columnName The column name + * @param string $columnName The column name * @return boolean TRUE if column is inherited, FALSE otherwise. */ public function isInheritedColumn($columnName) @@ -1133,7 +1131,7 @@ public function processOrderBy($alias, $orderBy, $columnNames = false) } // Php8.1 require a string - if(null === $orderBy) { + if (null === $orderBy) { $orderBy = ''; } @@ -3035,7 +3033,7 @@ public function __serialize() { /** * Unserializes a Doctrine_Record instance for php 7.4+ * - * @param array $serialized + * @param array $data */ public function __unserialize($data) { @@ -3052,7 +3050,10 @@ public function __unserialize($data) { $this->_useIdentityMap = $data[10]; } - + /** + * Creates new instance and initialize it from cache. + * + */ public function initializeFromCache(Doctrine_Connection $conn) { $this->_conn = $conn; diff --git a/lib/Doctrine/Task.php b/lib/Doctrine/Task.php index edd4103ae..3a9311c07 100644 --- a/lib/Doctrine/Task.php +++ b/lib/Doctrine/Task.php @@ -53,7 +53,7 @@ public function __construct($dispatcher = null) { $this->dispatcher = $dispatcher; - $taskName = (string)$this->getTaskName(); + $taskName = (string) $this->getTaskName(); //Derive the task name only if it wasn't entered at design-time if ('' === trim($taskName)) { diff --git a/lib/Doctrine/Validator.php b/lib/Doctrine/Validator.php index 499d8b8a7..bab8fe82c 100644 --- a/lib/Doctrine/Validator.php +++ b/lib/Doctrine/Validator.php @@ -126,9 +126,9 @@ public static function validateLength($value, $type, $maximumLength) public static function getStringLength($string) { if (function_exists('mb_strlen')) { - return mb_strlen((string)$string, 'utf8'); + return mb_strlen((string) $string, 'utf8'); } else { - return strlen(utf8_decode((string)$string)); + return strlen(utf8_decode((string) $string)); } } diff --git a/lib/Doctrine/Validator/Notblank.php b/lib/Doctrine/Validator/Notblank.php index 763360570..fe6591105 100644 --- a/lib/Doctrine/Validator/Notblank.php +++ b/lib/Doctrine/Validator/Notblank.php @@ -41,6 +41,6 @@ class Doctrine_Validator_Notblank extends Doctrine_Validator_Driver */ public function validate($value) { - return ($value !== null && trim($value) !== ''); + return (null !== $value && '' !== trim($value)); } } \ No newline at end of file