Skip to content

Commit 186596e

Browse files
authored
Add missing functions to FilesystemDecorator (#865)
1 parent 6d42ea7 commit 186596e

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

phpstan-baseline.neon

-5
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,6 @@ parameters:
100100
count: 1
101101
path: src/Sentry/Laravel/Features/Storage/Integration.php
102102

103-
-
104-
message: "#^Parameter \\$exceptions of method Sentry\\\\Laravel\\\\Integration\\:\\:handles\\(\\) has invalid type Illuminate\\\\Foundation\\\\Configuration\\\\Exceptions\\.$#"
105-
count: 1
106-
path: src/Sentry/Laravel/Integration.php
107-
108103
-
109104
message: "#^Class Laravel\\\\Lumen\\\\Application not found\\.$#"
110105
count: 3

src/Sentry/Laravel/Features/Storage/FilesystemDecorator.php

+15
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ protected function withSentry(string $method, array $args, ?string $description,
6767
return $this->filesystem->{$method}(...$args);
6868
}
6969

70+
public function path($path)
71+
{
72+
return $this->withSentry(__FUNCTION__, func_get_args(), $path, compact('path'));
73+
}
74+
7075
public function exists($path)
7176
{
7277
return $this->withSentry(__FUNCTION__, func_get_args(), $path, compact('path'));
@@ -89,6 +94,16 @@ public function put($path, $contents, $options = [])
8994
return $this->withSentry(__FUNCTION__, func_get_args(), $description, compact('path', 'options'));
9095
}
9196

97+
public function putFile($path, $file = null, $options = [])
98+
{
99+
return $this->withSentry(__FUNCTION__, func_get_args(), $path, compact('path', 'file', 'options'));
100+
}
101+
102+
public function putFileAs($path, $file, $name = null, $options = [])
103+
{
104+
return $this->withSentry(__FUNCTION__, func_get_args(), $path, compact('path', 'file', 'name', 'options'));
105+
}
106+
92107
public function writeStream($path, $resource, array $options = [])
93108
{
94109
return $this->withSentry(__FUNCTION__, func_get_args(), $path, compact('path', 'options'));

0 commit comments

Comments
 (0)