Skip to content

Commit

Permalink
Merge pull request #1351 from ashleyshenton/php-8.4
Browse files Browse the repository at this point in the history
fix: php 8.4 deprecation warnings
  • Loading branch information
Nielsvanpach authored Nov 18, 2024
2 parents 779b0a1 + b774849 commit 9abddaa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/advanced-usage/batch-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Activity::forBatch($uuid)->get(); // all the activity that happend in the batch
```php
class SomeJob
{
public function handle(string $value, string $batchUuid = null)
public function handle(string $value, ?string $batchUuid = null)
{
LogBatch::startBatch();
if($batchUuid) LogBatch::setBatch($batchUuid);
Expand Down
2 changes: 1 addition & 1 deletion src/ActivityLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public function inLog(?string $logName): static
return $this->useLog($logName);
}

public function tap(callable $callback, string $eventName = null): static
public function tap(callable $callback, ?string $eventName = null): static
{
call_user_func($callback, $this->getActivity(), $eventName);

Expand Down
2 changes: 1 addition & 1 deletion src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Spatie\Activitylog\ActivityLogStatus;

if (! function_exists('activity')) {
function activity(string $logName = null): ActivityLogger
function activity(?string $logName = null): ActivityLogger
{
$defaultLogName = config('activitylog.default_log_name');

Expand Down

0 comments on commit 9abddaa

Please sign in to comment.