Skip to content

Commit 0be786f

Browse files
committed
small phpdoc improvements
1 parent 312295b commit 0be786f

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

src/Provider/DeProvider.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111

1212
class DeProvider implements Provider
1313
{
14+
/**
15+
* {@inheritDoc}
16+
* @see \OpenPsa\Ranger\Provider\Provider::modifySeparator()
17+
*/
1418
public function modifySeparator(IntlDateFormatter $intl, $best_match, $separator)
1519
{
1620
if ( $best_match < Ranger::YEAR

src/Provider/DefaultProvider.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111

1212
class DefaultProvider implements Provider
1313
{
14+
/**
15+
* {@inheritDoc}
16+
* @see \OpenPsa\Ranger\Provider\Provider::modifySeparator()
17+
*/
1418
public function modifySeparator(IntlDateFormatter $intl, $best_match, $separator)
1519
{
1620
if ( $best_match != Ranger::MONTH

src/Provider/Provider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ interface Provider
1515
* @param IntlDateFormatter $intl
1616
* @param int $best_match
1717
* @param string $separator
18+
* @return string
1819
*/
1920
public function modifySeparator(IntlDateFormatter $intl, $best_match, $separator);
2021
}

src/Ranger.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ class Ranger
2828
const TIMEZONE = -1;
2929
const NO_MATCH = -2;
3030

31+
/**
32+
* @var array
33+
*/
3134
private $pattern_characters = [
3235
'G' => self::ERA,
3336
'y' => self::YEAR,
@@ -116,7 +119,7 @@ public function __construct($locale)
116119
}
117120

118121
/**
119-
* @param int $type
122+
* @param int $type One of the IntlDateFormatter constants
120123
* @return self
121124
*/
122125
public function setDateType($type)
@@ -130,7 +133,7 @@ public function setDateType($type)
130133
}
131134

132135
/**
133-
* @param int $type
136+
* @param int $type One of the IntlDateFormatter constants
134137
* @return self
135138
*/
136139
public function setTimeType($type)
@@ -247,6 +250,7 @@ private function prepare_date($input)
247250

248251
/**
249252
* @param int $best_match
253+
* @return string
250254
*/
251255
private function get_range_separator($best_match)
252256
{
@@ -377,10 +381,10 @@ private function parse_pattern()
377381
$esc_active = false;
378382
$part = ['content' => '', 'delimiter' => false];
379383
foreach (str_split($pattern) as $char) {
380-
//@todo the esc char handling is untested
381384
if ($char == $this->escape_character) {
382385
if ($esc_active) {
383386
$esc_active = false;
387+
// @todo the esc char handling is untested
384388
if ($part['content'] === '') {
385389
//Literal '
386390
$part['content'] = $char;

0 commit comments

Comments
 (0)