From a93c8ceccb5230eaef569fd9d1f4cd5f8887072a Mon Sep 17 00:00:00 2001 From: El RIDO Date: Tue, 13 Dec 2022 06:21:37 +0100 Subject: [PATCH] fold extracted function back into the one remaining place calling it --- lib/Data/Filesystem.php | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/lib/Data/Filesystem.php b/lib/Data/Filesystem.php index 19292c8..c1b720e 100644 --- a/lib/Data/Filesystem.php +++ b/lib/Data/Filesystem.php @@ -395,7 +395,7 @@ class Filesystem extends AbstractData public function getAllPastes() { $pastes = array(); - foreach ($this->_getPasteIterator() as $file) { + foreach (new \GlobIterator($this->_path . self::PASTE_FILE_PATTERN) as $file) { if ($file->isFile()) { $pastes[] = $file->getBasename('.php'); } @@ -439,20 +439,6 @@ class Filesystem extends AbstractData '.discussion' . DIRECTORY_SEPARATOR; } - /** - * Get an iterator matching paste files. - * - * Note that creating the iterator issues the glob() call, so we can't pre- - * generate this object before files that should get matched exist. - * - * @access private - * @return \GlobIterator - */ - private function _getPasteIterator() - { - return new \GlobIterator($this->_path . self::PASTE_FILE_PATTERN); - } - /** * store the data *