mirror of
https://codeberg.org/icewind/SearchDAV.git
synced 2026-06-03 09:34:08 +02:00
more types
This commit is contained in:
parent
721b8825d8
commit
d3eb42cd90
14 changed files with 32 additions and 34 deletions
|
|
@ -30,15 +30,15 @@ use SearchDAV\XML\BasicSearch;
|
|||
use SearchDAV\Backend\SearchPropertyDefinition;
|
||||
|
||||
class DummyBackend implements ISearchBackend {
|
||||
public function getArbiterPath() {
|
||||
public function getArbiterPath(): string {
|
||||
return '';
|
||||
}
|
||||
|
||||
public function isValidScope($href, $depth, $path) {
|
||||
public function isValidScope(string $href, $depth, ?string $path): bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getPropertyDefinitionsForScope($href, $path) {
|
||||
public function getPropertyDefinitionsForScope($href, $path): array {
|
||||
return [
|
||||
new SearchPropertyDefinition('{DAV:}getcontentlength', true, true, true, SearchPropertyDefinition::DATATYPE_NONNEGATIVE_INTEGER),
|
||||
new SearchPropertyDefinition('{DAV:}getcontenttype', true, true, true),
|
||||
|
|
@ -47,7 +47,7 @@ class DummyBackend implements ISearchBackend {
|
|||
];
|
||||
}
|
||||
|
||||
public function search(Query $query) {
|
||||
public function search(Query $query): array {
|
||||
return [
|
||||
new SearchResult(new SimpleFile('foo.txt', 'foobar', 'text/plain'), '/bar/foo.txt')
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue