Skip to content

Commit

Permalink
Add missing functions to FilesystemDecorator (#865)
Browse files Browse the repository at this point in the history
  • Loading branch information
cleptric authored Mar 12, 2024
1 parent 6d42ea7 commit 186596e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
5 changes: 0 additions & 5 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,6 @@ parameters:
count: 1
path: src/Sentry/Laravel/Features/Storage/Integration.php

-
message: "#^Parameter \\$exceptions of method Sentry\\\\Laravel\\\\Integration\\:\\:handles\\(\\) has invalid type Illuminate\\\\Foundation\\\\Configuration\\\\Exceptions\\.$#"
count: 1
path: src/Sentry/Laravel/Integration.php

-
message: "#^Class Laravel\\\\Lumen\\\\Application not found\\.$#"
count: 3
Expand Down
15 changes: 15 additions & 0 deletions src/Sentry/Laravel/Features/Storage/FilesystemDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ protected function withSentry(string $method, array $args, ?string $description,
return $this->filesystem->{$method}(...$args);
}

public function path($path)
{
return $this->withSentry(__FUNCTION__, func_get_args(), $path, compact('path'));
}

public function exists($path)
{
return $this->withSentry(__FUNCTION__, func_get_args(), $path, compact('path'));
Expand All @@ -89,6 +94,16 @@ public function put($path, $contents, $options = [])
return $this->withSentry(__FUNCTION__, func_get_args(), $description, compact('path', 'options'));
}

public function putFile($path, $file = null, $options = [])
{
return $this->withSentry(__FUNCTION__, func_get_args(), $path, compact('path', 'file', 'options'));
}

public function putFileAs($path, $file, $name = null, $options = [])
{
return $this->withSentry(__FUNCTION__, func_get_args(), $path, compact('path', 'file', 'name', 'options'));
}

public function writeStream($path, $resource, array $options = [])
{
return $this->withSentry(__FUNCTION__, func_get_args(), $path, compact('path', 'options'));
Expand Down

0 comments on commit 186596e

Please sign in to comment.