Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Commit 022ec79

Browse files
WIP
1 parent 2f2430d commit 022ec79

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
uses: shivammathur/setup-php@v2
4040
with:
4141
php-version: ${{ matrix.php }}
42-
extensions: curl, mbstring, pdo
42+
extensions: mbstring
4343
coverage: none
4444

4545
- name: Install dependencies

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Latest stable release][version-badge]][link-packagist]
44
[![Software license][license-badge]](LICENSE.md)
5-
[![Build status][travis-badge]][link-travis]
5+
[![Build status][githubaction-badge]][link-githubaction]
66
[![Total downloads][downloads-badge]][link-packagist]
77
[![Total stars][stars-badge]][link-github]
88

@@ -45,7 +45,7 @@
4545

4646
## Requirements
4747

48-
- PHP 7.2 or higher
48+
- PHP 8 or higher
4949

5050
## How to install
5151

@@ -500,7 +500,7 @@ Have a project that could use some guidance? Send me an e-mail at [hello@sebasti
500500

501501
[version-badge]: https://img.shields.io/packagist/v/sebastiaanluca/php-helpers.svg?label=stable
502502
[license-badge]: https://img.shields.io/badge/license-MIT-informational.svg
503-
[travis-badge]: https://img.shields.io/travis/sebastiaanluca/php-helpers/master.svg
503+
[githubaction-badge]: https://github.com/sebastiaanluca/php-helpers/actions/workflows/test.yml/badge.svg?branch=master
504504
[downloads-badge]: https://img.shields.io/packagist/dt/sebastiaanluca/php-helpers.svg?color=brightgreen
505505
[stars-badge]: https://img.shields.io/github/stars/sebastiaanluca/php-helpers.svg?color=brightgreen
506506

@@ -511,7 +511,7 @@ Have a project that could use some guidance? Send me an e-mail at [hello@sebasti
511511

512512
[link-github]: https://github.com/sebastiaanluca/php-helpers
513513
[link-packagist]: https://packagist.org/packages/sebastiaanluca/php-helpers
514-
[link-travis]: https://travis-ci.org/sebastiaanluca/php-helpers
514+
[link-githubaction]: https://github.com/sebastiaanluca/php-helpers/actions/workflows/test.yml?query=branch%3Amaster
515515
[link-twitter-share]: https://twitter.com/intent/tweet?text=Check%20out%20this%20extensive%20set%20of%20generic%20PHP%20helper%20functions%20and%20classes!%20Via%20@sebastiaanluca%20https://github.com/sebastiaanluca/php-helpers
516516
[link-contributors]: ../../contributors
517517

src/Functions/generic.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* @return bool
1212
*/
13-
function rand_bool() : bool
13+
function rand_bool(): bool
1414
{
1515
return random_int(0, 1) === 0;
1616
}
@@ -25,9 +25,9 @@ function rand_bool() : bool
2525
*
2626
* @return string
2727
*/
28-
function str_wrap($string, $wrapper) : string
28+
function str_wrap($string, $wrapper): string
2929
{
30-
return $wrapper . $string . $wrapper;
30+
return $wrapper.$string.$wrapper;
3131
}
3232
}
3333

@@ -42,7 +42,7 @@ function str_wrap($string, $wrapper) : string
4242
*
4343
* @return bool
4444
*/
45-
function is_assoc_array($array) : bool
45+
function is_assoc_array($array): bool
4646
{
4747
return array_keys($array) !== range(0, count($array) - 1);
4848
}
@@ -60,7 +60,7 @@ function is_assoc_array($array) : bool
6060
*
6161
* @return array
6262
*/
63-
function array_expand(array $array) : array
63+
function array_expand(array $array): array
6464
{
6565
$expanded = [];
6666

@@ -81,7 +81,7 @@ function array_expand(array $array) : array
8181
*
8282
* @return array
8383
*/
84-
function array_without(array $array, $values) : array
84+
function array_without(array $array, $values): array
8585
{
8686
$values = ! is_array($values) ? [$values] : $values;
8787

@@ -100,7 +100,7 @@ function array_without(array $array, $values) : array
100100
*
101101
* @return array
102102
*/
103-
function array_pull_values(array &$array, array $values) : array
103+
function array_pull_values(array &$array, array $values): array
104104
{
105105
$matches = array_values(array_intersect($array, $values));
106106

@@ -137,7 +137,7 @@ function array_pull_value(array &$array, $value)
137137
*
138138
* @return string
139139
*/
140-
function array_hash(array $array) : string
140+
function array_hash(array $array): string
141141
{
142142
return md5(serialize($array));
143143
}
@@ -151,7 +151,7 @@ function array_hash(array $array) : string
151151
*
152152
* @return string
153153
*/
154-
function object_hash($object) : string
154+
function object_hash($object): string
155155
{
156156
return md5(serialize($object));
157157
}
@@ -166,7 +166,7 @@ function object_hash($object) : string
166166
*
167167
* @return bool
168168
*/
169-
function has_public_method($object, $method) : bool
169+
function has_public_method($object, $method): bool
170170
{
171171
return MethodHelper::hasPublicMethod($object, $method);
172172
}
@@ -180,7 +180,7 @@ function has_public_method($object, $method) : bool
180180
*
181181
* @return \Carbon\Carbon
182182
*/
183-
function carbon($timeString = null) : Carbon
183+
function carbon($timeString = null): Carbon
184184
{
185185
return new \Carbon\Carbon($timeString);
186186
}
@@ -198,7 +198,7 @@ function carbon($timeString = null) : Carbon
198198
*
199199
* @return array An array with a `file` and `path` key.
200200
*/
201-
function temporary_file() : array
201+
function temporary_file(): array
202202
{
203203
$file = tmpfile();
204204
$path = stream_get_meta_data($file)['uri'];

0 commit comments

Comments
 (0)