diff --git a/core/lib/Drupal/Core/StreamWrapper/PrivateStream.php b/core/lib/Drupal/Core/StreamWrapper/PrivateStream.php index bf8b907..6933004 100644 --- a/core/lib/Drupal/Core/StreamWrapper/PrivateStream.php +++ b/core/lib/Drupal/Core/StreamWrapper/PrivateStream.php @@ -2,13 +2,11 @@ /** * @file - * Definition of Drupal\Core\StreamWrapper\PrivateStream. + * Contains \Drupal\Core\StreamWrapper\PrivateStream. */ namespace Drupal\Core\StreamWrapper; -use Drupal\Core\Annotation\StreamWrapper; -use Drupal\Core\Annotation\Translation; use Drupal\Core\StreamWrapper\LocalStream; /** @@ -27,20 +25,18 @@ class PrivateStream extends LocalStream { /** - * Implements Drupal\Core\StreamWrapper\LocalStream::getDirectoryPath() + * {@inheritdoc} */ public function getDirectoryPath() { return \Drupal::config('system.file')->get('path.private'); } /** - * Implements Drupal\Core\StreamWrapper\StreamWrapperInterface::getExternalUrl(). - * - * @return string - * Returns the HTML URI of a private file. + * {@inheritdoc} */ function getExternalUrl() { $path = str_replace('\\', '/', $this->getTarget()); return url('system/files/' . $path, array('absolute' => TRUE)); } + } diff --git a/core/lib/Drupal/Core/StreamWrapper/PublicStream.php b/core/lib/Drupal/Core/StreamWrapper/PublicStream.php index 3422084..500d0ee 100644 --- a/core/lib/Drupal/Core/StreamWrapper/PublicStream.php +++ b/core/lib/Drupal/Core/StreamWrapper/PublicStream.php @@ -2,14 +2,12 @@ /** * @file - * Definition of Drupal\Core\StreamWrapper\PublicStream. + * Contains \Drupal\Core\StreamWrapper\PublicStream. */ namespace Drupal\Core\StreamWrapper; use Drupal\Core\StreamWrapper\LocalStream; -use Drupal\Core\Annotation\StreamWrapper; -use Drupal\Core\Annotation\Translation; /** * Defines a Drupal public (public://) stream wrapper class. diff --git a/core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php b/core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php index 0ace393..1a3dfc7 100644 --- a/core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php +++ b/core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php @@ -2,14 +2,12 @@ /** * @file - * Definition of Drupal\Core\StreamWrapper\TemporaryStream. + * Contains \Drupal\Core\StreamWrapper\TemporaryStream. */ namespace Drupal\Core\StreamWrapper; use Drupal\Core\StreamWrapper\LocalStream; -use Drupal\Core\Annotation\StreamWrapper; -use Drupal\Core\Annotation\Translation; /** * Defines a Drupal temporary (temporary://) stream wrapper class. @@ -27,17 +25,18 @@ class TemporaryStream extends LocalStream { /** - * Implements Drupal\Core\StreamWrapper\LocalStream::getDirectoryPath() + * {@inheritdoc} */ public function getDirectoryPath() { return file_directory_temp(); } /** - * Implements Drupal\Core\StreamWrapper\StreamWrapperInterface::getExternalUrl(). + * {@inheritdoc} */ public function getExternalUrl() { $path = str_replace('\\', '/', $this->getTarget()); return url('system/temporary/' . $path, array('absolute' => TRUE)); } + } diff --git a/core/modules/file/tests/file_test/lib/Drupal/file_test/StreamWrapper/DummyReadOnlyStreamWrapper.php b/core/modules/file/tests/file_test/lib/Drupal/file_test/StreamWrapper/DummyReadOnlyStreamWrapper.php index 5b5b09d..52293ce 100644 --- a/core/modules/file/tests/file_test/lib/Drupal/file_test/StreamWrapper/DummyReadOnlyStreamWrapper.php +++ b/core/modules/file/tests/file_test/lib/Drupal/file_test/StreamWrapper/DummyReadOnlyStreamWrapper.php @@ -8,8 +8,6 @@ namespace Drupal\file_test\StreamWrapper; use Drupal\Core\StreamWrapper\LocalReadOnlyStream; -use Drupal\Core\Annotation\StreamWrapper; -use Drupal\Core\Annotation\Translation; /** * Helper class for testing the stream wrapper registry. @@ -23,25 +21,26 @@ * ) */ class DummyReadOnlyStreamWrapper extends LocalReadOnlyStream { + + /** + * {@inheritdoc} + */ function getDirectoryPath() { return variable_get('stream_public_path', 'sites/default/files'); } /** - * Override getInternalUri(). - * - * Return a dummy path for testing. + * {@inheritdoc} */ function getInternalUri() { return '/dummy/example.txt'; } /** - * Override getExternalUrl(). - * - * Return the HTML URI of a public file. + * {@inheritdoc} */ function getExternalUrl() { return '/dummy/example.txt'; } + } diff --git a/core/modules/file/tests/file_test/lib/Drupal/file_test/StreamWrapper/DummyRemoteStreamWrapper.php b/core/modules/file/tests/file_test/lib/Drupal/file_test/StreamWrapper/DummyRemoteStreamWrapper.php index e156d6a..6dc2d0e 100644 --- a/core/modules/file/tests/file_test/lib/Drupal/file_test/StreamWrapper/DummyRemoteStreamWrapper.php +++ b/core/modules/file/tests/file_test/lib/Drupal/file_test/StreamWrapper/DummyRemoteStreamWrapper.php @@ -8,8 +8,6 @@ namespace Drupal\file_test\StreamWrapper; use Drupal\Core\StreamWrapper\PublicStream; -use Drupal\Core\Annotation\StreamWrapper; -use Drupal\Core\Annotation\Translation; /** * Helper class for testing the stream wrapper registry. @@ -25,7 +23,12 @@ * ) */ class DummyRemoteStreamWrapper extends PublicStream { + + /** + * {@inheritdoc} + */ function realpath() { return FALSE; } + } diff --git a/core/modules/file/tests/file_test/lib/Drupal/file_test/StreamWrapper/DummyStreamWrapper.php b/core/modules/file/tests/file_test/lib/Drupal/file_test/StreamWrapper/DummyStreamWrapper.php index ffc3d9d..ffd6311 100644 --- a/core/modules/file/tests/file_test/lib/Drupal/file_test/StreamWrapper/DummyStreamWrapper.php +++ b/core/modules/file/tests/file_test/lib/Drupal/file_test/StreamWrapper/DummyStreamWrapper.php @@ -8,8 +8,6 @@ namespace Drupal\file_test\StreamWrapper; use Drupal\Core\StreamWrapper\LocalStream; -use Drupal\Core\Annotation\StreamWrapper; -use Drupal\Core\Annotation\Translation; /** * Helper class for testing the stream wrapper registry. @@ -28,20 +26,17 @@ function getDirectoryPath() { } /** - * Override getInternalUri(). - * - * Return a dummy path for testing. + * {@inheritdoc} */ function getInternalUri() { return '/dummy/example.txt'; } /** - * Override getExternalUrl(). - * - * Return the HTML URI of a public file. + * {@inheritdoc} */ function getExternalUrl() { return '/dummy/example.txt'; } + } diff --git a/core/modules/locale/lib/Drupal/locale/StreamWrapper/TranslationsStream.php b/core/modules/locale/lib/Drupal/locale/StreamWrapper/TranslationsStream.php index 8a241d5..5492275 100644 --- a/core/modules/locale/lib/Drupal/locale/StreamWrapper/TranslationsStream.php +++ b/core/modules/locale/lib/Drupal/locale/StreamWrapper/TranslationsStream.php @@ -2,14 +2,12 @@ /** * @file - * Definition of Drupal\locale\StreamWrapper\TranslationStream. + * Contains \Drupal\locale\StreamWrapper\TranslationStream. */ namespace Drupal\locale\StreamWrapper; use Drupal\Core\StreamWrapper\LocalStream; -use Drupal\Core\Annotation\StreamWrapper; -use Drupal\Core\Annotation\Translation; /** * Defines a Drupal translations (translations://) stream wrapper class. @@ -26,17 +24,19 @@ class TranslationsStream extends LocalStream { /** - * Implements Drupal\Core\StreamWrapper\LocalStream::getDirectoryPath() + * {@inheritdoc} */ function getDirectoryPath() { return \Drupal::config('locale.settings')->get('translation.path'); } /** - * Implements Drupal\Core\StreamWrapper\StreamWrapperInterface::getExternalUrl(). + * {@inheritdoc} + * * @throws \LogicException PO files URL should not be public. */ function getExternalUrl() { throw new \LogicException('PO files URL should not be public.'); } + }