Skip to content

Commit 66299f5

Browse files
committed
Merge branch 'master' of github.com-minwork:minwork/array
2 parents 65a5b0e + 7de9ac5 commit 66299f5

File tree

7 files changed

+21
-3
lines changed

7 files changed

+21
-3
lines changed

SUMMARY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
## Manipulating array
2727

28-
* [Mapping](manipulating-array/untitled.md)
28+
* [Mapping](manipulating-array/mapping.md)
2929
* [Filtering](manipulating-array/filtering.md)
3030
* [Grouping](manipulating-array/grouping.md)
3131
* [Sorting](manipulating-array/sorting.md)

common-methods/get-getnestedelement.md

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ get($array, $keys, $default = null) -> getNestedElement($array, $keys, $default)
1616

1717
Get nested array element using specified keys or return `$default` value if it does not exists.
1818

19+
{% hint style="info" %}
20+
`$keys` argument is parsed using [getKeysArray ](getkeysarray.md)method
21+
{% endhint %}
22+
1923
#### Examples
2024

2125
```php

common-methods/getkeysarray.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Arr::getKeysArray(mixed $keys): array
1010

1111
Transform variable into standardised array of keys.
1212

13+
This method filters out any values that cannot be used as array key leaving only not empty strings and integers as seen in the example below.
14+
1315
{% hint style="info" %}
1416
All `$keys` arguments in other methods are normalized using this method
1517
{% endhint %}

common-methods/has.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
#### Definition
44

55
```php
6-
Arr::has(array $array, $keys): bool
6+
Arr::has(array $array, mixed $keys): bool
77
```
88

99
#### Description
1010

1111
Check if specified \(nested\) key\(s\) exists in array
1212

13+
{% hint style="info" %}
14+
`$keys` argument is parsed using [getKeysArray ](getkeysarray.md)method
15+
{% endhint %}
16+
1317
#### Examples
1418

1519
```php

common-methods/remove.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ Arr::remove(array $array, $keys): array
88

99
#### Description
1010

11-
Remove element inside array at path specified by keys
11+
Remove element inside array at path specified by keys.
12+
13+
{% hint style="info" %}
14+
`$keys` argument is parsed using [getKeysArray ](getkeysarray.md)method
15+
{% endhint %}
1216

1317
#### Examples
1418

common-methods/set-setnestedelement.md

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ set(array $array, $keys, $value) -> setNestedElement(array $array, $keys, $value
1616

1717
Set array element specified by keys to the desired value \(create missing keys if necessary\).
1818

19+
{% hint style="info" %}
20+
`$keys` argument is parsed using [getKeysArray ](getkeysarray.md)method
21+
{% endhint %}
22+
1923
#### Examples
2024

2125
```php
File renamed without changes.

0 commit comments

Comments
 (0)