Skip to content

Commit

Permalink
Use FQCN for in_array()
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls authored Aug 14, 2021
1 parent a1bd865 commit 4d88560
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Carbon/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public function __call($name, $arguments)
return \in_array($parameter->getName(), ['tz', 'timezone'], true);
});

if (isset($arguments[0]) && in_array($name, ['instance', 'make', 'create', 'parse'], true)) {
if (isset($arguments[0]) && \in_array($name, ['instance', 'make', 'create', 'parse'], true)) {
if ($arguments[0] instanceof DateTimeInterface) {
$settings['innerTimezone'] = $settings['timezone'];
} elseif (\is_string($arguments[0]) && date_parse($arguments[0])['is_localtime']) {
Expand Down

0 comments on commit 4d88560

Please sign in to comment.