From 904bcb50562182f5b41531294ef733f92b296802 Mon Sep 17 00:00:00 2001 From: Simon Podlipsky Date: Mon, 23 Aug 2021 09:29:12 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/BaseIntervalPoint.php | 12 ------- src/ComparableIntervalInterface.php | 6 ---- src/Date/DateInterval.php | 33 ------------------- src/Date/DateIntervalPoint.php | 3 -- src/DateTime/DateTimeInterval.php | 33 ------------------- src/DateTime/DateTimeIntervalPoint.php | 3 -- src/Exception/OutOfIntervalException.php | 1 - src/IPv4/IPv4Interval.php | 8 ----- src/IPv4Network/IPv4Network.php | 4 --- src/IPv4Network/IPv4NetworkComparator.php | 11 ------- src/IPv6/IPv6Interval.php | 8 ----- src/IPv6Network/IPv6Network.php | 1 - src/IPv6Network/IPv6NetworkComparator.php | 11 ------- src/IntervalComparator.php | 25 -------------- src/IntervalType.php | 4 --- src/Month/MonthInterval.php | 33 ------------------- src/Month/MonthIntervalPoint.php | 3 -- src/Number/NumberInterval.php | 8 ----- .../Doctrine/DBAL/Types/BaseType.php | 6 ++-- src/Time/TimeInterval.php | 33 ------------------- src/Time/TimeIntervalPoint.php | 3 -- src/Week/WeekInterval.php | 33 ------------------- src/Week/WeekIntervalPoint.php | 5 --- src/Year/YearInterval.php | 33 ------------------- src/Year/YearIntervalPoint.php | 3 -- .../Doctrine/DBAL/Types/IntervalTypeTest.php | 9 ----- 26 files changed, 2 insertions(+), 330 deletions(-) diff --git a/src/BaseIntervalPoint.php b/src/BaseIntervalPoint.php index 72d5c07..ad7a6f3 100644 --- a/src/BaseIntervalPoint.php +++ b/src/BaseIntervalPoint.php @@ -12,8 +12,6 @@ abstract class BaseIntervalPoint implements IntervalPointInterface { /** - * @param IntervalPointInterface $point - * * @return bool */ public function eq(IntervalPointInterface $point) @@ -22,8 +20,6 @@ public function eq(IntervalPointInterface $point) } /** - * @param IntervalPointInterface $point - * * @return bool */ public function neq(IntervalPointInterface $point) @@ -32,8 +28,6 @@ public function neq(IntervalPointInterface $point) } /** - * @param IntervalPointInterface $point - * * @return bool */ public function lt(IntervalPointInterface $point) @@ -42,8 +36,6 @@ public function lt(IntervalPointInterface $point) } /** - * @param IntervalPointInterface $point - * * @return bool */ public function lte(IntervalPointInterface $point) @@ -52,8 +44,6 @@ public function lte(IntervalPointInterface $point) } /** - * @param IntervalPointInterface $point - * * @return bool */ public function gt(IntervalPointInterface $point) @@ -62,8 +52,6 @@ public function gt(IntervalPointInterface $point) } /** - * @param IntervalPointInterface $point - * * @return bool */ public function gte(IntervalPointInterface $point) diff --git a/src/ComparableIntervalInterface.php b/src/ComparableIntervalInterface.php index c6d32bd..198c93f 100644 --- a/src/ComparableIntervalInterface.php +++ b/src/ComparableIntervalInterface.php @@ -22,8 +22,6 @@ public function type(); /** * Returns a copy of this Interval with the start point altered. * - * @param IntervalPointInterface $start - * * @return self */ public function withStart(IntervalPointInterface $start); @@ -31,8 +29,6 @@ public function withStart(IntervalPointInterface $start); /** * Returns a copy of this Interval with the end point altered. * - * @param IntervalPointInterface $end - * * @return self */ public function withEnd(IntervalPointInterface $end); @@ -40,8 +36,6 @@ public function withEnd(IntervalPointInterface $end); /** * Returns a copy of this Interval with the interval type altered. * - * @param IntervalType $type - * * @return self */ public function withType(IntervalType $type); diff --git a/src/Date/DateInterval.php b/src/Date/DateInterval.php index 1eac6a2..fda6fec 100644 --- a/src/Date/DateInterval.php +++ b/src/Date/DateInterval.php @@ -51,11 +51,6 @@ class DateInterval implements ComparableIntervalInterface */ private $end; - /** - * @param DateIntervalPoint $start - * @param DateIntervalPoint $end - * @param IntervalType $type - */ private function __construct(DateIntervalPoint $start, DateIntervalPoint $end, IntervalType $type) { if ($start->gte($end)) { @@ -69,10 +64,6 @@ private function __construct(DateIntervalPoint $start, DateIntervalPoint $end, I } /** - * @param \DateTime $start - * @param \DateTime $end - * @param IntervalType $type - * * @return self */ public static function create(\DateTime $start, \DateTime $end, IntervalType $type) @@ -81,9 +72,6 @@ public static function create(\DateTime $start, \DateTime $end, IntervalType $ty } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function closed(\DateTime $start, \DateTime $end) @@ -92,9 +80,6 @@ public static function closed(\DateTime $start, \DateTime $end) } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function halfClosed(\DateTime $start, \DateTime $end) @@ -103,9 +88,6 @@ public static function halfClosed(\DateTime $start, \DateTime $end) } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function halfOpen(\DateTime $start, \DateTime $end) @@ -114,9 +96,6 @@ public static function halfOpen(\DateTime $start, \DateTime $end) } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function open(\DateTime $start, \DateTime $end) @@ -167,8 +146,6 @@ public function equal(self $interval) /** * Does this interval contain the specified point. * - * @param \DateTime $point - * * @return bool */ public function contains(\DateTime $point) @@ -263,8 +240,6 @@ public function union(self $interval) /** * The point is before the interval. * - * @param \DateTime $point - * * @return bool */ public function before(\DateTime $point) @@ -275,8 +250,6 @@ public function before(\DateTime $point) /** * The point is after the interval. * - * @param \DateTime $point - * * @return bool */ public function after(\DateTime $point) @@ -285,8 +258,6 @@ public function after(\DateTime $point) } /** - * @param \DateInterval|null $step - * * @return \Generator */ public function iterate(\DateInterval $step = null) @@ -307,8 +278,6 @@ public function iterate(\DateInterval $step = null) } /** - * @param \DateInterval|null $step - * * @return \DatePeriod */ public function period(\DateInterval $step = null) @@ -385,8 +354,6 @@ public function withEnd(IntervalPointInterface $end) /** * Returns a copy of this Interval with the interval type altered. * - * @param IntervalType $type - * * @return self */ public function withType(IntervalType $type) diff --git a/src/Date/DateIntervalPoint.php b/src/Date/DateIntervalPoint.php index 0d3d2dc..39a1221 100644 --- a/src/Date/DateIntervalPoint.php +++ b/src/Date/DateIntervalPoint.php @@ -19,9 +19,6 @@ class DateIntervalPoint extends BaseIntervalPoint */ private $date; - /** - * @param \DateTime $date - */ public function __construct(\DateTime $date) { $this->date = clone $date; diff --git a/src/DateTime/DateTimeInterval.php b/src/DateTime/DateTimeInterval.php index d1e6b0a..4667161 100644 --- a/src/DateTime/DateTimeInterval.php +++ b/src/DateTime/DateTimeInterval.php @@ -51,11 +51,6 @@ class DateTimeInterval implements ComparableIntervalInterface */ private $end; - /** - * @param DateTimeIntervalPoint $start - * @param DateTimeIntervalPoint $end - * @param IntervalType $type - */ private function __construct(DateTimeIntervalPoint $start, DateTimeIntervalPoint $end, IntervalType $type) { if ($start->gte($end)) { @@ -69,10 +64,6 @@ private function __construct(DateTimeIntervalPoint $start, DateTimeIntervalPoint } /** - * @param \DateTime $start - * @param \DateTime $end - * @param IntervalType $type - * * @return self */ public static function create(\DateTime $start, \DateTime $end, IntervalType $type) @@ -81,9 +72,6 @@ public static function create(\DateTime $start, \DateTime $end, IntervalType $ty } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function closed(\DateTime $start, \DateTime $end) @@ -92,9 +80,6 @@ public static function closed(\DateTime $start, \DateTime $end) } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function halfClosed(\DateTime $start, \DateTime $end) @@ -103,9 +88,6 @@ public static function halfClosed(\DateTime $start, \DateTime $end) } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function halfOpen(\DateTime $start, \DateTime $end) @@ -114,9 +96,6 @@ public static function halfOpen(\DateTime $start, \DateTime $end) } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function open(\DateTime $start, \DateTime $end) @@ -167,8 +146,6 @@ public function equal(self $interval) /** * Does this interval contain the specified point. * - * @param \DateTime $point - * * @return bool */ public function contains(\DateTime $point) @@ -263,8 +240,6 @@ public function union(self $interval) /** * The point is before the interval. * - * @param \DateTime $point - * * @return bool */ public function before(\DateTime $point) @@ -275,8 +250,6 @@ public function before(\DateTime $point) /** * The point is after the interval. * - * @param \DateTime $point - * * @return bool */ public function after(\DateTime $point) @@ -285,8 +258,6 @@ public function after(\DateTime $point) } /** - * @param \DateInterval|null $step - * * @return \Generator */ public function iterate(\DateInterval $step = null) @@ -307,8 +278,6 @@ public function iterate(\DateInterval $step = null) } /** - * @param \DateInterval|null $step - * * @return \DatePeriod */ public function period(\DateInterval $step = null) @@ -385,8 +354,6 @@ public function withEnd(IntervalPointInterface $end) /** * Returns a copy of this Interval with the interval type altered. * - * @param IntervalType $type - * * @return self */ public function withType(IntervalType $type) diff --git a/src/DateTime/DateTimeIntervalPoint.php b/src/DateTime/DateTimeIntervalPoint.php index 378de1b..f2080bc 100644 --- a/src/DateTime/DateTimeIntervalPoint.php +++ b/src/DateTime/DateTimeIntervalPoint.php @@ -19,9 +19,6 @@ class DateTimeIntervalPoint extends BaseIntervalPoint */ private $date; - /** - * @param \DateTime $date - */ public function __construct(\DateTime $date) { $this->date = clone $date; diff --git a/src/Exception/OutOfIntervalException.php b/src/Exception/OutOfIntervalException.php index 153b18c..db80c7d 100644 --- a/src/Exception/OutOfIntervalException.php +++ b/src/Exception/OutOfIntervalException.php @@ -16,7 +16,6 @@ class OutOfIntervalException extends \OutOfRangeException { /** * @param mixed $point - * @param IntervalInterface $interval * * @return self */ diff --git a/src/IPv4/IPv4Interval.php b/src/IPv4/IPv4Interval.php index 17ccf3b..4cc85c8 100644 --- a/src/IPv4/IPv4Interval.php +++ b/src/IPv4/IPv4Interval.php @@ -52,11 +52,6 @@ class IPv4Interval implements ComparableIntervalInterface */ private $end; - /** - * @param IPv4IntervalPoint $start - * @param IPv4IntervalPoint $end - * @param IntervalType $type - */ private function __construct(IPv4IntervalPoint $start, IPv4IntervalPoint $end, IntervalType $type) { if ($start->gte($end)) { @@ -72,7 +67,6 @@ private function __construct(IPv4IntervalPoint $start, IPv4IntervalPoint $end, I /** * @param string $start * @param string $end - * @param IntervalType $type * * @return self */ @@ -368,8 +362,6 @@ public function withEnd(IntervalPointInterface $end) /** * Returns a copy of this Interval with the interval type altered. * - * @param IntervalType $type - * * @return self */ public function withType(IntervalType $type) diff --git a/src/IPv4Network/IPv4Network.php b/src/IPv4Network/IPv4Network.php index a1833bc..123552c 100644 --- a/src/IPv4Network/IPv4Network.php +++ b/src/IPv4Network/IPv4Network.php @@ -46,10 +46,6 @@ class IPv4Network implements IntervalInterface */ private $comparator; - /** - * @param IPv4NetworkPoint $ip - * @param IPv4NetworkMask $mask - */ private function __construct(IPv4NetworkPoint $ip, IPv4NetworkMask $mask) { $this->start = $ip; diff --git a/src/IPv4Network/IPv4NetworkComparator.php b/src/IPv4Network/IPv4NetworkComparator.php index e71bc7a..96cb0d3 100644 --- a/src/IPv4Network/IPv4NetworkComparator.php +++ b/src/IPv4Network/IPv4NetworkComparator.php @@ -20,9 +20,6 @@ class IPv4NetworkComparator */ private $network; - /** - * @param IPv4Network $network - */ public function __construct(IPv4Network $network) { $this->network = $network; @@ -31,8 +28,6 @@ public function __construct(IPv4Network $network) /** * Checks if this network is equal to the specified network. * - * @param IPv4Network $interval - * * @return bool */ public function equal(IPv4Network $interval) @@ -46,8 +41,6 @@ public function equal(IPv4Network $interval) /** * Does this network contain the specified IP. * - * @param IPv4NetworkPoint $point - * * @return bool */ public function contains(IPv4NetworkPoint $point) @@ -58,8 +51,6 @@ public function contains(IPv4NetworkPoint $point) /** * Does this network intersect the specified network. * - * @param IPv4Network $network - * * @return bool */ public function intersects(IPv4Network $network) @@ -77,8 +68,6 @@ public function intersects(IPv4Network $network) /** * Does this network abut with the network specified. * - * @param IPv4Network $network - * * @return bool */ public function abuts(IPv4Network $network) diff --git a/src/IPv6/IPv6Interval.php b/src/IPv6/IPv6Interval.php index 133f0fb..47b71f5 100644 --- a/src/IPv6/IPv6Interval.php +++ b/src/IPv6/IPv6Interval.php @@ -52,11 +52,6 @@ class IPv6Interval implements ComparableIntervalInterface */ private $end; - /** - * @param IPv6IntervalPoint $start - * @param IPv6IntervalPoint $end - * @param IntervalType $type - */ private function __construct(IPv6IntervalPoint $start, IPv6IntervalPoint $end, IntervalType $type) { if ($start->gte($end)) { @@ -72,7 +67,6 @@ private function __construct(IPv6IntervalPoint $start, IPv6IntervalPoint $end, I /** * @param string $start * @param string $end - * @param IntervalType $type * * @return self */ @@ -350,8 +344,6 @@ public function withEnd(IntervalPointInterface $end) /** * Returns a copy of this Interval with the interval type altered. * - * @param IntervalType $type - * * @return self */ public function withType(IntervalType $type) diff --git a/src/IPv6Network/IPv6Network.php b/src/IPv6Network/IPv6Network.php index dbf5600..6d22428 100644 --- a/src/IPv6Network/IPv6Network.php +++ b/src/IPv6Network/IPv6Network.php @@ -51,7 +51,6 @@ class IPv6Network private $comparator; /** - * @param IPv6NetworkPoint $ip * @param int $mask */ private function __construct(IPv6NetworkPoint $ip, $mask) diff --git a/src/IPv6Network/IPv6NetworkComparator.php b/src/IPv6Network/IPv6NetworkComparator.php index dc73e9e..7df0615 100644 --- a/src/IPv6Network/IPv6NetworkComparator.php +++ b/src/IPv6Network/IPv6NetworkComparator.php @@ -20,9 +20,6 @@ class IPv6NetworkComparator */ private $network; - /** - * @param IPv6Network $network - */ public function __construct(IPv6Network $network) { $this->network = $network; @@ -31,8 +28,6 @@ public function __construct(IPv6Network $network) /** * Checks if this network is equal to the specified network. * - * @param IPv6Network $interval - * * @return bool */ public function equal(IPv6Network $interval) @@ -46,8 +41,6 @@ public function equal(IPv6Network $interval) /** * Does this network contain the specified IP. * - * @param IPv6NetworkPoint $point - * * @return bool */ public function contains(IPv6NetworkPoint $point) @@ -61,8 +54,6 @@ public function contains(IPv6NetworkPoint $point) /** * Does this network intersect the specified network. * - * @param IPv6Network $network - * * @return bool */ public function intersects(IPv6Network $network) @@ -80,8 +71,6 @@ public function intersects(IPv6Network $network) /** * Does this network abut with the network specified. * - * @param IPv6Network $network - * * @return bool */ public function abuts(IPv6Network $network) diff --git a/src/IntervalComparator.php b/src/IntervalComparator.php index aa941c0..17d4f6f 100644 --- a/src/IntervalComparator.php +++ b/src/IntervalComparator.php @@ -20,9 +20,6 @@ class IntervalComparator */ private $interval; - /** - * @param ComparableIntervalInterface $interval - */ public function __construct(ComparableIntervalInterface $interval) { $this->interval = $interval; @@ -31,8 +28,6 @@ public function __construct(ComparableIntervalInterface $interval) /** * Checks if this Interval is equal to the specified interval. * - * @param ComparableIntervalInterface $interval - * * @return bool */ public function equal(ComparableIntervalInterface $interval) @@ -47,8 +42,6 @@ public function equal(ComparableIntervalInterface $interval) /** * Does this interval contain the specified point. * - * @param IntervalPointInterface $point - * * @return bool */ public function contains(IntervalPointInterface $point) @@ -67,8 +60,6 @@ public function contains(IntervalPointInterface $point) /** * Does this interval intersect the specified interval. * - * @param ComparableIntervalInterface $interval - * * @return bool */ public function intersects(ComparableIntervalInterface $interval) @@ -94,8 +85,6 @@ public function intersects(ComparableIntervalInterface $interval) /** * Gets the intersection between this interval and another interval. * - * @param ComparableIntervalInterface $interval - * * @return ComparableIntervalInterface|null */ public function intersection(ComparableIntervalInterface $interval) @@ -145,8 +134,6 @@ public function intersection(ComparableIntervalInterface $interval) /** * Gets the covered interval between this Interval and another interval. * - * @param ComparableIntervalInterface $interval - * * @return ComparableIntervalInterface */ public function cover(ComparableIntervalInterface $interval) @@ -186,8 +173,6 @@ public function cover(ComparableIntervalInterface $interval) /** * Gets the gap between this interval and another interval. * - * @param ComparableIntervalInterface $interval - * * @return ComparableIntervalInterface|null */ public function gap(ComparableIntervalInterface $interval) @@ -232,8 +217,6 @@ public function gap(ComparableIntervalInterface $interval) /** * Does this interval abuts with the interval specified. * - * @param ComparableIntervalInterface $interval - * * @return bool */ public function abuts(ComparableIntervalInterface $interval) @@ -247,8 +230,6 @@ public function abuts(ComparableIntervalInterface $interval) /** * Joins the interval between the adjacent. * - * @param ComparableIntervalInterface $interval - * * @return ComparableIntervalInterface|null */ public function join(ComparableIntervalInterface $interval) @@ -263,8 +244,6 @@ public function join(ComparableIntervalInterface $interval) /** * Gets the union between this interval and another interval. * - * @param ComparableIntervalInterface $interval - * * @return ComparableIntervalInterface|null */ public function union(ComparableIntervalInterface $interval) @@ -279,8 +258,6 @@ public function union(ComparableIntervalInterface $interval) /** * The point is before the interval. * - * @param IntervalPointInterface $point - * * @return bool */ public function before(IntervalPointInterface $point) @@ -295,8 +272,6 @@ public function before(IntervalPointInterface $point) /** * The point is after the interval. * - * @param IntervalPointInterface $point - * * @return bool */ public function after(IntervalPointInterface $point) diff --git a/src/IntervalType.php b/src/IntervalType.php index f8203f4..23d961a 100644 --- a/src/IntervalType.php +++ b/src/IntervalType.php @@ -261,8 +261,6 @@ public function format($start, $end) } /** - * @param IntervalInterface $interval - * * @return string */ public function formatInterval(IntervalInterface $interval) @@ -273,8 +271,6 @@ public function formatInterval(IntervalInterface $interval) /** * @deprecated It's will be removed in later. You must use formatInterval() * - * @param IntervalInterface $interval - * * @return string */ public function getReadable(IntervalInterface $interval) diff --git a/src/Month/MonthInterval.php b/src/Month/MonthInterval.php index fa7bb2e..8b77d06 100644 --- a/src/Month/MonthInterval.php +++ b/src/Month/MonthInterval.php @@ -52,11 +52,6 @@ class MonthInterval implements ComparableIntervalInterface */ private $end; - /** - * @param MonthIntervalPoint $start - * @param MonthIntervalPoint $end - * @param IntervalType $type - */ private function __construct(MonthIntervalPoint $start, MonthIntervalPoint $end, IntervalType $type) { if ($start->gte($end)) { @@ -70,10 +65,6 @@ private function __construct(MonthIntervalPoint $start, MonthIntervalPoint $end, } /** - * @param \DateTime $start - * @param \DateTime $end - * @param IntervalType $type - * * @return self */ public static function create(\DateTime $start, \DateTime $end, IntervalType $type) @@ -82,9 +73,6 @@ public static function create(\DateTime $start, \DateTime $end, IntervalType $ty } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function closed(\DateTime $start, \DateTime $end) @@ -93,9 +81,6 @@ public static function closed(\DateTime $start, \DateTime $end) } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function halfClosed(\DateTime $start, \DateTime $end) @@ -104,9 +89,6 @@ public static function halfClosed(\DateTime $start, \DateTime $end) } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function halfOpen(\DateTime $start, \DateTime $end) @@ -115,9 +97,6 @@ public static function halfOpen(\DateTime $start, \DateTime $end) } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function open(\DateTime $start, \DateTime $end) @@ -168,8 +147,6 @@ public function equal(self $interval) /** * Does this interval contain the specified point. * - * @param \DateTime $point - * * @return bool */ public function contains(\DateTime $point) @@ -264,8 +241,6 @@ public function union(self $interval) /** * The point is before the interval. * - * @param \DateTime $point - * * @return bool */ public function before(\DateTime $point) @@ -276,8 +251,6 @@ public function before(\DateTime $point) /** * The point is after the interval. * - * @param \DateTime $point - * * @return bool */ public function after(\DateTime $point) @@ -286,8 +259,6 @@ public function after(\DateTime $point) } /** - * @param \DateInterval|null $step - * * @return \Generator */ public function iterate(\DateInterval $step = null) @@ -308,8 +279,6 @@ public function iterate(\DateInterval $step = null) } /** - * @param \DateInterval|null $step - * * @return \DatePeriod */ public function period(\DateInterval $step = null) @@ -386,8 +355,6 @@ public function withEnd(IntervalPointInterface $end) /** * Returns a copy of this Interval with the interval type altered. * - * @param IntervalType $type - * * @return self */ public function withType(IntervalType $type) diff --git a/src/Month/MonthIntervalPoint.php b/src/Month/MonthIntervalPoint.php index d70fc61..6489011 100644 --- a/src/Month/MonthIntervalPoint.php +++ b/src/Month/MonthIntervalPoint.php @@ -19,9 +19,6 @@ class MonthIntervalPoint extends BaseIntervalPoint */ private $month; - /** - * @param \DateTime $date - */ public function __construct(\DateTime $date) { $this->month = clone $date; diff --git a/src/Number/NumberInterval.php b/src/Number/NumberInterval.php index ef0a3f4..1a169b3 100644 --- a/src/Number/NumberInterval.php +++ b/src/Number/NumberInterval.php @@ -52,11 +52,6 @@ class NumberInterval implements ComparableIntervalInterface */ private $end; - /** - * @param NumberIntervalPoint $start - * @param NumberIntervalPoint $end - * @param IntervalType $type - */ private function __construct(NumberIntervalPoint $start, NumberIntervalPoint $end, IntervalType $type) { if ($start->gte($end)) { @@ -72,7 +67,6 @@ private function __construct(NumberIntervalPoint $start, NumberIntervalPoint $en /** * @param int|float $start * @param int|float $end - * @param IntervalType $type * * @return self */ @@ -368,8 +362,6 @@ public function withEnd(IntervalPointInterface $end) /** * Returns a copy of this Interval with the interval type altered. * - * @param IntervalType $type - * * @return self */ public function withType(IntervalType $type) diff --git a/src/Persistence/Doctrine/DBAL/Types/BaseType.php b/src/Persistence/Doctrine/DBAL/Types/BaseType.php index fee1010..32faa5e 100644 --- a/src/Persistence/Doctrine/DBAL/Types/BaseType.php +++ b/src/Persistence/Doctrine/DBAL/Types/BaseType.php @@ -20,9 +20,8 @@ abstract class BaseType extends TextType { /** * @param IntervalInterface|null $value - * @param AbstractPlatform $platform * - * @return null|string + * @return string|null */ public function convertToDatabaseValue($value, AbstractPlatform $platform) { @@ -35,9 +34,8 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform) * @throws ConversionException * * @param mixed $value - * @param AbstractPlatform $platform * - * @return null|IntervalInterface + * @return IntervalInterface|null */ public function convertToPHPValue($value, AbstractPlatform $platform) { diff --git a/src/Time/TimeInterval.php b/src/Time/TimeInterval.php index e948211..c8a81b7 100644 --- a/src/Time/TimeInterval.php +++ b/src/Time/TimeInterval.php @@ -52,11 +52,6 @@ class TimeInterval implements ComparableIntervalInterface */ private $end; - /** - * @param TimeIntervalPoint $start - * @param TimeIntervalPoint $end - * @param IntervalType $type - */ private function __construct(TimeIntervalPoint $start, TimeIntervalPoint $end, IntervalType $type) { if ($start->gte($end)) { @@ -70,10 +65,6 @@ private function __construct(TimeIntervalPoint $start, TimeIntervalPoint $end, I } /** - * @param \DateTime $start - * @param \DateTime $end - * @param IntervalType $type - * * @return self */ public static function create(\DateTime $start, \DateTime $end, IntervalType $type) @@ -82,9 +73,6 @@ public static function create(\DateTime $start, \DateTime $end, IntervalType $ty } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function closed(\DateTime $start, \DateTime $end) @@ -93,9 +81,6 @@ public static function closed(\DateTime $start, \DateTime $end) } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function halfClosed(\DateTime $start, \DateTime $end) @@ -104,9 +89,6 @@ public static function halfClosed(\DateTime $start, \DateTime $end) } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function halfOpen(\DateTime $start, \DateTime $end) @@ -115,9 +97,6 @@ public static function halfOpen(\DateTime $start, \DateTime $end) } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function open(\DateTime $start, \DateTime $end) @@ -168,8 +147,6 @@ public function equal(self $interval) /** * Does this interval contain the specified point. * - * @param \DateTime $point - * * @return bool */ public function contains(\DateTime $point) @@ -264,8 +241,6 @@ public function union(self $interval) /** * The point is before the interval. * - * @param \DateTime $point - * * @return bool */ public function before(\DateTime $point) @@ -276,8 +251,6 @@ public function before(\DateTime $point) /** * The point is after the interval. * - * @param \DateTime $point - * * @return bool */ public function after(\DateTime $point) @@ -286,8 +259,6 @@ public function after(\DateTime $point) } /** - * @param \DateInterval|null $step - * * @return \Generator */ public function iterate(\DateInterval $step = null) @@ -308,8 +279,6 @@ public function iterate(\DateInterval $step = null) } /** - * @param \DateInterval|null $step - * * @return \DatePeriod */ public function period(\DateInterval $step = null) @@ -386,8 +355,6 @@ public function withEnd(IntervalPointInterface $end) /** * Returns a copy of this Interval with the interval type altered. * - * @param IntervalType $type - * * @return self */ public function withType(IntervalType $type) diff --git a/src/Time/TimeIntervalPoint.php b/src/Time/TimeIntervalPoint.php index e5db9fd..d528a88 100644 --- a/src/Time/TimeIntervalPoint.php +++ b/src/Time/TimeIntervalPoint.php @@ -19,9 +19,6 @@ class TimeIntervalPoint extends BaseIntervalPoint */ private $date; - /** - * @param \DateTime $date - */ public function __construct(\DateTime $date) { $this->date = clone $date; diff --git a/src/Week/WeekInterval.php b/src/Week/WeekInterval.php index 85acda2..1acee41 100644 --- a/src/Week/WeekInterval.php +++ b/src/Week/WeekInterval.php @@ -52,11 +52,6 @@ class WeekInterval implements ComparableIntervalInterface */ private $end; - /** - * @param WeekIntervalPoint $start - * @param WeekIntervalPoint $end - * @param IntervalType $type - */ private function __construct(WeekIntervalPoint $start, WeekIntervalPoint $end, IntervalType $type) { if ($start->gte($end)) { @@ -70,10 +65,6 @@ private function __construct(WeekIntervalPoint $start, WeekIntervalPoint $end, I } /** - * @param \DateTime $start - * @param \DateTime $end - * @param IntervalType $type - * * @return self */ public static function create(\DateTime $start, \DateTime $end, IntervalType $type) @@ -82,9 +73,6 @@ public static function create(\DateTime $start, \DateTime $end, IntervalType $ty } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function closed(\DateTime $start, \DateTime $end) @@ -93,9 +81,6 @@ public static function closed(\DateTime $start, \DateTime $end) } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function halfClosed(\DateTime $start, \DateTime $end) @@ -104,9 +89,6 @@ public static function halfClosed(\DateTime $start, \DateTime $end) } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function halfOpen(\DateTime $start, \DateTime $end) @@ -115,9 +97,6 @@ public static function halfOpen(\DateTime $start, \DateTime $end) } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function open(\DateTime $start, \DateTime $end) @@ -168,8 +147,6 @@ public function equal(self $interval) /** * Does this interval contain the specified point. * - * @param \DateTime $point - * * @return bool */ public function contains(\DateTime $point) @@ -264,8 +241,6 @@ public function union(self $interval) /** * The point is before the interval. * - * @param \DateTime $point - * * @return bool */ public function before(\DateTime $point) @@ -276,8 +251,6 @@ public function before(\DateTime $point) /** * The point is after the interval. * - * @param \DateTime $point - * * @return bool */ public function after(\DateTime $point) @@ -286,8 +259,6 @@ public function after(\DateTime $point) } /** - * @param \DateInterval|null $step - * * @return \Generator */ public function iterate(\DateInterval $step = null) @@ -308,8 +279,6 @@ public function iterate(\DateInterval $step = null) } /** - * @param \DateInterval|null $step - * * @return \DatePeriod */ public function period(\DateInterval $step = null) @@ -386,8 +355,6 @@ public function withEnd(IntervalPointInterface $end) /** * Returns a copy of this Interval with the interval type altered. * - * @param IntervalType $type - * * @return self */ public function withType(IntervalType $type) diff --git a/src/Week/WeekIntervalPoint.php b/src/Week/WeekIntervalPoint.php index 60274c7..d2445da 100644 --- a/src/Week/WeekIntervalPoint.php +++ b/src/Week/WeekIntervalPoint.php @@ -19,9 +19,6 @@ class WeekIntervalPoint extends BaseIntervalPoint */ private $week; - /** - * @param \DateTime $date - */ public function __construct(\DateTime $date) { $this->week = $this->getMondayThisWeek($date)->setTime(0, 0, 0); @@ -32,8 +29,6 @@ public function __construct(\DateTime $date) * * @see https://bugs.php.net/bug.php?id=63740 * - * @param \DateTime $date - * * @return \DateTime */ private function getMondayThisWeek(\DateTime $date) diff --git a/src/Year/YearInterval.php b/src/Year/YearInterval.php index f06cdfd..271d4e0 100644 --- a/src/Year/YearInterval.php +++ b/src/Year/YearInterval.php @@ -52,11 +52,6 @@ class YearInterval implements ComparableIntervalInterface */ private $end; - /** - * @param YearIntervalPoint $start - * @param YearIntervalPoint $end - * @param IntervalType $type - */ private function __construct(YearIntervalPoint $start, YearIntervalPoint $end, IntervalType $type) { if ($start->gte($end)) { @@ -70,10 +65,6 @@ private function __construct(YearIntervalPoint $start, YearIntervalPoint $end, I } /** - * @param \DateTime $start - * @param \DateTime $end - * @param IntervalType $type - * * @return self */ public static function create(\DateTime $start, \DateTime $end, IntervalType $type) @@ -82,9 +73,6 @@ public static function create(\DateTime $start, \DateTime $end, IntervalType $ty } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function closed(\DateTime $start, \DateTime $end) @@ -93,9 +81,6 @@ public static function closed(\DateTime $start, \DateTime $end) } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function halfClosed(\DateTime $start, \DateTime $end) @@ -104,9 +89,6 @@ public static function halfClosed(\DateTime $start, \DateTime $end) } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function halfOpen(\DateTime $start, \DateTime $end) @@ -115,9 +97,6 @@ public static function halfOpen(\DateTime $start, \DateTime $end) } /** - * @param \DateTime $start - * @param \DateTime $end - * * @return self */ public static function open(\DateTime $start, \DateTime $end) @@ -168,8 +147,6 @@ public function equal(self $interval) /** * Does this interval contain the specified point. * - * @param \DateTime $point - * * @return bool */ public function contains(\DateTime $point) @@ -264,8 +241,6 @@ public function union(self $interval) /** * The point is before the interval. * - * @param \DateTime $point - * * @return bool */ public function before(\DateTime $point) @@ -276,8 +251,6 @@ public function before(\DateTime $point) /** * The point is after the interval. * - * @param \DateTime $point - * * @return bool */ public function after(\DateTime $point) @@ -286,8 +259,6 @@ public function after(\DateTime $point) } /** - * @param \DateInterval|null $step - * * @return \Generator */ public function iterate(\DateInterval $step = null) @@ -308,8 +279,6 @@ public function iterate(\DateInterval $step = null) } /** - * @param \DateInterval|null $step - * * @return \DatePeriod */ public function period(\DateInterval $step = null) @@ -386,8 +355,6 @@ public function withEnd(IntervalPointInterface $end) /** * Returns a copy of this Interval with the interval type altered. * - * @param IntervalType $type - * * @return self */ public function withType(IntervalType $type) diff --git a/src/Year/YearIntervalPoint.php b/src/Year/YearIntervalPoint.php index f67089d..9c2b199 100644 --- a/src/Year/YearIntervalPoint.php +++ b/src/Year/YearIntervalPoint.php @@ -19,9 +19,6 @@ class YearIntervalPoint extends BaseIntervalPoint */ private $year; - /** - * @param \DateTime $date - */ public function __construct(\DateTime $date) { $this->year = clone $date; diff --git a/tests/Persistence/Doctrine/DBAL/Types/IntervalTypeTest.php b/tests/Persistence/Doctrine/DBAL/Types/IntervalTypeTest.php index 7eeb753..af92b60 100644 --- a/tests/Persistence/Doctrine/DBAL/Types/IntervalTypeTest.php +++ b/tests/Persistence/Doctrine/DBAL/Types/IntervalTypeTest.php @@ -85,7 +85,6 @@ public function getTypeNames() /** * @dataProvider getTypeNames * - * @param BaseType $type * @param string $name */ public function testGetName(BaseType $type, $name) @@ -113,8 +112,6 @@ public function getTypes() /** * @dataProvider getTypes - * - * @param BaseType $type */ public function testConvertToDatabaseValueNull(BaseType $type) { @@ -123,8 +120,6 @@ public function testConvertToDatabaseValueNull(BaseType $type) /** * @dataProvider getTypes - * - * @param BaseType $type */ public function testConvertToPHPValueNull(BaseType $type) { @@ -188,7 +183,6 @@ public function getTypeIntervals() /** * @dataProvider getTypeIntervals * - * @param BaseType $type * @param string $class * @param string $interval */ @@ -202,7 +196,6 @@ public function testConvertToDatabaseValue(BaseType $type, $class, $interval) /** * @dataProvider getTypeIntervals * - * @param BaseType $type * @param string $class * @param string $interval */ @@ -226,8 +219,6 @@ private function getInterval($class, $interval) /** * @dataProvider getTypes - * - * @param BaseType $type */ public function testRequiresSQLCommentHint(BaseType $type) {