From 67846bb09cce6bbc04cc8df3f969f13dd70690b2 Mon Sep 17 00:00:00 2001 From: George Mponos Date: Sun, 16 Jul 2017 20:57:54 +0300 Subject: [PATCH 1/2] Converted the docblocks of ArrayCollection to short type hints --- .../Common/Collections/Collection.php | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/Doctrine/Common/Collections/Collection.php b/lib/Doctrine/Common/Collections/Collection.php index e07685ac8..d4777fccc 100644 --- a/lib/Doctrine/Common/Collections/Collection.php +++ b/lib/Doctrine/Common/Collections/Collection.php @@ -53,7 +53,7 @@ interface Collection extends Countable, IteratorAggregate, ArrayAccess * * @param mixed $element The element to add. * - * @return boolean Always TRUE. + * @return bool Always TRUE. */ public function add($element); @@ -70,21 +70,21 @@ public function clear(); * * @param mixed $element The element to search for. * - * @return boolean TRUE if the collection contains the element, FALSE otherwise. + * @return bool TRUE if the collection contains the element, FALSE otherwise. */ public function contains($element); /** * Checks whether the collection is empty (contains no elements). * - * @return boolean TRUE if the collection is empty, FALSE otherwise. + * @return bool TRUE if the collection is empty, FALSE otherwise. */ public function isEmpty(); /** * Removes the element at the specified index from the collection. * - * @param string|integer $key The kex/index of the element to remove. + * @param string|int $key The kex/index of the element to remove. * * @return mixed The removed element or NULL, if the collection did not contain the element. */ @@ -95,24 +95,24 @@ public function remove($key); * * @param mixed $element The element to remove. * - * @return boolean TRUE if this collection contained the specified element, FALSE otherwise. + * @return bool TRUE if this collection contained the specified element, FALSE otherwise. */ public function removeElement($element); /** * Checks whether the collection contains an element with the specified key/index. * - * @param string|integer $key The key/index to check for. + * @param string|int $key The key/index to check for. * - * @return boolean TRUE if the collection contains an element with the specified key/index, - * FALSE otherwise. + * @return bool TRUE if the collection contains an element with the specified key/index, + * FALSE otherwise. */ public function containsKey($key); /** * Gets the element at the specified key/index. * - * @param string|integer $key The key/index of the element to retrieve. + * @param string|int $key The key/index of the element to retrieve. * * @return mixed */ @@ -137,8 +137,8 @@ public function getValues(); /** * Sets an element in the collection at the specified key/index. * - * @param string|integer $key The key/index of the element to set. - * @param mixed $value The element to set. + * @param string|int $key The key/index of the element to set. + * @param mixed $value The element to set. * * @return void */ @@ -191,7 +191,7 @@ public function next(); * * @param Closure $p The predicate. * - * @return boolean TRUE if the predicate is TRUE for at least one element, FALSE otherwise. + * @return bool TRUE if the predicate is TRUE for at least one element, FALSE otherwise. */ public function exists(Closure $p); @@ -210,7 +210,7 @@ public function filter(Closure $p); * * @param Closure $p The predicate. * - * @return boolean TRUE, if the predicate yields TRUE for all elements, FALSE otherwise. + * @return bool TRUE, if the predicate yields TRUE for all elements, FALSE otherwise. */ public function forAll(Closure $p); From 53464dea7802713b28ce3115ee3ee20f5c406732 Mon Sep 17 00:00:00 2001 From: George Mponos Date: Sun, 16 Jul 2017 21:01:24 +0300 Subject: [PATCH 2/2] Convert to short type hint also the AbstractLazyCollection --- lib/Doctrine/Common/Collections/AbstractLazyCollection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/Common/Collections/AbstractLazyCollection.php b/lib/Doctrine/Common/Collections/AbstractLazyCollection.php index b907f8b02..746ae7105 100644 --- a/lib/Doctrine/Common/Collections/AbstractLazyCollection.php +++ b/lib/Doctrine/Common/Collections/AbstractLazyCollection.php @@ -37,7 +37,7 @@ abstract class AbstractLazyCollection implements Collection protected $collection; /** - * @var boolean + * @var bool */ protected $initialized = false;