Skip to content

Commit cd517c7

Browse files
committed
Fix some docblocks
1 parent ccf2d2a commit cd517c7

28 files changed

+49
-24
lines changed

src/Array/concat.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
* $array = [1];
2828
* $other = concat($array, 2, [3], [[4]]);
2929
*
30-
* var_dump(other)
30+
* var_dump($other)
3131
* // => [1, 2, 3, [4]]
3232
*
33-
* var_dump(array)
33+
* var_dump($array)
3434
* // => [1]
3535
* </code>
3636
*/

src/Array/flatten.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@
2222
*
2323
* @return array the new flattened array.
2424
* @example
25-
*
25+
* <code>
2626
* flatten([1, [2, [3, [4]], 5]])
2727
* // => [1, 2, [3, [4]], 5]
28+
* </code>
2829
*/
2930
function flatten(array $array = null): array
3031
{

src/Array/initial.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020
*
2121
* @return array the slice of `array`.
2222
* @example
23-
*
23+
* <code>
2424
* initial([1, 2, 3])
2525
* // => [1, 2]
26+
* </code>
2627
*/
2728
function initial(array $array): array
2829
{

src/Array/nth.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@
2222
*
2323
* @return mixed Returns the nth element of `array`.
2424
* @example
25-
*
25+
* <code>
2626
* $array = ['a', 'b', 'c', 'd']
2727
*
2828
* nth($array, 1)
2929
* // => 'b'
3030
*
3131
* nth($array, -2)
3232
* // => 'c'
33+
* </code>
3334
*/
3435
function nth(array $array, int $n)
3536
{

src/Array/pullAllBy.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@
2929
*
3030
* @return array `array`.
3131
* @example
32-
*
32+
* <code>
3333
* $array = [[ 'x' => 1 ], [ 'x' => 2 ], [ 'x' => 3 ], [ 'x' => 1 ]]
3434
*
3535
* pullAllBy($array, [[ 'x' => 1 ], [ 'x' => 3 ]], 'x')
3636
* var_dump($array)
3737
* // => [[ 'x' => 2 ]]
38+
* </code>
3839
*/
3940
function pullAllBy(array &$array, array $values, $iteratee): array
4041
{

src/Array/remove.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
* @return array the new array of removed elements.
2828
* @example
29-
*
29+
* <code>
3030
* $array = [1, 2, 3, 4]
3131
* $evens = remove($array, function ($n) { return $n % 2 === 0; })
3232
*
@@ -35,6 +35,7 @@
3535
*
3636
* var_dump($evens)
3737
* // => [2, 4]
38+
* </code>
3839
*/
3940
function remove(array &$array, callable $predicate): array
4041
{

src/Collection/findLast.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* <code>
3030
* findLast([1, 2, 3, 4], function ($n) { return $n % 2 == 1; })
3131
* // => 3
32-
* </cdoe>
32+
* </code>
3333
*/
3434
function findLast(iterable $collection, $predicate = null, int $fromIndex = 0)
3535
{

src/Collection/partition.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
* @return array the array of grouped elements.
2828
* @example
29-
*
29+
* <code>
3030
* $users = [
3131
* ['user' => 'barney', 'age' => 36, 'active' => false],
3232
* ['user' => 'fred', 'age' => 40, 'active' => true],
@@ -35,6 +35,7 @@
3535
*
3636
* partition($users, function($user) { return $user['active']; })
3737
* // => objects for [['fred'], ['barney', 'pebbles']]
38+
* </code>
3839
*/
3940
function partition(iterable $collection, $predicate = null): array
4041
{

src/Collection/reduceRight.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
*
3333
* reduceRight(array, (flattened, other) => flattened.concat(other), [])
3434
* // => [4, 5, 2, 3, 0, 1]
35+
* </code>
3536
*/
3637
function reduceRight(iterable $collection, $iteratee, $accumulator = null)
3738
{

src/Collection/sampleSize.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@
2222
*
2323
* @return array the random elements.
2424
* @example
25-
*
25+
* <code>
2626
* sampleSize([1, 2, 3], 2)
2727
* // => [3, 1]
2828
*
2929
* sampleSize([1, 2, 3], 4)
3030
* // => [2, 3, 1]
31+
* </code>
3132
*/
3233
function sampleSize(array $array, int $n = 1): array
3334
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy