Skip to content

Commit

Permalink
Fix typo on phpcs ignore comments
Browse files Browse the repository at this point in the history
  • Loading branch information
diegosurita committed Jan 29, 2024
1 parent 2bfe412 commit d2e6ba4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
8 changes: 4 additions & 4 deletions lib/Cake/Test/Case/Utility/CakeTimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1178,9 +1178,9 @@ public function testI18nFormat() {
$this->assertEquals($expected, $result);

$result = $this->Time->i18nFormat($time, '%c');
// @codingStandardIgnoreStart
// @codingStandardsIgnoreStart
$expected = 'jue 14 ene 2010 13:59:28 ' . mb_convert_encoding(@strftime('%Z', $time), 'UTF-8', 'ISO-8859-1');
// @codingStandardIgnoreEnd
// @codingStandardsIgnoreEnd
$this->assertEquals($expected, $result);

$result = $this->Time->i18nFormat($time, 'Time is %r, and date is %x');
Expand All @@ -1194,9 +1194,9 @@ public function testI18nFormat() {
$this->assertEquals($expected, $result);

$result = $this->Time->i18nFormat($time, '%c');
// @codingStandardIgnoreStart
// @codingStandardsIgnoreStart
$expected = 'mié 13 ene 2010 13:59:28 ' . mb_convert_encoding(@strftime('%Z', $time), 'UTF-8', 'ISO-8859-1');
// @codingStandardIgnoreEnd
// @codingStandardsIgnoreEnd
$this->assertEquals($expected, $result);

$result = $this->Time->i18nFormat($time, 'Time is %r, and date is %x');
Expand Down
6 changes: 2 additions & 4 deletions lib/Cake/Utility/CakeTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -1167,9 +1167,9 @@ public static function listTimezones($filter = null, $country = null, $options =
* @return string formatted string with correct encoding.
*/
protected static function _strftime($format, $timestamp) {
// @codingStandardIgnoreStart
// @codingStandardsIgnoreStart
$format = @strftime($format, $timestamp);
// @codingStandardIgnoreEnd
// @codingStandardsIgnoreEnd
$encoding = Configure::read('App.encoding');
if (!empty($encoding) && $encoding === 'UTF-8') {
if (function_exists('mb_check_encoding')) {
Expand All @@ -1178,9 +1178,7 @@ protected static function _strftime($format, $timestamp) {
$valid = Multibyte::checkMultibyte($format);
}
if (!$valid) {
// @codingStandardIgnoreStart
$format = mb_convert_encoding($format, 'UTF-8', 'ISO-8859-1');
// @codingStandardIgnoreEnd
}
}
return $format;
Expand Down
8 changes: 4 additions & 4 deletions lib/Cake/View/Helper/FormHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2767,9 +2767,9 @@ protected function _getDateTimeValue($value, $timeFormat) {
}

if (is_numeric($value)) {
// @codingStandardIgnoreStart
// @codingStandardsIgnoreStart
$value = @strftime('%Y-%m-%d %H:%M:%S', $value);
// @codingStandardIgnoreEnd
// @codingStandardsIgnoreEnd
}
$meridian = 'am';
$pos = strpos($value, '-');
Expand Down Expand Up @@ -3023,9 +3023,9 @@ protected function _generateOptions($name, $options = array()) {
$data = $options['monthNames'];
} else {
for ($m = 1; $m <= 12; $m++) {
// @codingStandardIgnoreStart
// @codingStandardsIgnoreStart
$data[sprintf("%02s", $m)] = @strftime("%m", mktime(1, 1, 1, $m, 1, 1999));
// @codingStandardIgnoreEnd
// @codingStandardsIgnoreEnd
}
}
break;
Expand Down

0 comments on commit d2e6ba4

Please sign in to comment.