tequilarapido /
twit
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Tequilarapido\Twit; |
||
| 4 | |||
| 5 | use Carbon\Carbon; |
||
| 6 | |||
| 7 | class TwitterDates |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Parse twitter raw date. |
||
| 11 | * |
||
| 12 | * @param string $twitterDate |
||
| 13 | * |
||
| 14 | * @return Carbon|null |
||
| 15 | */ |
||
| 16 | public static function parse($twitterDate) |
||
| 17 | { |
||
| 18 | return $twitterDate ? Carbon::createFromTimestamp(strtotime($twitterDate)) : null; |
||
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Format twitter date to `Y-m-d H:i:s`. |
||
| 23 | * |
||
| 24 | * @param string $twitterDate |
||
| 25 | * @return null |
||
| 26 | */ |
||
| 27 | public static function formatToMysql($twitterDate) |
||
| 28 | { |
||
| 29 | $date = static::parseTwitterDate($twitterDate); |
||
|
0 ignored issues
–
show
|
|||
| 30 | |||
| 31 | return $date ? $date->format('Y-m-d H:i:s') : null; |
||
| 32 | } |
||
| 33 | } |
||
| 34 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.