Deprecated: Return type of Google\Model::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Model.php on line 256

Deprecated: Return type of Google\Model::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Model.php on line 261

Deprecated: Return type of Google\Model::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Model.php on line 268

Deprecated: Return type of Google\Model::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Model.php on line 278

Deprecated: Return type of Google\Collection::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 22

Deprecated: Return type of Google\Collection::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 38

Deprecated: Return type of Google\Collection::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 30

Deprecated: Return type of Google\Collection::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 43

Deprecated: Return type of Google\Collection::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 14

Deprecated: Return type of Google\Collection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 49
Symfony Profiler

vendor/symfony/finder/Iterator/FileTypeFilterIterator.php line 42

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Symfony package.
  4.  *
  5.  * (c) Fabien Potencier <fabien@symfony.com>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. namespace Symfony\Component\Finder\Iterator;
  11. /**
  12.  * FileTypeFilterIterator only keeps files, directories, or both.
  13.  *
  14.  * @author Fabien Potencier <fabien@symfony.com>
  15.  */
  16. class FileTypeFilterIterator extends \FilterIterator
  17. {
  18.     public const ONLY_FILES 1;
  19.     public const ONLY_DIRECTORIES 2;
  20.     private $mode;
  21.     /**
  22.      * @param \Iterator $iterator The Iterator to filter
  23.      * @param int       $mode     The mode (self::ONLY_FILES or self::ONLY_DIRECTORIES)
  24.      */
  25.     public function __construct(\Iterator $iteratorint $mode)
  26.     {
  27.         $this->mode $mode;
  28.         parent::__construct($iterator);
  29.     }
  30.     /**
  31.      * Filters the iterator values.
  32.      *
  33.      * @return bool true if the value should be kept, false otherwise
  34.      */
  35.     public function accept()
  36.     {
  37.         $fileinfo $this->current();
  38.         if (self::ONLY_DIRECTORIES === (self::ONLY_DIRECTORIES $this->mode) && $fileinfo->isFile()) {
  39.             return false;
  40.         } elseif (self::ONLY_FILES === (self::ONLY_FILES $this->mode) && $fileinfo->isDir()) {
  41.             return false;
  42.         }
  43.         return true;
  44.     }
  45. }