Skip to content

Commit d9cf702

Browse files
committed
Merge branch 'release/1.0.10'
2 parents 6f37dc7 + c9865d0 commit d9cf702

File tree

12 files changed

+893
-1006
lines changed

12 files changed

+893
-1006
lines changed

.github/workflows/php.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
php-versions: ['8.1', '8.2', '8.3']
18+
php-versions: ['8.2', '8.3']
1919
name: PHP ${{ matrix.php-versions }}
2020

2121
steps:
@@ -58,6 +58,11 @@ jobs:
5858
- name: Checkout
5959
uses: actions/checkout@v4
6060

61+
- name: Install PHP
62+
uses: shivammathur/setup-php@v2
63+
with:
64+
php-version: '8.3'
65+
6166
- name: Install dependencies
6267
run: composer install --no-progress
6368

README.md

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
PHP Sorted Collections
2-
======================
1+
# PHP Sorted Collections
32

43
[![PHP package](https://github.com/chdemko/php-sorted-collections/workflows/PHP%20Composer/badge.svg?branch=develop)](https://github.com/chdemko/php-sorted-collections/actions/workflows/php.yml)
54
[![Coveralls](https://img.shields.io/coveralls/chdemko/php-sorted-collections.svg?logo=Codecov&logoColor=white)](https://coveralls.io/r/chdemko/php-sorted-collections?branch=develop)
@@ -17,24 +16,31 @@ PHP Sorted Collections
1716
[![Repo Size](https://img.shields.io/github/repo-size/chdemko/php-sorted-collections.svg?logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIEdlbmVyYXRvcjogU1ZHIFJlcG8gTWl4ZXIgVG9vbHMgLS0+Cgo8c3ZnCiAgIGZpbGw9IiMwMDAwMDAiCiAgIHdpZHRoPSI4MDBweCIKICAgaGVpZ2h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Q9IjExNjMiCiAgICAgaW5rc2NhcGU6d2luZG93LXg9IjE5MjAiCiAgICAgaW5rc2NhcGU6d2luZG93LXk9IjAiCiAgICAgaW5rc2NhcGU6d2luZG93LW1heGltaXplZD0iMSIKICAgICBpbmtzY2FwZTpjdXJyZW50LWxheWVyPSJzdmcxNDc2IiAvPgogIDxwYXRoCiAgICAgZD0iTTE5LDRIMTcuNTVBMy4wOCwzLjA4LDAsMCwwLDE3LDNhMywzLDAsMCwwLTIuMjUtMUg5LjI3QTMsMywwLDAsMCw3LDNhMy4wOCwzLjA4LDAsMCwwLS41NywxSDVBMywzLDAsMCwwLDIsN1YxOWEzLDMsMCwwLDAsMywzSDE5YTMsMywwLDAsMCwzLTNWN0EzLDMsMCwwLDAsMTksNFpNOC41Miw0LjM0QTEsMSwwLDAsMSw5LjI3LDRoNS40NmExLDEsMCwwLDEsLjc1LjM0LDEsMSwwLDAsMSwuMjUuNzhsLS41LDRhMSwxLDAsMCwxLTEsLjg4SDEyLjU5bDEuMTQtMi40YTEsMSwwLDAsMC0xLjgtLjg2TDEwLjM3LDEwaC0uNmExLDEsMCwwLDEtMS0uODhsLS41LTRBMSwxLDAsMCwxLDguNTIsNC4zNFpNMjAsMTlhMSwxLDAsMCwxLTEsMUg1YTEsMSwwLDAsMS0xLTFWN0ExLDEsMCwwLDEsNSw2SDYuMzdsLjQyLDMuMzdhMywzLDAsMCwwLDMsMi42M2g0LjQ2YTMsMywwLDAsMCwzLTIuNjNMMTcuNjMsNkgxOWExLDEsMCwwLDEsMSwxWm0tNi0zSDEwYTEsMSwwLDAsMCwwLDJoNGExLDEsMCwwLDAsMC0yWiIKICAgICBpZD0icGF0aDE0NzQiCiAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZiIgLz4KPC9zdmc+Cg==)](http://php-sorted-collections.readthedocs.io/en/latest/)
1817
[![Code Size](https://img.shields.io/github/languages/code-size/chdemko/php-sorted-collections.svg?logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lv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tNi0zSDEwYTEsMSwwLDAsMCwwLDJoNGExLDEsMCwwLDAsMC0yWiIKICAgICBpZD0icGF0aDE0NzQiCiAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZiIgLz4KPC9zdmc+Cg==)](http://php-sorted-collections.readthedocs.io/en/latest/)
1918

20-
Sorted Collection for PHP. Insertion, search, and removal compute in `log(n)` time where `n` is the number of items present in the collection. It uses AVL threaded tree [see @Knuth97, 1:320, Sect. 2.3.1] as internal structure.
19+
Sorted Collection for PHP. Insertion, search, and removal compute in
20+
`log(n)` time where `n` is the number of items present in the collection.
21+
It uses AVL threaded tree [see @Knuth97, 1:320, Sect. 2.3.1] as internal
22+
structure.
2123

22-
@Knuth97: Donald E. Knuth, The Art of Computer Programming, Addison-Wesley, volumes 1 and 2, 2nd edition, 1997.
24+
@Knuth97: Donald E. Knuth, The Art of Computer Programming, Addison-Wesley,
25+
volumes 1 and 2, 2nd edition, 1997.
2326

2427
This project uses:
2528

26-
* [PHP Code Sniffer](https://github.com/squizlabs/php_codesniffer) for checking PHP code style
29+
* [PHP Code Sniffer](https://github.com/squizlabs/php_codesniffer)
30+
for checking PHP code style
2731
* [PHPUnit](http://phpunit.de/) for unit test (100% covered)
28-
* [Sphinx](https://www.sphinx-doc.org/) and [Doxygen](https://www.doxygen.nl/) for the
32+
* [Sphinx](https://www.sphinx-doc.org/) and [Doxygen](https://www.doxygen.nl/)
33+
for the
2934
[documentation](http://php-sorted-collections.readthedocs.io/en/latest/?badge=latest)
3035

31-
Instructions
32-
------------
36+
## Instructions
3337

3438
Using composer: either
3539

3640
~~~shell
3741
$ composer create-project chdemko/sorted-collections:1.0.*@dev; cd sorted-collections
42+
Creating a "chdemko/sorted-collections:1.0.*@dev" project at "./sorted-collections"
43+
...
3844
~~~
3945

4046
or create a `composer.json` file containing
@@ -51,6 +57,8 @@ and run
5157

5258
~~~shell
5359
$ composer install
60+
Loading composer repositories with package information
61+
...
5462
~~~
5563

5664
Create a `test.php` file containg
@@ -72,18 +80,16 @@ And run
7280

7381
~~~shell
7482
$ php test.php
75-
~~~
76-
77-
This should print
78-
79-
~~~console
8083
[0,1,2,3,4,5,6,7,8,9]
8184
~~~
8285

83-
See the [examples](https://github.com/chdemko/php-sorted-collections/tree/develop/examples) and [benchmarks](https://github.com/chdemko/php-sorted-collections/tree/develop/benchmarks) folders for more information.
86+
See the
87+
[examples](https://github.com/chdemko/php-sorted-collections/tree/develop/examples)
88+
and
89+
[benchmarks](https://github.com/chdemko/php-sorted-collections/tree/develop/benchmarks)
90+
folders for more information.
8491

85-
Documentation
86-
-------------
92+
## Documentation
8793

8894
Run
8995

@@ -99,14 +105,17 @@ $
99105

100106
if you want to create local documentation with Sphinx.
101107

108+
## Citation
102109

103-
Citation
104-
--------
110+
If you are using this project including publication in research activities,
111+
you have to cite it using
112+
([BibTeX format](https://raw.github.com/chdemko/php-sorted-collections/develop/cite.bib)).
113+
You are also pleased to send me an email to <chdemko@gmail.com>.
105114

106-
If you are using this project including publication in research activities, you have to cite it using ([BibTeX format](https://raw.github.com/chdemko/php-sorted-collections/develop/cite.bib)). You are also pleased to send me an email to chdemko@gmail.com.
107115
* authors: Christophe Demko
108116
* title: php-sorted-collections: a PHP library for handling sorted collections
109117
* year: 2014
110-
* how published: https://packagist.org/packages/chdemko/sorted-collections
118+
* how published: <https://packagist.org/packages/chdemko/sorted-collections>
111119

112-
All releases can be found [here](https://github.com/chdemko/php-sorted-collections/releases)
120+
All releases can be found
121+
[here](https://github.com/chdemko/php-sorted-collections/releases)

benchmarks/TreeMapBench.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ class TreeMapBench
4848
*/
4949
public function provideCounts()
5050
{
51-
yield array('count' => 100);
52-
yield array('count' => 1000);
53-
yield array('count' => 10000);
54-
yield array('count' => 100000);
51+
yield ['count' => 100];
52+
yield ['count' => 1000];
53+
yield ['count' => 10000];
54+
yield ['count' => 100000];
5555
}
5656

5757
/**
@@ -63,10 +63,10 @@ public function provideCounts()
6363
*/
6464
public function provideTypes()
6565
{
66-
yield array('type' => 'tree');
67-
yield array('type' => 'reversed');
68-
yield array('type' => 'sub', 'from' => 0.30, 'to' => 0.70);
69-
yield array('type' => 'sub', 'from' => 0.40, 'to' => 0.80);
66+
yield ['type' => 'tree'];
67+
yield ['type' => 'reversed'];
68+
yield ['type' => 'sub', 'from' => 0.30, 'to' => 0.70];
69+
yield ['type' => 'sub', 'from' => 0.40, 'to' => 0.80];
7070
}
7171

7272
/**

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
}
1515
],
1616
"require": {
17-
"php": ">=8.1"
17+
"php": ">=8.2"
1818
},
1919
"require-dev": {
20-
"php-coveralls/php-coveralls": "^2.6",
21-
"squizlabs/php_codesniffer": "^3.7",
22-
"phpunit/phpunit": "^10.2",
23-
"phpbench/phpbench": "^1.2"
20+
"php-coveralls/php-coveralls": "^2.7",
21+
"squizlabs/php_codesniffer": "^3.10",
22+
"phpunit/phpunit": "^11.3",
23+
"phpbench/phpbench": "^1.3"
2424
},
2525
"autoload": {
2626
"psr-4": {

0 commit comments

Comments
 (0)