1
1
<p align =" center " >
2
2
<a href="https://github.com/yiisoft" target="_blank">
3
- <img src="https://yiisoft.github.io/docs/images/yii_logo.svg" height="100px">
3
+ <img src="https://yiisoft.github.io/docs/images/yii_logo.svg" height="100px" alt="Yii" >
4
4
</a>
5
5
<h1 align="center">Yii Arrays</h1>
6
6
<br>
9
9
[ ![ Latest Stable Version] ( https://poser.pugx.org/yiisoft/arrays/v/stable.png )] ( https://packagist.org/packages/yiisoft/arrays )
10
10
[ ![ Total Downloads] ( https://poser.pugx.org/yiisoft/arrays/downloads.png )] ( https://packagist.org/packages/yiisoft/arrays )
11
11
[ ![ Build status] ( https://github.com/yiisoft/arrays/workflows/build/badge.svg )] ( https://github.com/yiisoft/arrays/actions?query=workflow%3Abuild )
12
- [ ![ Scrutinizer Code Quality] ( https://scrutinizer-ci.com/g/yiisoft/arrays/badges/quality-score.png?b=master )] ( https://scrutinizer-ci.com/g/yiisoft/arrays/?branch=master )
13
- [ ![ Code Coverage] ( https://scrutinizer-ci.com/g/yiisoft/arrays/badges/coverage.png?b=master )] ( https://scrutinizer-ci.com/g/yiisoft/arrays/?branch=master )
12
+ [ ![ Code Coverage] ( https://codecov.io/gh/yiisoft/arrays/graph/badge.svg?token=SMTMNF4KT9 )] ( https://codecov.io/gh/yiisoft/arrays )
14
13
[ ![ Mutation testing badge] ( https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fyiisoft%2Farrays%2Fmaster )] ( https://dashboard.stryker-mutator.io/reports/github.com/yiisoft/arrays/master )
15
14
[ ![ static analysis] ( https://github.com/yiisoft/arrays/workflows/static%20analysis/badge.svg )] ( https://github.com/yiisoft/arrays/actions?query=workflow%3A%22static+analysis%22 )
16
15
[ ![ type-coverage] ( https://shepherd.dev/github/yiisoft/arrays/coverage.svg )] ( https://shepherd.dev/github/yiisoft/arrays )
@@ -88,6 +87,7 @@ Overall the helper has the following method groups.
88
87
- map
89
88
- merge
90
89
- parametrizedMerge
90
+ - renameKey
91
91
- toArray
92
92
93
93
### Other
@@ -109,7 +109,7 @@ Array sorter has one static method which usage is like the following:
109
109
[ \IteratorAggregate] ( https://www.php.net/manual/class.iteratoraggregate ) ,
110
110
[ \ArrayAccess] ( https://www.php.net/manual/class.arrayaccess ) and
111
111
[ \Countable] ( https://www.php.net/manualn/class.countable.php ) .
112
-
112
+
113
113
Note that ` ArrayAccessTrait ` requires the class using it contain a property named ` data ` which should be an array.
114
114
The data will be exposed by ArrayAccessTrait to support accessing the class object like an array.
115
115
@@ -164,36 +164,17 @@ $car = new Car();
164
164
$data = $car->toArray(['type', 'color']); // ['type' => 'Crossover', 'color' => 'Red']
165
165
```
166
166
167
- ## Testing
168
-
169
- ### Unit testing
170
-
171
- The package is tested with [ PHPUnit] ( https://phpunit.de/ ) . To run tests:
172
-
173
- ``` shell
174
- ./vendor/bin/phpunit
175
- ```
176
-
177
- ### Mutation testing
167
+ ## Documentation
178
168
179
- The package tests are checked with [ Infection] ( https://infection.github.io/ ) mutation framework with
180
- [ Infection Static Analysis Plugin] ( https://github.com/Roave/infection-static-analysis-plugin ) . To run it:
169
+ - [ Internals] ( docs/internals.md )
181
170
182
- ``` shell
183
- ./vendor/bin/roave-infection-static-analysis-plugin
184
- ```
185
-
186
- ### Static analysis
187
-
188
- The code is statically analyzed with [ Psalm] ( https://psalm.dev/ ) . To run static analysis:
189
-
190
- ``` shell
191
- ./vendor/bin/psalm
192
- ```
171
+ If you need help or have a question, the [ Yii Forum] ( https://forum.yiiframework.com/c/yii-3-0/63 ) is a good place for that.
172
+ You may also check out other [ Yii Community Resources] ( https://www.yiiframework.com/community ) .
193
173
194
174
## License
195
175
196
- The Yii Arrays is free software. It is released under the terms of the BSD License. Please see [ ` LICENSE ` ] ( ./LICENSE.md ) for more information.
176
+ The Yii Arrays is free software. It is released under the terms of the BSD License.
177
+ Please see [ ` LICENSE ` ] ( ./LICENSE.md ) for more information.
197
178
198
179
Maintained by [ Yii Software] ( https://www.yiiframework.com/ ) .
199
180
0 commit comments