File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 44
55namespace League \Flysystem ;
66
7- class DirectoryAttributes implements StorageAttributes
7+ class DirectoryAttributes implements StorageAttributes, \Stringable
88{
99 use ProxyArrayAccessToProperties;
1010 private string $ type = StorageAttributes::TYPE_DIRECTORY ;
@@ -84,4 +84,9 @@ public function jsonSerialize(): array
8484 StorageAttributes::ATTRIBUTE_EXTRA_METADATA => $ this ->extraMetadata ,
8585 ];
8686 }
87+
88+ public function __toString (): string
89+ {
90+ return sprintf ('%s(%s) ' , $ this ->type , $ this ->path );
91+ }
8792}
Original file line number Diff line number Diff line change 44
55namespace League \Flysystem ;
66
7- class FileAttributes implements StorageAttributes
7+ class FileAttributes implements StorageAttributes, \Stringable
88{
99 use ProxyArrayAccessToProperties;
1010 private string $ type = StorageAttributes::TYPE_FILE ;
@@ -97,4 +97,9 @@ public function jsonSerialize(): array
9797 StorageAttributes::ATTRIBUTE_EXTRA_METADATA => $ this ->extraMetadata ,
9898 ];
9999 }
100+
101+ public function __toString (): string
102+ {
103+ return sprintf ('%s(%s) ' , $ this ->type , $ this ->path );
104+ }
100105}
You can’t perform that action at this time.
0 commit comments