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
4 changes: 2 additions & 2 deletions src/Illuminate/Support/Defer/DeferredCallback.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct(public $callback, public ?string $name = null, publi
* @param string $name
* @return $this
*/
public function name(string $name): self
public function name(string $name): static
{
$this->name = $name;

Expand All @@ -35,7 +35,7 @@ public function name(string $name): self
* @param bool $always
* @return $this
*/
public function always(bool $always = true): self
public function always(bool $always = true): static
{
$this->always = $always;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function forget(string $name): void
*
* @return $this
*/
protected function forgetDuplicates(): self
protected function forgetDuplicates(): static
{
$this->callbacks = (new Collection($this->callbacks))
->reverse()
Expand Down
10 changes: 5 additions & 5 deletions src/Illuminate/Testing/Fluent/AssertableJson.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ protected function prop(?string $key = null)
* @param \Closure $callback
* @return $this
*/
protected function scope(string $key, Closure $callback): self
protected function scope(string $key, Closure $callback): static
{
$props = $this->prop($key);
$path = $this->dotPath($key);
Expand All @@ -100,7 +100,7 @@ protected function scope(string $key, Closure $callback): self
* @param \Closure $callback
* @return $this
*/
public function first(Closure $callback): self
public function first(Closure $callback): static
{
$props = $this->prop();

Expand All @@ -124,7 +124,7 @@ public function first(Closure $callback): self
* @param \Closure $callback
* @return $this
*/
public function each(Closure $callback): self
public function each(Closure $callback): static
{
$props = $this->prop();

Expand All @@ -150,7 +150,7 @@ public function each(Closure $callback): self
* @param array $data
* @return static
*/
public static function fromArray(array $data): self
public static function fromArray(array $data): static
{
return new static($data);
}
Expand All @@ -161,7 +161,7 @@ public static function fromArray(array $data): self
* @param \Illuminate\Testing\AssertableJsonString $json
* @return static
*/
public static function fromAssertableJsonString(AssertableJsonString $json): self
public static function fromAssertableJsonString(AssertableJsonString $json): static
{
return static::fromArray($json->json());
}
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Testing/Fluent/Concerns/Debugging.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ trait Debugging
* @param string|null $prop
* @return $this
*/
public function dump(?string $prop = null): self
public function dump(?string $prop = null): static
{
dump($this->prop($prop));

Expand Down
14 changes: 7 additions & 7 deletions src/Illuminate/Testing/Fluent/Concerns/Has.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ trait Has
* @param int|null $length
* @return $this
*/
public function count($key, ?int $length = null): self
public function count($key, ?int $length = null): static
{
if (is_null($length)) {
$path = $this->dotPath();
Expand Down Expand Up @@ -47,7 +47,7 @@ public function count($key, ?int $length = null): self
* @param int|string $max
* @return $this
*/
public function countBetween(int|string $min, int|string $max): self
public function countBetween(int|string $min, int|string $max): static
{
$path = $this->dotPath();

Expand Down Expand Up @@ -80,7 +80,7 @@ public function countBetween(int|string $min, int|string $max): self
* @param \Closure|null $callback
* @return $this
*/
public function has($key, $length = null, ?Closure $callback = null): self
public function has($key, $length = null, ?Closure $callback = null): static
{
$prop = $this->prop();

Expand Down Expand Up @@ -125,7 +125,7 @@ public function has($key, $length = null, ?Closure $callback = null): self
* @param array|string $key
* @return $this
*/
public function hasAll($key): self
public function hasAll($key): static
{
$keys = is_array($key) ? $key : func_get_args();

Expand All @@ -146,7 +146,7 @@ public function hasAll($key): self
* @param array|string $key
* @return $this
*/
public function hasAny($key): self
public function hasAny($key): static
{
$keys = is_array($key) ? $key : func_get_args();

Expand All @@ -168,7 +168,7 @@ public function hasAny($key): self
* @param array|string $key
* @return $this
*/
public function missingAll($key): self
public function missingAll($key): static
{
$keys = is_array($key) ? $key : func_get_args();

Expand All @@ -185,7 +185,7 @@ public function missingAll($key): self
* @param string $key
* @return $this
*/
public function missing(string $key): self
public function missing(string $key): static
{
PHPUnit::assertNotTrue(
Arr::has($this->prop(), $key),
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Testing/Fluent/Concerns/Interaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function interacted(): void
*
* @return $this
*/
public function etc(): self
public function etc(): static
{
$this->interacted = array_keys($this->prop());

Expand Down
14 changes: 7 additions & 7 deletions src/Illuminate/Testing/Fluent/Concerns/Matching.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ trait Matching
* @param mixed|\Closure $expected
* @return $this
*/
public function where(string $key, $expected): self
public function where(string $key, $expected): static
{
$this->has($key);

Expand Down Expand Up @@ -56,7 +56,7 @@ public function where(string $key, $expected): self
* @param mixed|\Closure $expected
* @return $this
*/
public function whereNot(string $key, $expected): self
public function whereNot(string $key, $expected): static
{
$this->has($key);

Expand Down Expand Up @@ -98,7 +98,7 @@ public function whereNot(string $key, $expected): self
* @param string $key
* @return $this
*/
public function whereNull(string $key): self
public function whereNull(string $key): static
{
$this->has($key);

Expand All @@ -121,7 +121,7 @@ public function whereNull(string $key): self
* @param string $key
* @return $this
*/
public function whereNotNull(string $key): self
public function whereNotNull(string $key): static
{
$this->has($key);

Expand All @@ -144,7 +144,7 @@ public function whereNotNull(string $key): self
* @param array $bindings
* @return $this
*/
public function whereAll(array $bindings): self
public function whereAll(array $bindings): static
{
foreach ($bindings as $key => $value) {
$this->where($key, $value);
Expand All @@ -160,7 +160,7 @@ public function whereAll(array $bindings): self
* @param string|array $expected
* @return $this
*/
public function whereType(string $key, $expected): self
public function whereType(string $key, $expected): static
{
$this->has($key);

Expand All @@ -185,7 +185,7 @@ public function whereType(string $key, $expected): self
* @param array $bindings
* @return $this
*/
public function whereAllType(array $bindings): self
public function whereAllType(array $bindings): static
{
foreach ($bindings as $key => $value) {
$this->whereType($key, $value);
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Testing/TestResponseAssert.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ private function __construct(protected TestResponse $response)
/**
* Create a new TestResponse assertion helper.
*/
public static function withResponse(TestResponse $response): self
public static function withResponse(TestResponse $response): static
{
return new static($response);
}
Expand Down