1<?php
2declare(strict_types = 1);
3namespace TYPO3\CMS\Core\Resource\Search\Result;
4
5/*
6 * This file is part of the TYPO3 CMS project.
7 *
8 * It is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, either version 2
10 * of the License, or any later version.
11 *
12 * For the full copyright and license information, please read the
13 * LICENSE.txt file that was distributed with this source code.
14 *
15 * The TYPO3 project - inspiring people to share!
16 */
17
18/**
19 * Represents an empty search result (no matches found)
20 */
21class EmptyFileSearchResult implements FileSearchResultInterface
22{
23    /**
24     * @return int
25     * @see Countable::count()
26     */
27    public function count(): int
28    {
29        return 0;
30    }
31
32    /**
33     * @see Iterator::current()
34     */
35    public function current(): void
36    {
37        // Noop
38    }
39
40    /**
41     * @see Iterator::key()
42     */
43    public function key(): void
44    {
45        // Noop
46    }
47
48    /**
49     * @see Iterator::next()
50     */
51    public function next(): void
52    {
53        // Noop
54    }
55
56    /**
57     * @see Iterator::rewind()
58     */
59    public function rewind(): void
60    {
61        // Noop
62    }
63
64    /**
65     * @return bool
66     * @see Iterator::valid()
67     */
68    public function valid(): bool
69    {
70        return false;
71    }
72}
73