Rename namespace to Tezmanian and prepare for Packagist
PHP Composer / build (push) Successful in 37s
PHP Composer / build (push) Successful in 37s
- Namespace Tez\Utils -> Tezmanian\Utils, package tez/* -> tezmanian/* - Add keywords, homepage, authors and support metadata - Drop VCS repositories (resolved via Packagist) - Remove stale composer.lock, set license holder
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2026 Development
|
Copyright (c) 2026 René Halberstadt
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||||
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
||||||
|
|||||||
@@ -1,13 +1,20 @@
|
|||||||
# tez-utils-arr
|
# tez-utils-arr
|
||||||
|
|
||||||
|
[](https://github.com/tezmanian/tez-utils-arr/actions/workflows/php.yml)
|
||||||
|
[](https://packagist.org/packages/tezmanian/utils-arr)
|
||||||
|
[](https://packagist.org/packages/tezmanian/utils-arr)
|
||||||
|
[](LICENSE)
|
||||||
|
|
||||||
A collection of focused, stateless array utility classes for PHP 8.3+. Each class does one thing and exposes a clean static API.
|
A collection of focused, stateless array utility classes for PHP 8.3+. Each class does one thing and exposes a clean static API.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
composer require tez/utils-arr
|
composer require tezmanian/utils-arr
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Package: [`tezmanian/utils-arr`](https://packagist.org/packages/tezmanian/utils-arr) · Namespace: `Tezmanian\Utils\Arr`
|
||||||
|
|
||||||
## Components
|
## Components
|
||||||
|
|
||||||
| Class | Purpose |
|
| Class | Purpose |
|
||||||
@@ -38,7 +45,7 @@ composer require tez/utils-arr
|
|||||||
Recursively compares two arrays and returns all differences with dot-notation paths.
|
Recursively compares two arrays and returns all differences with dot-notation paths.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
use Tez\Utils\Arr\ArrayDiff;
|
use Tezmanian\Utils\Arr\ArrayDiff;
|
||||||
|
|
||||||
$result = ArrayDiff::compare(
|
$result = ArrayDiff::compare(
|
||||||
['user' => ['name' => 'Alice', 'age' => 30]],
|
['user' => ['name' => 'Alice', 'age' => 30]],
|
||||||
@@ -66,7 +73,7 @@ Comparison is strict (`1 !== "1"`). Keys are reported as `ChangeType::Added`, `C
|
|||||||
Computes the Cartesian product of any number of sets lazily via a Generator.
|
Computes the Cartesian product of any number of sets lazily via a Generator.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
use Tez\Utils\Arr\CartesianProduct;
|
use Tezmanian\Utils\Arr\CartesianProduct;
|
||||||
|
|
||||||
foreach (CartesianProduct::create(['S', 'M', 'L'], ['red', 'blue']) as $tuple) {
|
foreach (CartesianProduct::create(['S', 'M', 'L'], ['red', 'blue']) as $tuple) {
|
||||||
// ['S', 'red'], ['S', 'blue'], ['M', 'red'], ...
|
// ['S', 'red'], ['S', 'blue'], ['M', 'red'], ...
|
||||||
@@ -82,7 +89,7 @@ No intermediate array is built — suitable for large input sets.
|
|||||||
Recursively merges override arrays into a base array. Multiple overrides are applied left to right.
|
Recursively merges override arrays into a base array. Multiple overrides are applied left to right.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
use Tez\Utils\Arr\DeepMerge;
|
use Tezmanian\Utils\Arr\DeepMerge;
|
||||||
|
|
||||||
$result = DeepMerge::merge(
|
$result = DeepMerge::merge(
|
||||||
['db' => ['host' => 'localhost', 'port' => 3306]],
|
['db' => ['host' => 'localhost', 'port' => 3306]],
|
||||||
@@ -100,7 +107,7 @@ String keys are merged recursively when both sides are arrays. Integer keys are
|
|||||||
Returns the first or last item matching a predicate.
|
Returns the first or last item matching a predicate.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
use Tez\Utils\Arr\Find;
|
use Tezmanian\Utils\Arr\Find;
|
||||||
|
|
||||||
$first = Find::first($users, fn($u) => $u['active']);
|
$first = Find::first($users, fn($u) => $u['active']);
|
||||||
$last = Find::last($users, fn($u) => $u['active']);
|
$last = Find::last($users, fn($u) => $u['active']);
|
||||||
@@ -114,7 +121,7 @@ $last = Find::last($users, fn($u) => $u['active']);
|
|||||||
Flattens a nested array into a single list. Accepts an optional depth limit.
|
Flattens a nested array into a single list. Accepts an optional depth limit.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
use Tez\Utils\Arr\Flatten;
|
use Tezmanian\Utils\Arr\Flatten;
|
||||||
|
|
||||||
Flatten::flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4]
|
Flatten::flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4]
|
||||||
Flatten::flatten([1, [2, [3, 4]]], depth: 1); // [1, 2, [3, 4]]
|
Flatten::flatten([1, [2, [3, 4]]], depth: 1); // [1, 2, [3, 4]]
|
||||||
@@ -127,7 +134,7 @@ Flatten::flatten([1, [2, [3, 4]]], depth: 1); // [1, 2, [3, 4]]
|
|||||||
Groups items by a key derived from a callback.
|
Groups items by a key derived from a callback.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
use Tez\Utils\Arr\GroupBy;
|
use Tezmanian\Utils\Arr\GroupBy;
|
||||||
|
|
||||||
$grouped = GroupBy::group($orders, fn($o) => $o['status']);
|
$grouped = GroupBy::group($orders, fn($o) => $o['status']);
|
||||||
// ['pending' => [...], 'shipped' => [...]]
|
// ['pending' => [...], 'shipped' => [...]]
|
||||||
@@ -140,7 +147,7 @@ $grouped = GroupBy::group($orders, fn($o) => $o['status']);
|
|||||||
Builds an associative lookup map from a list. When two items produce the same key, the last wins.
|
Builds an associative lookup map from a list. When two items produce the same key, the last wins.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
use Tez\Utils\Arr\KeyBy;
|
use Tezmanian\Utils\Arr\KeyBy;
|
||||||
|
|
||||||
$byId = KeyBy::index($users, fn($u) => $u['id']);
|
$byId = KeyBy::index($users, fn($u) => $u['id']);
|
||||||
// [42 => $user, 99 => $user, ...]
|
// [42 => $user, 99 => $user, ...]
|
||||||
@@ -153,7 +160,7 @@ $byId = KeyBy::index($users, fn($u) => $u['id']);
|
|||||||
Maps over an array where the callback returns a `[key => value]` pair.
|
Maps over an array where the callback returns a `[key => value]` pair.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
use Tez\Utils\Arr\MapWithKeys;
|
use Tezmanian\Utils\Arr\MapWithKeys;
|
||||||
|
|
||||||
$result = MapWithKeys::map($products, fn($p) => [$p['sku'] => $p['price']]);
|
$result = MapWithKeys::map($products, fn($p) => [$p['sku'] => $p['price']]);
|
||||||
// ['ABC-1' => 9.99, 'XYZ-2' => 4.49]
|
// ['ABC-1' => 9.99, 'XYZ-2' => 4.49]
|
||||||
@@ -166,7 +173,7 @@ $result = MapWithKeys::map($products, fn($p) => [$p['sku'] => $p['price']]);
|
|||||||
Paginates an array and returns an immutable `Page` with slice and metadata.
|
Paginates an array and returns an immutable `Page` with slice and metadata.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
use Tez\Utils\Arr\Paginator;
|
use Tezmanian\Utils\Arr\Paginator;
|
||||||
|
|
||||||
$page = Paginator::paginate($items, page: 2, perPage: 15);
|
$page = Paginator::paginate($items, page: 2, perPage: 15);
|
||||||
|
|
||||||
@@ -187,7 +194,7 @@ Throws `InvalidArgumentException` when `$page < 1` or `$perPage < 1`.
|
|||||||
Splits an array into two lists in a single pass — items passing the predicate first, failing items second.
|
Splits an array into two lists in a single pass — items passing the predicate first, failing items second.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
use Tez\Utils\Arr\Partition;
|
use Tezmanian\Utils\Arr\Partition;
|
||||||
|
|
||||||
[$active, $inactive] = Partition::by($users, fn($u) => $u['active']);
|
[$active, $inactive] = Partition::by($users, fn($u) => $u['active']);
|
||||||
```
|
```
|
||||||
@@ -199,7 +206,7 @@ use Tez\Utils\Arr\Partition;
|
|||||||
Extracts values from an array of records using dot-notation keys.
|
Extracts values from an array of records using dot-notation keys.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
use Tez\Utils\Arr\Pluck;
|
use Tezmanian\Utils\Arr\Pluck;
|
||||||
|
|
||||||
// Extract a single column
|
// Extract a single column
|
||||||
Pluck::values($users, 'name'); // ['Alice', 'Bob', ...]
|
Pluck::values($users, 'name'); // ['Alice', 'Bob', ...]
|
||||||
@@ -221,7 +228,7 @@ Items where the key is absent are silently skipped.
|
|||||||
Safely reads typed values from deeply nested arrays using dot-notation paths. Returns `null` (or a default) when any segment is missing.
|
Safely reads typed values from deeply nested arrays using dot-notation paths. Returns `null` (or a default) when any segment is missing.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
use Tez\Utils\Arr\SafeGet;
|
use Tezmanian\Utils\Arr\SafeGet;
|
||||||
|
|
||||||
$data = ['chart' => ['result' => [['meta' => ['currency' => 'EUR']]]]];
|
$data = ['chart' => ['result' => [['meta' => ['currency' => 'EUR']]]]];
|
||||||
|
|
||||||
@@ -241,7 +248,7 @@ Integer-looking segments (e.g. `"0"`) address list indices automatically.
|
|||||||
Produces consecutive overlapping windows of a fixed size.
|
Produces consecutive overlapping windows of a fixed size.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
use Tez\Utils\Arr\Sliding;
|
use Tezmanian\Utils\Arr\Sliding;
|
||||||
|
|
||||||
Sliding::window([1, 2, 3, 4, 5], size: 3);
|
Sliding::window([1, 2, 3, 4, 5], size: 3);
|
||||||
// [[1,2,3], [2,3,4], [3,4,5]]
|
// [[1,2,3], [2,3,4], [3,4,5]]
|
||||||
@@ -257,7 +264,7 @@ Sliding::window([1, 2, 3, 4, 5], size: 3, step: 2);
|
|||||||
Sorts a copy of the array by a derived key. Never mutates the original. Result is always re-indexed.
|
Sorts a copy of the array by a derived key. Never mutates the original. Result is always re-indexed.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
use Tez\Utils\Arr\SortBy;
|
use Tezmanian\Utils\Arr\SortBy;
|
||||||
|
|
||||||
$sorted = SortBy::sort($products, fn($p) => $p['price']);
|
$sorted = SortBy::sort($products, fn($p) => $p['price']);
|
||||||
$desc = SortBy::sort($products, fn($p) => $p['price'], descending: true);
|
$desc = SortBy::sort($products, fn($p) => $p['price'], descending: true);
|
||||||
@@ -270,7 +277,7 @@ $desc = SortBy::sort($products, fn($p) => $p['price'], descending: true);
|
|||||||
Swaps rows and columns of a 2D array. All rows must have the same column count.
|
Swaps rows and columns of a 2D array. All rows must have the same column count.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
use Tez\Utils\Arr\Transpose;
|
use Tezmanian\Utils\Arr\Transpose;
|
||||||
|
|
||||||
Transpose::matrix([[1, 2, 3], [4, 5, 6]]);
|
Transpose::matrix([[1, 2, 3], [4, 5, 6]]);
|
||||||
// [[1, 4], [2, 5], [3, 6]]
|
// [[1, 4], [2, 5], [3, 6]]
|
||||||
@@ -283,7 +290,7 @@ Transpose::matrix([[1, 2, 3], [4, 5, 6]]);
|
|||||||
Removes duplicates where uniqueness is determined by a callback.
|
Removes duplicates where uniqueness is determined by a callback.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
use Tez\Utils\Arr\UniqueBy;
|
use Tezmanian\Utils\Arr\UniqueBy;
|
||||||
|
|
||||||
// Keep first occurrence (default)
|
// Keep first occurrence (default)
|
||||||
UniqueBy::filter($items, fn($i) => $i['email']);
|
UniqueBy::filter($items, fn($i) => $i['email']);
|
||||||
@@ -302,7 +309,7 @@ UniqueBy::filter($items, fn($i) => $i['email'], preserveKeys: true);
|
|||||||
Ensures any value is an array. `null` becomes `[]`, arrays pass through, everything else gets wrapped.
|
Ensures any value is an array. `null` becomes `[]`, arrays pass through, everything else gets wrapped.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
use Tez\Utils\Arr\Wrap;
|
use Tezmanian\Utils\Arr\Wrap;
|
||||||
|
|
||||||
Wrap::ensure(null); // []
|
Wrap::ensure(null); // []
|
||||||
Wrap::ensure('hello'); // ['hello']
|
Wrap::ensure('hello'); // ['hello']
|
||||||
@@ -316,7 +323,7 @@ Wrap::ensure([1, 2]); // [1, 2]
|
|||||||
Combines multiple arrays element-by-element into a list of tuples.
|
Combines multiple arrays element-by-element into a list of tuples.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
use Tez\Utils\Arr\Zip;
|
use Tezmanian\Utils\Arr\Zip;
|
||||||
|
|
||||||
// Pad shorter arrays with null
|
// Pad shorter arrays with null
|
||||||
Zip::zip([1, 2, 3], ['a', 'b']);
|
Zip::zip([1, 2, 3], ['a', 'b']);
|
||||||
@@ -332,8 +339,17 @@ Zip::shortest([1, 2, 3], ['a', 'b']);
|
|||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- PHP 8.3+
|
- PHP 8.3+
|
||||||
- `tez/utils-enum` ^1.0
|
- [`tezmanian/utils-enum`](https://packagist.org/packages/tezmanian/utils-enum) ^1.0
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make build && make install
|
||||||
|
make ci # audit, PHPStan, code style, tests
|
||||||
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
MIT
|
MIT — see [LICENSE](LICENSE).
|
||||||
|
|
||||||
|
Author: René Halberstadt
|
||||||
|
|||||||
+21
-14
@@ -1,31 +1,38 @@
|
|||||||
{
|
{
|
||||||
"name": "tez/utils-arr",
|
"name": "tezmanian/utils-arr",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"description": "A set of focused PHP array utilities: grouping, pagination, diffing, sorting, partitioning, flattening, cartesian products, and more — PHP 8.3+, no framework required.",
|
"description": "A set of focused PHP array utilities: grouping, pagination, diffing, sorting, partitioning, flattening, cartesian products, and more — PHP 8.3+, no framework required.",
|
||||||
|
"keywords": [
|
||||||
|
"array",
|
||||||
|
"collection",
|
||||||
|
"utilities",
|
||||||
|
"php"
|
||||||
|
],
|
||||||
|
"homepage": "https://github.com/tezmanian/tez-utils-arr",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "René Halberstadt",
|
||||||
|
"email": "tezmanian@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/tezmanian/tez-utils-arr/issues",
|
||||||
|
"source": "https://github.com/tezmanian/tez-utils-arr"
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Tez\\Utils\\Arr\\": "src/"
|
"Tezmanian\\Utils\\Arr\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Tez\\Utils\\Tests\\Arr\\": "tests/"
|
"Tezmanian\\Utils\\Tests\\Arr\\": "tests/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"repositories": [
|
|
||||||
{
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://gitea.root-zone.info/tez/tez-utils-enum.git"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/tezmanian/tez-utils-enum.git"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.3",
|
"php": ">=8.3",
|
||||||
"tez/utils-enum": "^1.0"
|
"tezmanian/utils-enum": "^1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^11.0",
|
"phpunit/phpunit": "^11.0",
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Arr;
|
namespace Tezmanian\Utils\Arr;
|
||||||
|
|
||||||
final class ArrayDiff
|
final class ArrayDiff
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Arr;
|
namespace Tezmanian\Utils\Arr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Computes the Cartesian product of any number of sets lazily via a Generator.
|
* Computes the Cartesian product of any number of sets lazily via a Generator.
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Arr;
|
namespace Tezmanian\Utils\Arr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a single difference between two arrays at a specific dot-notation path.
|
* Represents a single difference between two arrays at a specific dot-notation path.
|
||||||
|
|||||||
+2
-2
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Arr;
|
namespace Tezmanian\Utils\Arr;
|
||||||
|
|
||||||
use Tez\Utils\Enum\BackedEnumTrait;
|
use Tezmanian\Utils\Enum\BackedEnumTrait;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Classifies the type of a single difference detected by ArrayDiff.
|
* Classifies the type of a single difference detected by ArrayDiff.
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Arr;
|
namespace Tezmanian\Utils\Arr;
|
||||||
|
|
||||||
final class DeepMerge
|
final class DeepMerge
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Arr;
|
namespace Tezmanian\Utils\Arr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Immutable result of an ArrayDiff comparison.
|
* Immutable result of an ArrayDiff comparison.
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Arr;
|
namespace Tezmanian\Utils\Arr;
|
||||||
|
|
||||||
final class Find
|
final class Find
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Arr;
|
namespace Tezmanian\Utils\Arr;
|
||||||
|
|
||||||
final class Flatten
|
final class Flatten
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Arr;
|
namespace Tezmanian\Utils\Arr;
|
||||||
|
|
||||||
final class GroupBy
|
final class GroupBy
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Arr;
|
namespace Tezmanian\Utils\Arr;
|
||||||
|
|
||||||
final class KeyBy
|
final class KeyBy
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Arr;
|
namespace Tezmanian\Utils\Arr;
|
||||||
|
|
||||||
final class MapWithKeys
|
final class MapWithKeys
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Arr;
|
namespace Tezmanian\Utils\Arr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Immutable result of a paginated array slice.
|
* Immutable result of a paginated array slice.
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Arr;
|
namespace Tezmanian\Utils\Arr;
|
||||||
|
|
||||||
final class Paginator
|
final class Paginator
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Arr;
|
namespace Tezmanian\Utils\Arr;
|
||||||
|
|
||||||
final class Partition
|
final class Partition
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Arr;
|
namespace Tezmanian\Utils\Arr;
|
||||||
|
|
||||||
final class Pluck
|
final class Pluck
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Arr;
|
namespace Tezmanian\Utils\Arr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Safely read deeply nested values from an array using dot-notation paths.
|
* Safely read deeply nested values from an array using dot-notation paths.
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Arr;
|
namespace Tezmanian\Utils\Arr;
|
||||||
|
|
||||||
final class Sliding
|
final class Sliding
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Arr;
|
namespace Tezmanian\Utils\Arr;
|
||||||
|
|
||||||
final class SortBy
|
final class SortBy
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Arr;
|
namespace Tezmanian\Utils\Arr;
|
||||||
|
|
||||||
final class Transpose
|
final class Transpose
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Arr;
|
namespace Tezmanian\Utils\Arr;
|
||||||
|
|
||||||
final class UniqueBy
|
final class UniqueBy
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Arr;
|
namespace Tezmanian\Utils\Arr;
|
||||||
|
|
||||||
final class Wrap
|
final class Wrap
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Arr;
|
namespace Tezmanian\Utils\Arr;
|
||||||
|
|
||||||
final class Zip
|
final class Zip
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Tests\Arr;
|
namespace Tezmanian\Utils\Tests\Arr;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Tez\Utils\Arr\ArrayDiff;
|
use Tezmanian\Utils\Arr\ArrayDiff;
|
||||||
use Tez\Utils\Arr\ChangeType;
|
use Tezmanian\Utils\Arr\ChangeType;
|
||||||
use Tez\Utils\Arr\DiffResult;
|
use Tezmanian\Utils\Arr\DiffResult;
|
||||||
|
|
||||||
final class ArrayDiffTest extends TestCase
|
final class ArrayDiffTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Tests\Arr;
|
namespace Tezmanian\Utils\Tests\Arr;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Tez\Utils\Arr\CartesianProduct;
|
use Tezmanian\Utils\Arr\CartesianProduct;
|
||||||
|
|
||||||
final class CartesianProductTest extends TestCase
|
final class CartesianProductTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Tests\Arr;
|
namespace Tezmanian\Utils\Tests\Arr;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Tez\Utils\Arr\DeepMerge;
|
use Tezmanian\Utils\Arr\DeepMerge;
|
||||||
|
|
||||||
final class DeepMergeTest extends TestCase
|
final class DeepMergeTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-2
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Tests\Arr;
|
namespace Tezmanian\Utils\Tests\Arr;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Tez\Utils\Arr\Find;
|
use Tezmanian\Utils\Arr\Find;
|
||||||
|
|
||||||
final class FindTest extends TestCase
|
final class FindTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Tests\Arr;
|
namespace Tezmanian\Utils\Tests\Arr;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Tez\Utils\Arr\Flatten;
|
use Tezmanian\Utils\Arr\Flatten;
|
||||||
|
|
||||||
final class FlattenTest extends TestCase
|
final class FlattenTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Tests\Arr;
|
namespace Tezmanian\Utils\Tests\Arr;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Tez\Utils\Arr\GroupBy;
|
use Tezmanian\Utils\Arr\GroupBy;
|
||||||
|
|
||||||
final class GroupByTest extends TestCase
|
final class GroupByTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-2
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Tests\Arr;
|
namespace Tezmanian\Utils\Tests\Arr;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Tez\Utils\Arr\KeyBy;
|
use Tezmanian\Utils\Arr\KeyBy;
|
||||||
|
|
||||||
final class KeyByTest extends TestCase
|
final class KeyByTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Tests\Arr;
|
namespace Tezmanian\Utils\Tests\Arr;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Tez\Utils\Arr\MapWithKeys;
|
use Tezmanian\Utils\Arr\MapWithKeys;
|
||||||
|
|
||||||
final class MapWithKeysTest extends TestCase
|
final class MapWithKeysTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Tests\Arr;
|
namespace Tezmanian\Utils\Tests\Arr;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Tez\Utils\Arr\Page;
|
use Tezmanian\Utils\Arr\Page;
|
||||||
use Tez\Utils\Arr\Paginator;
|
use Tezmanian\Utils\Arr\Paginator;
|
||||||
|
|
||||||
final class PaginatorTest extends TestCase
|
final class PaginatorTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Tests\Arr;
|
namespace Tezmanian\Utils\Tests\Arr;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Tez\Utils\Arr\Partition;
|
use Tezmanian\Utils\Arr\Partition;
|
||||||
|
|
||||||
final class PartitionTest extends TestCase
|
final class PartitionTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-2
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Tests\Arr;
|
namespace Tezmanian\Utils\Tests\Arr;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Tez\Utils\Arr\Pluck;
|
use Tezmanian\Utils\Arr\Pluck;
|
||||||
|
|
||||||
final class PluckTest extends TestCase
|
final class PluckTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Tests\Arr;
|
namespace Tezmanian\Utils\Tests\Arr;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Tez\Utils\Arr\SafeGet;
|
use Tezmanian\Utils\Arr\SafeGet;
|
||||||
|
|
||||||
final class SafeGetTest extends TestCase
|
final class SafeGetTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Tests\Arr;
|
namespace Tezmanian\Utils\Tests\Arr;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Tez\Utils\Arr\Sliding;
|
use Tezmanian\Utils\Arr\Sliding;
|
||||||
|
|
||||||
final class SlidingTest extends TestCase
|
final class SlidingTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Tests\Arr;
|
namespace Tezmanian\Utils\Tests\Arr;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Tez\Utils\Arr\SortBy;
|
use Tezmanian\Utils\Arr\SortBy;
|
||||||
|
|
||||||
final class SortByTest extends TestCase
|
final class SortByTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Tests\Arr;
|
namespace Tezmanian\Utils\Tests\Arr;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Tez\Utils\Arr\Transpose;
|
use Tezmanian\Utils\Arr\Transpose;
|
||||||
|
|
||||||
final class TransposeTest extends TestCase
|
final class TransposeTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Tests\Arr;
|
namespace Tezmanian\Utils\Tests\Arr;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Tez\Utils\Arr\UniqueBy;
|
use Tezmanian\Utils\Arr\UniqueBy;
|
||||||
|
|
||||||
final class UniqueByTest extends TestCase
|
final class UniqueByTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-2
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Tests\Arr;
|
namespace Tezmanian\Utils\Tests\Arr;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Tez\Utils\Arr\Wrap;
|
use Tezmanian\Utils\Arr\Wrap;
|
||||||
|
|
||||||
final class WrapTest extends TestCase
|
final class WrapTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-2
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Tez\Utils\Tests\Arr;
|
namespace Tezmanian\Utils\Tests\Arr;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Tez\Utils\Arr\Zip;
|
use Tezmanian\Utils\Arr\Zip;
|
||||||
|
|
||||||
final class ZipTest extends TestCase
|
final class ZipTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user