-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ec47757
commit 891e9ab
Showing
7 changed files
with
57 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,40 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Assets package. | ||
* | ||
* (c) Inpsyde GmbH | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Inpsyde\Assets\Caching; | ||
|
||
|
||
use Inpsyde\Assets\Asset; | ||
use Inpsyde\Assets\AssetManager; | ||
use Inpsyde\Assets\BaseAsset; | ||
use Inpsyde\Assets\Script; | ||
use Inpsyde\Assets\Style; | ||
|
||
class IgnoreCacheHandler{ | ||
class IgnoreCacheHandler | ||
{ | ||
public function execute(AssetManager $assetManager) | ||
Check failure on line 13 in src/Caching/IgnoreCacheHandler.php GitHub Actions / static-code-analysis-php / static-analysis-phpMissingReturnType
|
||
{ | ||
/** @var IgnorePluginCacheInterface[] $handlers */ | ||
$handlers = [ | ||
new IgnoreW3TotalCache(), | ||
new IgnoreSitegroundCache() | ||
new IgnoreSitegroundCache(), | ||
]; | ||
|
||
$assets = $assetManager->assets(); | ||
|
||
$assetHandles = [ | ||
Script::class => [], | ||
Style::class => [] | ||
Style::class => [], | ||
]; | ||
|
||
foreach($assets as $assetKey => $assetType){ | ||
foreach($assetType as $asset){ | ||
foreach ($assets as $assetKey => $assetType) { | ||
foreach ($assetType as $asset) { | ||
$assetHandles[$assetKey][] = $asset->handle(); | ||
} | ||
} | ||
|
||
foreach($handlers as $ignorePluginHandler){ | ||
if($ignorePluginHandler->isInstalled()){ | ||
foreach ($handlers as $ignorePluginHandler) { | ||
if ($ignorePluginHandler->isInstalled()) { | ||
$ignorePluginHandler->apply($assetHandles); | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,11 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Assets package. | ||
* | ||
* (c) Inpsyde GmbH | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Inpsyde\Assets\Caching; | ||
|
||
use Inpsyde\Assets\Asset; | ||
|
||
interface IgnorePluginCacheInterface{ | ||
interface IgnorePluginCacheInterface | ||
{ | ||
public function isInstalled(): bool; | ||
public function apply(array $handles): void; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters