Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e3fed73

Browse files
[+]: Update DotArray.php::normalize (no more check for empty, just cast to array) [+]: Update README.md
1 parent 824d8f6 commit e3fed73

File tree

2 files changed

+36
-24
lines changed

2 files changed

+36
-24
lines changed

‎README.md

Lines changed: 35 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ Accessing PHP Arrays via DOT notation is easy as:
88
```php
99
DotArray::create(['config' => ['some.dotted.key' => 'value']])->get('config.{some.dotted.key}')
1010
```
11-
[![Minimum PHP Version `PHP >= 7.1`](https://img.shields.io/badge/php-%3E%3D%207.1-8892BF.svg)][php-site]
12-
[![Latest Stable Version](https://poser.pugx.org/binary-cube/dot-array/version)][packagist]
13-
[![Total Downloads](https://poser.pugx.org/binary-cube/dot-array/downloads)][packagist]
14-
[![Build Status](https://travis-ci.org/binary-cube/dot-array.svg?branch=master)](https://travis-ci.org/binary-cube/dot-array)
15-
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/003187f2016e4c4cb1b014ccc9bdb5c0)](https://www.codacy.com/app/microThread/dot-array)
16-
[![Code Coverage](https://scrutinizer-ci.com/g/binary-cube/dot-array/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/binary-cube/dot-array/?branch=master)
17-
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/binary-cube/dot-array/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/binary-cube/dot-array/?branch=master)
18-
[![License](https://poser.pugx.org/binary-cube/dot-array/license)][license]
11+
[![Minimum PHP Version `PHP >= 7.1`][ico-php-require]][link-php-site]
12+
[![Latest Stable Version][ico-version]][link-packagist]
13+
[![Total Downloads][ico-downloads]][link-downloads]
14+
[![Build Status][ico-travis]][link-travis]
15+
[![Code Coverage][ico-scrutinizer]][link-scrutinizer]
16+
[![Quality Score][ico-code-quality]][link-code-quality]
17+
[![License][ico-license]][link-license]
1918

2019
-----
2120

@@ -365,7 +364,7 @@ $dummyArray = [
365364
366365
Have a bug or a feature request?
367366
Please first read the issue guidelines and search for existing and closed issues.
368-
If your problem or idea is not addressed yet, [please open a new issue][new-issue].
367+
If your problem or idea is not addressed yet, [please open a new issue][link-new-issue].
369368
370369
371370
@@ -379,14 +378,14 @@ In the interest of fostering an open and welcoming environment,
379378
we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone,
380379
regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality,
381380
personal appearance, race, religion, or sexual identity and orientation.
382-
[Read the full Code of Conduct][code-of-conduct].
381+
[Read the full Code of Conduct][link-code-of-conduct].
383382
384383
385384
386385
387386
#### Versioning
388387
389-
Through the development of new versions, we're going use the [Semantic Versioning][semver].
388+
Through the development of new versions, we're going use the [Semantic Versioning][link-semver].
390389

391390
Example: `1.0.0`.
392391
- Major release: increment the first digit and reset middle and last digits to zero. Introduces major changes that might break backward compatibility. E.g. 2.0.0
@@ -400,25 +399,38 @@ Example: `1.0.0`.
400399

401400
* **Banciu N. Cristian Mihai**
402401

403-
See also the list of [contributors][contributors] who participated in this project.
402+
See also the list of [contributors][link-contributors] who participated in this project.
404403

405404

406405

407406

408407
## License
409408

410-
This project is licensed under the MIT License - see the [LICENSE][license] file for details.
409+
This project is licensed under the MIT License - see the [LICENSE][link-license] file for details.
410+
411411

412412

413413

414414
<!-- Links -->
415-
[domain]: https://binary-cube.com
416-
[homepage]: https://binary-cube.com
417-
[git-source]: https://github.com/binary-cube/dot-array
418-
[php-site]: https://php.net
419-
[semver]: https://semver.org
420-
[code-of-conduct]: https://github.com/binary-cube/dot-array/blob/master/code-of-conduct.md
421-
[license]: https://github.com/binary-cube/dot-array/blob/master/LICENSE
422-
[contributors]: https://github.com/binary-cube/dot-array/graphs/contributors
423-
[new-issue]: https://github.com/binary-cube/dot-array/issues/new
424-
[packagist]: https://packagist.org/packages/binary-cube/dot-array
415+
[ico-php-require]: https://img.shields.io/badge/php-%3E%3D%207.1-8892BF.svg?style=flat-square
416+
[ico-version]: https://img.shields.io/packagist/v/binary-cube/dot-array.svg?style=flat-square
417+
[ico-downloads]: https://img.shields.io/packagist/dt/binary-cube/dot-array.svg?style=flat-square
418+
[ico-travis]: https://img.shields.io/travis/binary-cube/dot-array/master.svg?style=flat-square
419+
[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/binary-cube/dot-array.svg?style=flat-square
420+
[ico-code-quality]: https://img.shields.io/scrutinizer/g/binary-cube/dot-array.svg?style=flat-square
421+
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
422+
423+
[link-domain]: https://binary-cube.com
424+
[link-homepage]: https://binary-cube.com
425+
[link-git-source]: https://github.com/binary-cube/dot-array
426+
[link-packagist]: https://packagist.org/packages/binary-cube/dot-array
427+
[link-downloads]: https://packagist.org/packages/binary-cube/dot-array
428+
[link-php-site]: https://php.net
429+
[link-semver]: https://semver.org
430+
[link-code-of-conduct]: https://github.com/binary-cube/dot-array/blob/master/code-of-conduct.md
431+
[link-license]: https://github.com/binary-cube/dot-array/blob/master/LICENSE
432+
[link-contributors]: https://github.com/binary-cube/dot-array/graphs/contributors
433+
[link-new-issue]: https://github.com/binary-cube/dot-array/issues/new
434+
[link-travis]: https://travis-ci.org/binary-cube/dot-array
435+
[link-scrutinizer]: https://scrutinizer-ci.com/g/binary-cube/dot-array/code-structure
436+
[link-code-quality]: https://scrutinizer-ci.com/g/binary-cube/dot-array

‎src/DotArray.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected static function normalize($items)
8383
}
8484
}
8585

86-
return (array) (empty($items) ? [] : $items);
86+
return (array) $items;
8787
}
8888

8989

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /