diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cca15c6..010e5a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest] - php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6'] + php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6'] runs-on: ${{ matrix.operating-system }} @@ -29,3 +29,6 @@ jobs: - name: Run tests run: ./vendor/bin/phpunit + + - name: Verify documentation + run: ./vendor/bin/mddoc --dry-run diff --git a/README.md b/README.md index 95ccfc8..dfe1640 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ A collection of global `array_*` functions appending to the native PHP set. ## Requirements -- **php**: >=7.2.0 +- **php**: >=7.4.0 ## Installing @@ -24,15 +24,15 @@ composer require 'quorum/array-functions' ### Function: \array_flatten ```php -function array_flatten(array $array [, $allow_duplicates = false]) +function array_flatten(array $array, $allow_duplicates = false) ``` -##### Parameters: +##### Parameters - ***array*** `$array` - The Array to be Flattened - ***bool*** `$allow_duplicates` - Should the array allow duplicates -##### Returns: +##### Return Value - ***array*** - The resulting array or NULL on failure @@ -41,15 +41,15 @@ Given an array, find all the values recursively. ### Function: \array_blend ```php -function array_blend(array $arrays [, array $keys = null]) +function array_blend(array $arrays, array $keys = null) ``` -##### Parameters: +##### Parameters - ***array*** `$arrays` - An array of arrays. - ***array*** | ***null*** `$keys` - The merged array. -##### Returns: +##### Return Value - ***array*** - The resulting blended array @@ -61,12 +61,12 @@ Given an array of arrays, merges the array's children together. function array_key_array(array $arrays, $key) ``` -##### Parameters: +##### Parameters - ***array*** `$arrays` - An array of similarly keyed arrays - ***int*** | ***string*** `$key` - The desired key -##### Returns: +##### Return Value - ***array*** - The flattened array @@ -78,12 +78,12 @@ Given an array of similarly keyed arrays, returns an array of only the values of function array_keys_array(array $arrays, $keys) ``` -##### Parameters: +##### Parameters - ***array*** `$arrays` - An array of similarly keyed arrays - ***array*** | ***int*** | ***string*** `$keys` - The key or array of keys to return -##### Returns: +##### Return Value - ***array*** - The array of arrays with just the selected keys @@ -92,17 +92,17 @@ Given an array of similarly keyed arrays, returns an array of only the selected ### Function: \array_key_refill ```php -function array_key_refill(array $array, array $keys [, $fill = array()]) +function array_key_refill(array $array, array $keys, $fill = array()) ``` -##### Parameters: +##### Parameters - ***array*** `$array` - A Keyed array - ***array*** `$keys` - The keys that must exist - ***mixed*** `$fill` - The desired value to fill with -##### Returns: +##### Return Value - ***array*** -Given a keyed array, fills any missing values. +Given a keyed array, fills any missing values. \ No newline at end of file diff --git a/composer.json b/composer.json index 967729e..f566721 100644 --- a/composer.json +++ b/composer.json @@ -1,18 +1,24 @@ { "name" : "quorum/array-functions", - "description": "useful array functions", + "description": "Additional global PHP array functions for flattening, merging, selecting, and refilling arrays.", + "keywords" : [ + "array", + "array functions", + "array utilities" + ], "license" : "MIT", "authors" : [ { - "name" : "Jesse Donat", + "name" : "Jesse G. Donat", "role" : "Developer", "email" : "donatj@gmail.com", "homepage": "https://donatstudios.com" }, { "name" : "Ray Minge", + "email" : "ray@rayminge.com", "role" : "Developer", - "homepage": "http://oranj.io" + "homepage": "https://oranj.io" }, { "name" : "Jon Henderson", @@ -21,12 +27,16 @@ } ], "require": { - "php" : ">=7.2.0" + "php" : ">=7.4.0" }, "require-dev": { - "phpunit/phpunit": "~8|~9|~11" + "donatj/mddoc": "^0.14.1", + "phpunit/phpunit": "~9|~11" }, "autoload" : { "files": ["src/array.php"] + }, + "config" : { + "sort-packages": true } }