Skip to content

Commit

Permalink
Fix Annotation and Coding Style
Browse files Browse the repository at this point in the history
  • Loading branch information
Tybaze authored and thePanz committed Oct 17, 2022
1 parent b6546b1 commit 9c63e5d
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions lib/Doctrine/Connection/Profiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function __call($m, $a)
* get
*
* @param mixed $key
* @return Doctrine_Event
* @return Doctrine_Event|null
*/
public function get($key)
{
Expand All @@ -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()
{
Expand Down Expand Up @@ -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()
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/Connection/Sqlite.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function __construct(Doctrine_Manager $manager, $adapter)
public function connect()
{
if ($this->isConnected) {
return false;
return;
}

// If customer configure it
Expand Down
1 change: 0 additions & 1 deletion lib/Doctrine/Record.php
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,6 @@ public function unserialize($serialized)
$array = unserialize($serialized);

$this->__unserialize($array);

}

/**
Expand Down
13 changes: 7 additions & 6 deletions lib/Doctrine/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -1133,7 +1131,7 @@ public function processOrderBy($alias, $orderBy, $columnNames = false)
}

// Php8.1 require a string
if(null === $orderBy) {
if (null === $orderBy) {
$orderBy = '';
}

Expand Down Expand Up @@ -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) {

Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
4 changes: 2 additions & 2 deletions lib/Doctrine/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/Validator/Notblank.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

0 comments on commit 9c63e5d

Please sign in to comment.