From e958195436b62eb9b4b673e3bb57bd022c51512d Mon Sep 17 00:00:00 2001 From: barchard Date: Sun, 11 Sep 2022 21:58:54 -0400 Subject: [PATCH 1/2] Create NoopAsset.php The default implementation of `MockAsset` does not return anything within `dump`. We're extending `MockAsset` as a way to ignore an Asset from the optimization pipeline. --- src/Assetic/Asset/NoopAsset.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/Assetic/Asset/NoopAsset.php diff --git a/src/Assetic/Asset/NoopAsset.php b/src/Assetic/Asset/NoopAsset.php new file mode 100644 index 0000000..268aa61 --- /dev/null +++ b/src/Assetic/Asset/NoopAsset.php @@ -0,0 +1,19 @@ +getContent(); + } +} From 962f4db67661c67aec30b94a18e06f1074c023f2 Mon Sep 17 00:00:00 2001 From: Ben Thomson Date: Mon, 12 Sep 2022 11:27:02 +0800 Subject: [PATCH 2/2] Fix code smells --- src/Assetic/Asset/NoopAsset.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Assetic/Asset/NoopAsset.php b/src/Assetic/Asset/NoopAsset.php index 268aa61..dfa6e98 100644 --- a/src/Assetic/Asset/NoopAsset.php +++ b/src/Assetic/Asset/NoopAsset.php @@ -7,13 +7,13 @@ /** * Class NoopAsset * - * This class returns the content, unmodified, as a way to skip + * This class returns the content, unmodified, as a way to skip * or ignore an Asset during optimization. */ class NoopAsset extends MockAsset { public function dump(FilterInterface $additionalFilter = null) { - return $this->getContent(); + return $this->getContent(); } }