src/Thaidate.php
Avoid too many return
statements within this method. Open
Open
return $format;
Argument 2 (replace)
is int
but \str_replace()
takes array|string
Open
Open
return str_replace('y', $year, $format);
- Exclude checks
Argument 2 (replace)
is float|int
but \str_replace()
takes array|string
Open
Open
return str_replace('o', (date('o', $timestamp) + 543), $format);
- Exclude checks
When fetching an array index from a value of type array{0:'อา.',1:'จ.',2:'อ.',3:'พ.',4:'พฤ.',5:'ศ.',6:'ส.'},
found an array index of type false|string,
but expected the index to be of type int
Open
Open
return str_replace('D', $this->shortDays[$this->dayNum($timestamp)], $format);
- Exclude checks
Doc-block of monthNum
contains declared return type string
which is incompatible with the return type int
declared in the signature Open
Open
* @return false|int|string
- Exclude checks
When fetching an array index from a value of type array{0:'อาทิตย์',1:'จันทร์',2:'อังคาร',3:'พุธ',4:'พฤหัสบดี',5:'ศุกร์',6:'เสาร์'},
found an array index of type false|string,
but expected the index to be of type int
Open
Open
return str_replace('l', $this->longDays[$this->dayNum($timestamp)], $format);
- Exclude checks
Doc-block of monthNum
contains declared return type false
which is incompatible with the return type int
declared in the signature Open
Open
* @return false|int|string
- Exclude checks
Argument 2 (replace)
is float|int
but \str_replace()
takes array|string
Open
Open
return str_replace('Y', (date('Y', $timestamp) + 543), $format);
- Exclude checks
The closing brace for the class must go on the next line after the body Open
Open
}
- Exclude checks
Blank line found at start of control structure Open
Open
if (str_contains($format, 'y')) {
- Exclude checks
Line exceeds 120 characters; contains 123 characters Open
Open
* @param string $format The format as same as PHP date function format. See http://php.net/manual/en/function.date.php
- Exclude checks
Line exceeds 120 characters; contains 172 characters Open
Open
public $longDays = ['อาทิตย์', 'จันทร์', 'อังคาร', 'พุธ', 'พฤหัสบดี', 'ศุกร์', 'เสาร์'];
- Exclude checks