Skip to content

Commit f5db63c

Browse files
committed
Merge branch 'master' into 7.x
# Conflicts: # README.md
2 parents f3d92f5 + dba49d3 commit f5db63c

File tree

8 files changed

+105
-88
lines changed

8 files changed

+105
-88
lines changed

README.md

Lines changed: 88 additions & 75 deletions
Large diffs are not rendered by default.

src/array.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function array_except_value(array $array, $except)
2626

2727
if (!function_exists('multiarray_set')) {
2828
/**
29-
* Set value for each item of the multidimensional array using "dot" notation.
29+
* Set the value for each item of the multidimensional array using "dot" notation.
3030
*
3131
* @param array $multiarray
3232
* @param mixed $key

src/date.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
if (!function_exists('to_default_timezone')) {
77
/**
8-
* Convert datetime to the default timezone (`app.timezone` config parameter).
8+
* Convert the given datetime to the default timezone (see `app.timezone` config).
99
*
1010
* @param mixed $datetime
1111
* @return mixed

src/filesystem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
if (!function_exists('relative_path')) {
66
/**
7-
* Get relative path for the given folders.
7+
* Get a relative path for the given folders.
88
*
99
* @param string $to
1010
* @param string $from

src/format.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
if (!function_exists('get_dump')) {
77
/**
8-
* Get nicely formatted string representation of the variable, using Symfony VarDumper Component.
8+
* Get a nicely formatted string representation of the variable, using the Symfony VarDumper Component.
99
*
1010
* @see https://symfony.com/doc/current/components/var_dumper/introduction.html
1111
*
@@ -55,7 +55,7 @@ function format_bytes(int $bytes, int $precision = 2)
5555

5656
if (!function_exists('format_xml')) {
5757
/**
58-
* Format XML string using new lines and indents.
58+
* Format the given XML string using new lines and indents.
5959
*
6060
* @param string $xml
6161
* @return string

src/json.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
/**
55
* Check whether the given value is a valid JSON-encoded string or not.
66
*
7-
* @param mixed $string
7+
* @param mixed $value
88
* @param bool $return
99
* @return bool|array
1010
*/
11-
function is_json($string, bool $return = false)
11+
function is_json($value, bool $return = false)
1212
{
13-
if (empty($string) || !is_string($string)) {
13+
if (empty($value) || !is_string($value)) {
1414
return false;
1515
}
1616

17-
$decoded = json_decode($string, true);
17+
$decoded = json_decode($value, true);
1818
if (json_last_error() !== JSON_ERROR_NONE) {
1919
return false;
2020
}

src/str.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
if (!function_exists('str_lower')) {
44
/**
5-
* Convert string to lowercase, assuming it's using the `UTF-8` encoding.
5+
* Convert string to lowercase, assuming it's in the `UTF-8` encoding.
66
*
77
* @param string $string
88
* @return string
9+
*
10+
* @deprecated Use Illuminate\Support\Str::lower() instead.
911
*/
1012
function str_lower(string $string)
1113
{
@@ -15,10 +17,12 @@ function str_lower(string $string)
1517

1618
if (!function_exists('str_upper')) {
1719
/**
18-
* Convert string to uppercase, assuming it's using the `UTF-8` encoding.
20+
* Convert string to uppercase, assuming it's in the `UTF-8` encoding.
1921
*
2022
* @param string $string
2123
* @return string
24+
*
25+
* @deprecated Use Illuminate\Support\Str::upper() instead.
2226
*/
2327
function str_upper(string $string)
2428
{

src/xml.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
if (!function_exists('xml_to_array')) {
66
/**
7-
* Convert XML string to array.
7+
* Convert the given XML to array.
88
*
99
* @param SimpleXMLElement|string $xml
1010
* @return array
@@ -21,7 +21,7 @@ function xml_to_array($xml)
2121

2222
if (!function_exists('array_to_xml')) {
2323
/**
24-
* Convert array to XML string.
24+
* Convert the given array to XML string.
2525
*
2626
* @param array $array
2727
* @param string $rootElement

0 commit comments

Comments
 (0)