File tree Expand file tree Collapse file tree 4 files changed +16
-3
lines changed Expand file tree Collapse file tree 4 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 11
11
12
12
class DeProvider implements Provider
13
13
{
14
+ /**
15
+ * {@inheritDoc}
16
+ * @see \OpenPsa\Ranger\Provider\Provider::modifySeparator()
17
+ */
14
18
public function modifySeparator (IntlDateFormatter $ intl , $ best_match , $ separator )
15
19
{
16
20
if ( $ best_match < Ranger::YEAR
Original file line number Diff line number Diff line change 11
11
12
12
class DefaultProvider implements Provider
13
13
{
14
+ /**
15
+ * {@inheritDoc}
16
+ * @see \OpenPsa\Ranger\Provider\Provider::modifySeparator()
17
+ */
14
18
public function modifySeparator (IntlDateFormatter $ intl , $ best_match , $ separator )
15
19
{
16
20
if ( $ best_match != Ranger::MONTH
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ interface Provider
15
15
* @param IntlDateFormatter $intl
16
16
* @param int $best_match
17
17
* @param string $separator
18
+ * @return string
18
19
*/
19
20
public function modifySeparator (IntlDateFormatter $ intl , $ best_match , $ separator );
20
21
}
Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ class Ranger
28
28
const TIMEZONE = -1 ;
29
29
const NO_MATCH = -2 ;
30
30
31
+ /**
32
+ * @var array
33
+ */
31
34
private $ pattern_characters = [
32
35
'G ' => self ::ERA ,
33
36
'y ' => self ::YEAR ,
@@ -116,7 +119,7 @@ public function __construct($locale)
116
119
}
117
120
118
121
/**
119
- * @param int $type
122
+ * @param int $type One of the IntlDateFormatter constants
120
123
* @return self
121
124
*/
122
125
public function setDateType ($ type )
@@ -130,7 +133,7 @@ public function setDateType($type)
130
133
}
131
134
132
135
/**
133
- * @param int $type
136
+ * @param int $type One of the IntlDateFormatter constants
134
137
* @return self
135
138
*/
136
139
public function setTimeType ($ type )
@@ -247,6 +250,7 @@ private function prepare_date($input)
247
250
248
251
/**
249
252
* @param int $best_match
253
+ * @return string
250
254
*/
251
255
private function get_range_separator ($ best_match )
252
256
{
@@ -377,10 +381,10 @@ private function parse_pattern()
377
381
$ esc_active = false ;
378
382
$ part = ['content ' => '' , 'delimiter ' => false ];
379
383
foreach (str_split ($ pattern ) as $ char ) {
380
- //@todo the esc char handling is untested
381
384
if ($ char == $ this ->escape_character ) {
382
385
if ($ esc_active ) {
383
386
$ esc_active = false ;
387
+ // @todo the esc char handling is untested
384
388
if ($ part ['content ' ] === '' ) {
385
389
//Literal '
386
390
$ part ['content ' ] = $ char ;
You can’t perform that action at this time.
0 commit comments