File tree 2 files changed +12
-2
lines changed
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 4
4
5
5
namespace League \Flysystem ;
6
6
7
- class DirectoryAttributes implements StorageAttributes
7
+ class DirectoryAttributes implements StorageAttributes, \Stringable
8
8
{
9
9
use ProxyArrayAccessToProperties;
10
10
private string $ type = StorageAttributes::TYPE_DIRECTORY ;
@@ -84,4 +84,9 @@ public function jsonSerialize(): array
84
84
StorageAttributes::ATTRIBUTE_EXTRA_METADATA => $ this ->extraMetadata ,
85
85
];
86
86
}
87
+
88
+ public function __toString (): string
89
+ {
90
+ return sprintf ('%s(%s) ' , $ this ->type , $ this ->path );
91
+ }
87
92
}
Original file line number Diff line number Diff line change 4
4
5
5
namespace League \Flysystem ;
6
6
7
- class FileAttributes implements StorageAttributes
7
+ class FileAttributes implements StorageAttributes, \Stringable
8
8
{
9
9
use ProxyArrayAccessToProperties;
10
10
private string $ type = StorageAttributes::TYPE_FILE ;
@@ -97,4 +97,9 @@ public function jsonSerialize(): array
97
97
StorageAttributes::ATTRIBUTE_EXTRA_METADATA => $ this ->extraMetadata ,
98
98
];
99
99
}
100
+
101
+ public function __toString (): string
102
+ {
103
+ return sprintf ('%s(%s) ' , $ this ->type , $ this ->path );
104
+ }
100
105
}
You can’t perform that action at this time.
0 commit comments