Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.2, 8.1, 8.0, 7.4]
php: [8.5, 8.4, 8.3, 8.2, 8.1, 8.0, 7.4]

name: P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}

Expand Down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"spatie/phpunit-snapshot-assertions": "^4.2"
"spatie/phpunit-snapshot-assertions": "^4.2",
"symfony/property-access": "^5.4",
"symfony/property-info": "^5.4",
"symfony/serializer": "^5.4"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions src/Support/Arr.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public static function exists($array, $key): bool
* @param mixed $default
* @return mixed
*/
public static function first($array, callable $callback = null, $default = null)
public static function first($array, ?callable $callback = null, $default = null)
{
if (is_null($callback)) {
if (empty($array)) {
Expand Down Expand Up @@ -148,7 +148,7 @@ public static function first($array, callable $callback = null, $default = null)
* @param mixed $default
* @return mixed
*/
public static function last(array $array, callable $callback = null, $default = null)
public static function last(array $array, ?callable $callback = null, $default = null)
{
if (is_null($callback)) {
return empty($array) ? val($default) : end($array);
Expand Down
4 changes: 2 additions & 2 deletions src/Support/Collections/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function each(callable $callback): self
return $this;
}

public function filter(callable $callback = null): self
public function filter(?callable $callback = null): self
{
if ($callback) {
return new static(Arr::where($this->items, $callback));
Expand All @@ -53,7 +53,7 @@ public function filter(callable $callback = null): self
* @param mixed $default
* @return mixed
*/
public function first(callable $callback = null, $default = null)
public function first(?callable $callback = null, $default = null)
{
return Arr::first($this->items, $callback, $default);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Support/VirtualFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __destruct()

public function unlink()
{
if (! strpos(dirname($this->path), sys_get_temp_dir())) {
if (strpos(dirname($this->path), sys_get_temp_dir()) === false) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-
location: { column: 0, endLine: 13, startLine: 13 }
node: { variableName: obj, value: { subNodeNames: [class, args], type: Expr_New, rawArgs: { }, firstClassCallable: false, args: { }, line: 13, startLine: 13, endLine: 13, startTokenPos: 57, endTokenPos: 61, startFilePos: 157, endFilePos: 169, comments: { }, docComment: null, attributes: { startLine: 13, startTokenPos: 57, startFilePos: 157, endLine: 13, endTokenPos: 61, endFilePos: 169 }, class: { subNodeNames: [name], parts: [MyClass], first: MyClass, last: MyClass, unqualified: true, qualified: false, fullyQualified: false, relative: false, specialClassName: false, type: Name, line: 13, startLine: 13, endLine: 13, startTokenPos: 59, endTokenPos: 59, startFilePos: 161, endFilePos: 167, comments: { }, docComment: null, attributes: { startLine: 13, startTokenPos: 59, startFilePos: 161, endLine: 13, endTokenPos: 59, endFilePos: 167 }, name: MyClass } }, name: obj, location: { column: 0, endLine: 13, startLine: 13 } }
node: { variableName: obj, value: { subNodeNames: [class, args], type: Expr_New, rawArgs: { }, firstClassCallable: false, partialFunctionApplication: false, args: { }, line: 13, startLine: 13, endLine: 13, startTokenPos: 57, endTokenPos: 61, startFilePos: 157, endFilePos: 169, comments: { }, docComment: null, attributes: { startLine: 13, startTokenPos: 57, startFilePos: 157, endLine: 13, endTokenPos: 61, endFilePos: 169 }, class: { subNodeNames: [name], parts: [MyClass], first: MyClass, last: MyClass, unqualified: true, qualified: false, fullyQualified: false, relative: false, specialClassName: false, type: Name, line: 13, startLine: 13, endLine: 13, startTokenPos: 59, endTokenPos: 59, startFilePos: 161, endFilePos: 167, comments: { }, docComment: null, attributes: { startLine: 13, startTokenPos: 59, startFilePos: 161, endLine: 13, endTokenPos: 59, endFilePos: 167 }, name: MyClass } }, name: obj, location: { column: 0, endLine: 13, startLine: 13 } }
snippet: null
Loading