Skip to content

Commit

Permalink
Update vendor dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Roach committed May 18, 2019
1 parent 4facfbd commit 099a3d7
Show file tree
Hide file tree
Showing 19 changed files with 80 additions and 60 deletions.
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -1591,17 +1591,17 @@
},
{
"name": "nesbot/carbon",
"version": "2.17.1",
"version_normalized": "2.17.1.0",
"version": "2.18.0",
"version_normalized": "2.18.0.0",
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
"reference": "96acbc0c03782e8115156dd4dd8b736267155066"
"reference": "8322b7bd1805be31867c13bf3cdaab948a0dd406"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/96acbc0c03782e8115156dd4dd8b736267155066",
"reference": "96acbc0c03782e8115156dd4dd8b736267155066",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8322b7bd1805be31867c13bf3cdaab948a0dd406",
"reference": "8322b7bd1805be31867c13bf3cdaab948a0dd406",
"shasum": ""
},
"require": {
Expand All @@ -1617,7 +1617,7 @@
"phpunit/phpunit": "^7.5 || ^8.0",
"squizlabs/php_codesniffer": "^3.4"
},
"time": "2019-04-27T18:04:27+00:00",
"time": "2019-05-16T18:44:35+00:00",
"type": "library",
"extra": {
"laravel": {
Expand Down
3 changes: 2 additions & 1 deletion vendor/nesbot/carbon/src/Carbon/CarbonInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -496,12 +496,13 @@
interface CarbonInterface extends DateTimeInterface, JsonSerializable
{
/**
* Diff wording options.
* Diff wording options(expressed in octal).
*/
public const NO_ZERO_DIFF = 01;
public const JUST_NOW = 02;
public const ONE_DAY_WORDS = 04;
public const TWO_DAY_WORDS = 010;
public const SEQUENTIAL_PARTS_ONLY = 020;

/**
* Diff syntax options.
Expand Down
2 changes: 2 additions & 0 deletions vendor/nesbot/carbon/src/Carbon/CarbonInterval.php
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,8 @@ public function forHumans($syntax = null, $short = false, $parts = -1, $options
$unit = $short ? $diffIntervalData['unitShort'] : $diffIntervalData['unit'];
$count = $diffIntervalData['value'];
$interval[] = $transChoice($short, $diffIntervalData);
} elseif ($options & CarbonInterface::SEQUENTIAL_PARTS_ONLY && count($interval) > 0) {
break;
}

// break the loop after we get the required number of parts in array
Expand Down
6 changes: 3 additions & 3 deletions vendor/nesbot/carbon/src/Carbon/CarbonTimeZone.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ public function toOffsetName(DateTimeInterface $date = null)

$hours = floor($minutes / 60);

$minutes = str_pad(abs($minutes) % 60, 2, '0', STR_PAD_LEFT);
$minutes = str_pad((string) (abs($minutes) % 60), 2, '0', STR_PAD_LEFT);

return ($hours < 0 ? '-' : '+').str_pad(abs($hours), 2, '0', STR_PAD_LEFT).":$minutes";
return ($hours < 0 ? '-' : '+').str_pad((string) abs($hours), 2, '0', STR_PAD_LEFT).":$minutes";
}

/**
Expand Down Expand Up @@ -161,7 +161,7 @@ public function toRegionName(DateTimeInterface $date = null, $isDst = 1)
return $name;
}

return @timezone_name_from_abbr(null, $this->getOffset($date ?: Carbon::now($this)), $isDst);
return @timezone_name_from_abbr('', @$this->getOffset($date ?: Carbon::now($this)) ?: 0, $isDst);
}

/**
Expand Down
5 changes: 3 additions & 2 deletions vendor/nesbot/carbon/src/Carbon/Lang/id.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* - du
* - JD Isaacks
* - Nafies Luthfi
* - Raymundus Jati Primanda (mundusjp)
*/
return [
'year' => ':count tahun',
Expand All @@ -40,8 +41,8 @@
's' => ':countdt',
'ago' => ':time yang lalu',
'from_now' => 'dalam :time',
'after' => ':time setelah',
'before' => ':time sebelum',
'after' => ':time setelahnya',
'before' => ':time sebelumnya',
'formats' => [
'LT' => 'HH.mm',
'LTS' => 'HH.mm.ss',
Expand Down
7 changes: 5 additions & 2 deletions vendor/nesbot/carbon/src/Carbon/Lang/pl.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
* - Jan
* - Paul
* - damlys
* - Marek marast78
* - Marek (marast78)
* - Peter (UnrulyNatives)
*/
return [
'year' => ':count rok|:count lata|:count lat',
Expand Down Expand Up @@ -89,8 +90,10 @@
'sameElse' => 'L',
],
'ordinal' => ':number.',
'months' => ['styczeń', 'luty', 'marzec', 'kwiecień', 'maj', 'czerwiec', 'lipiec', 'sierpień', 'wrzesień', 'październik', 'listopad', 'grudzień'],
'months' => ['stycznia', 'lutego', 'marca', 'kwietnia', 'maja', 'czerwca', 'lipca', 'sierpnia', 'września', 'października', 'listopada', 'grudnia'],
'months_standalone' => ['styczeń', 'luty', 'marzec', 'kwiecień', 'maj', 'czerwiec', 'lipiec', 'sierpień', 'wrzesień', 'październik', 'listopad', 'grudzień'],
'months_short' => ['sty', 'lut', 'mar', 'kwi', 'maj', 'cze', 'lip', 'sie', 'wrz', 'paź', 'lis', 'gru'],
'months_regexp' => '/DD?o?\.?(\[[^\[\]]*\]|\s)+MMMM?/',
'weekdays' => ['niedziela', 'poniedziałek', 'wtorek', 'środa', 'czwartek', 'piątek', 'sobota'],
'weekdays_short' => ['ndz', 'pon', 'wt', 'śr', 'czw', 'pt', 'sob'],
'weekdays_min' => ['Nd', 'Pn', 'Wt', 'Śr', 'Cz', 'Pt', 'So'],
Expand Down
3 changes: 2 additions & 1 deletion vendor/nesbot/carbon/src/Carbon/Lang/sv.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* - Kristoffer Snabb
* - JD Isaacks
* - Jens Herlevsen
* - Nightpine
*/
return [
'year' => ':count år',
Expand Down Expand Up @@ -72,7 +73,7 @@
'months' => ['januari', 'februari', 'mars', 'april', 'maj', 'juni', 'juli', 'augusti', 'september', 'oktober', 'november', 'december'],
'months_short' => ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
'weekdays' => ['söndag', 'måndag', 'tisdag', 'onsdag', 'torsdag', 'fredag', 'lördag'],
'weekdays_short' => ['sön', 'mån', 'tis', 'ons', 'tor', 'fre', 'lör'],
'weekdays_short' => ['sön', 'mån', 'tis', 'ons', 'tors', 'fre', 'lör'],
'weekdays_min' => ['', '', 'ti', 'on', 'to', 'fr', ''],
'first_day_of_week' => 1,
'day_of_first_week_of_year' => 4,
Expand Down
15 changes: 8 additions & 7 deletions vendor/nesbot/carbon/src/Carbon/Lang/uk.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,28 +47,29 @@
* - alecrabbit
* - vystepanenko
* - AlexWalkerson
* - Andre Havryliuk (Andrend)
*/
return [
'year' => ':count рік|:count роки|:count років',
'y' => ':count рік|:count роки|:count років',
'y' => ':countр',
'a_year' => '{1}рік|:count рік|:count роки|:count років',
'month' => ':count місяць|:count місяці|:count місяців',
'm' => ':count місяць|:count місяці|:count місяців',
'm' => ':countм',
'a_month' => '{1}місяць|:count місяць|:count місяці|:count місяців',
'week' => ':count тиждень|:count тижні|:count тижнів',
'w' => ':count тиждень|:count тижні|:count тижнів',
'w' => ':countт',
'a_week' => '{1}тиждень|:count тиждень|:count тижні|:count тижнів',
'day' => ':count день|:count дні|:count днів',
'd' => ':count день|:count дні|:count днів',
'd' => ':countд',
'a_day' => '{1}день|:count день|:count дні|:count днів',
'hour' => ':count година|:count години|:count годин',
'h' => ':count година|:count години|:count годин',
'h' => ':countг',
'a_hour' => '{1}годину|:count година|:count години|:count годин',
'minute' => ':count хвилина|:count хвилини|:count хвилин',
'min' => ':count хвилина|:count хвилини|:count хвилин',
'min' => ':countхв',
'a_minute' => '{1}хвилина|:count хвилину|:count хвилини|:count хвилин',
'second' => ':count секунда|:count секунди|:count секунд',
's' => ':count секунда|:count секунди|:count секунд',
's' => ':countсек',
'a_second' => '{1}кілька секунд|:count секунду|:count секунди|:count секунд',
'ago' => ':time тому',
'from_now' => 'за :time',
Expand Down
2 changes: 2 additions & 0 deletions vendor/nesbot/carbon/src/Carbon/Lang/zh_CN.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
's' => ':count秒',
'ago' => ':time前',
'from_now' => ':time内',
'after' => ':time后',
'before' => ':time前',
'diff_yesterday' => '昨天',
'diff_tomorrow' => '明天',
'formats' => [
Expand Down
2 changes: 2 additions & 0 deletions vendor/nesbot/carbon/src/Carbon/Lang/zh_MO.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
's' => ':count秒',
'ago' => ':time前',
'from_now' => ':time內',
'after' => ':time后',
'before' => ':time前',
'diff_yesterday' => '昨天',
'diff_tomorrow' => '明天',
'formats' => [
Expand Down
14 changes: 9 additions & 5 deletions vendor/nesbot/carbon/src/Carbon/Traits/Creator.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public function __construct($time = null, $tz = null)
// If the class has a test now set and we are trying to create a now()
// instance then override as required
$isNow = empty($time) || $time === 'now';

if (method_exists(static::class, 'hasTestNow') &&
method_exists(static::class, 'getTestNow') &&
static::hasTestNow() &&
Expand All @@ -73,10 +74,13 @@ public function __construct($time = null, $tz = null)
$locale = setlocale(LC_NUMERIC, '0');
setlocale(LC_NUMERIC, 'C');
}
parent::__construct($time, $timezone);

parent::__construct($time ?: 'now', $timezone);

if (isset($locale)) {
setlocale(LC_NUMERIC, $locale);
}

static::setLastErrors(parent::getLastErrors());
}

Expand Down Expand Up @@ -299,7 +303,7 @@ public static function create($year = 0, $month = 1, $day = 1, $hour = 0, $minut
$day = $day === null ? $getDefault('day') : $day;
$hour = $hour === null ? $getDefault('hour') : $hour;
$minute = $minute === null ? $getDefault('minute') : $minute;
$second = $second === null ? $getDefault('second') : $second;
$second = (float) ($second === null ? $getDefault('second') : $second);

$fixYear = null;

Expand Down Expand Up @@ -459,11 +463,11 @@ private static function createFromFormatAndTimezone($format, $time, $originalTz)
// @codeCoverageIgnoreEnd

if ($originalTz === null) {
return parent::createFromFormat($format, $time);
return parent::createFromFormat($format, "$time");
}

$tz = is_int($originalTz)
? @timezone_name_from_abbr(null, floatval($originalTz * 3600), 1)
? @timezone_name_from_abbr('', (int) ($originalTz * 3600), 1)
: $originalTz;

$tz = static::safeCreateDateTimeZone($tz, $originalTz);
Expand All @@ -472,7 +476,7 @@ private static function createFromFormatAndTimezone($format, $time, $originalTz)
return false;
}

return parent::createFromFormat($format, $time, $tz);
return parent::createFromFormat($format, "$time", $tz);
}

/**
Expand Down
36 changes: 18 additions & 18 deletions vendor/nesbot/carbon/src/Carbon/Traits/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ public function set($name, $value = null)
$this->addSecond();
$value -= static::MICROSECONDS_PER_SECOND;
}
$this->modify($this->rawFormat('H:i:s.').str_pad(round($value), 6, '0', STR_PAD_LEFT));
$this->modify($this->rawFormat('H:i:s.').str_pad((string) round($value), 6, '0', STR_PAD_LEFT));
break;

case 'year':
Expand Down Expand Up @@ -1095,7 +1095,7 @@ public function set($name, $value = null)
return $this->addDays($value - $this->dayOfYear);

case 'timestamp':
parent::setTimestamp($value);
parent::setTimestamp((int) $value);
break;

case 'offset':
Expand Down Expand Up @@ -1346,7 +1346,7 @@ public function utcOffset(int $offset = null)
*/
public function setDateTime($year, $month, $day, $hour, $minute, $second = 0, $microseconds = 0)
{
return $this->setDate($year, $month, $day)->setTime($hour, $minute, $second, $microseconds);
return $this->setDate((int) $year, (int) $month, (int) $day)->setTime((int) $hour, (int) $minute, (int) $second, (int) $microseconds);
}

/**
Expand Down Expand Up @@ -1597,7 +1597,7 @@ public static function setWeekendDays($days)
*/
public static function hasRelativeKeywords($time)
{
if (strtotime($time) === false) {
if (!$time || strtotime($time) === false) {
return false;
}

Expand Down Expand Up @@ -1737,29 +1737,29 @@ public static function getIsoUnits()
's' => 'second',
'ss' => ['getPaddedUnit', ['second']],
'S' => function (CarbonInterface $date) {
return strval(floor($date->micro / 100000));
return strval((string) floor($date->micro / 100000));
},
'SS' => function (CarbonInterface $date) {
return str_pad(floor($date->micro / 10000), 2, '0', STR_PAD_LEFT);
return str_pad((string) floor($date->micro / 10000), 2, '0', STR_PAD_LEFT);
},
'SSS' => function (CarbonInterface $date) {
return str_pad(floor($date->micro / 1000), 3, '0', STR_PAD_LEFT);
return str_pad((string) floor($date->micro / 1000), 3, '0', STR_PAD_LEFT);
},
'SSSS' => function (CarbonInterface $date) {
return str_pad(floor($date->micro / 100), 4, '0', STR_PAD_LEFT);
return str_pad((string) floor($date->micro / 100), 4, '0', STR_PAD_LEFT);
},
'SSSSS' => function (CarbonInterface $date) {
return str_pad(floor($date->micro / 10), 5, '0', STR_PAD_LEFT);
return str_pad((string) floor($date->micro / 10), 5, '0', STR_PAD_LEFT);
},
'SSSSSS' => ['getPaddedUnit', ['micro', 6]],
'SSSSSSS' => function (CarbonInterface $date) {
return str_pad(floor($date->micro * 10), 7, '0', STR_PAD_LEFT);
return str_pad((string) floor($date->micro * 10), 7, '0', STR_PAD_LEFT);
},
'SSSSSSSS' => function (CarbonInterface $date) {
return str_pad(floor($date->micro * 100), 8, '0', STR_PAD_LEFT);
return str_pad((string) floor($date->micro * 100), 8, '0', STR_PAD_LEFT);
},
'SSSSSSSSS' => function (CarbonInterface $date) {
return str_pad(floor($date->micro * 1000), 9, '0', STR_PAD_LEFT);
return str_pad((string) floor($date->micro * 1000), 9, '0', STR_PAD_LEFT);
},
'M' => 'month',
'MM' => ['rawFormat', ['m']],
Expand Down Expand Up @@ -1825,7 +1825,7 @@ public static function getIsoUnits()
*/
public function getPaddedUnit($unit, $length = 2, $padString = '0', $padType = STR_PAD_LEFT)
{
return ($this->$unit < 0 ? '-' : '').str_pad(abs($this->$unit), $length, $padString, $padType);
return ($this->$unit < 0 ? '-' : '').str_pad((string) abs($this->$unit), $length, $padString, $padType);
}

/**
Expand Down Expand Up @@ -2025,7 +2025,7 @@ function ($code) {
}

$format = mb_substr($format, 0, $i).$sequence.mb_substr($format, $i + mb_strlen($code));
$i += mb_strlen($sequence) - 1;
$i += mb_strlen("$sequence") - 1;
$length = mb_strlen($format);
$char = $sequence;
}
Expand Down Expand Up @@ -2190,8 +2190,8 @@ public function getOffsetString($separator = ':')
$second = $this->getOffset();
$symbol = $second < 0 ? '-' : '+';
$minute = abs($second) / static::SECONDS_PER_MINUTE;
$hour = str_pad(floor($minute / static::MINUTES_PER_HOUR), 2, '0', STR_PAD_LEFT);
$minute = str_pad($minute % static::MINUTES_PER_HOUR, 2, '0', STR_PAD_LEFT);
$hour = str_pad((string) floor($minute / static::MINUTES_PER_HOUR), 2, '0', STR_PAD_LEFT);
$minute = str_pad((string) ($minute % static::MINUTES_PER_HOUR), 2, '0', STR_PAD_LEFT);

return "$symbol$hour$separator$minute";
}
Expand Down Expand Up @@ -2251,7 +2251,7 @@ public function setUnit($unit, $value = null)
$dateUnits = ['year', 'month', 'day'];
if (in_array($unit, $dateUnits)) {
return $this->setDate(...array_map(function ($name) use ($unit, $value) {
return $name === $unit ? $value : $this->$name;
return (int) ($name === $unit ? $value : $this->$name);
}, $dateUnits));
}

Expand All @@ -2264,7 +2264,7 @@ public function setUnit($unit, $value = null)
}

return $this->setTime(...array_map(function ($name) use ($unit, $value) {
return $name === $unit ? $value : $this->$name;
return (int) ($name === $unit ? $value : $this->$name);
}, $units));
}

Expand Down
Loading

0 comments on commit 099a3d7

Please sign in to comment.