Skip to content

Commit 0ec7c0d

Browse files
committed
Optimisations
- Added phpunit cache to .gitignore - Updated README with latest helper.php example. - Minor phpDocs changes.
1 parent d9c6369 commit 0ec7c0d

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
composer.lock
22
vendor/
3-
.idea/
3+
.idea/
4+
.phpunit.result.cache

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,6 @@ We recommend that you add these helper functions to your project. These will all
300300
To implement the functions below, simply copy the code to a new file and require the file before initializing the router or copy the `helpers.php` we've included in this library.
301301

302302
```php
303-
<?php
304-
305303
use Pecee\SimpleRouter\SimpleRouter as Router;
306304
use Pecee\Http\Url;
307305
use Pecee\Http\Response;
@@ -349,7 +347,7 @@ function request(): Request
349347
/**
350348
* Get input class
351349
* @param string|null $index Parameter index name
352-
* @param string|null $defaultValue Default return value
350+
* @param string|mixed|null $defaultValue Default return value
353351
* @param array ...$methods Default methods
354352
* @return \Pecee\Http\Input\InputHandler|array|string|null
355353
*/

helpers.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function request(): Request
4747
/**
4848
* Get input class
4949
* @param string|null $index Parameter index name
50-
* @param string|null $defaultValue Default return value
50+
* @param string|mixed|null $defaultValue Default return value
5151
* @param array ...$methods Default methods
5252
* @return \Pecee\Http\Input\InputHandler|array|string|null
5353
*/

src/Pecee/Http/Input/InputHandler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ public function find(string $index, ...$methods)
241241
* Get input element value matching index
242242
*
243243
* @param string $index
244-
* @param string|object|null $defaultValue
244+
* @param string|mixed|null $defaultValue
245245
* @param array ...$methods
246246
* @return string|array
247247
*/

0 commit comments

Comments
 (0)