Conversation
kasparsd
commented
Nov 15, 2025
|
|
||
| if ( ! empty( $excluded ) ) { | ||
| // Merge with dependencies of excluded handles. | ||
| return array_merge( $excluded, $this->get_deps( $excluded ) ); |
Owner
Author
There was a problem hiding this comment.
This now combines the excluded items with their deps.
Contributor
|
@kasparsd Some PHPStan findings. diff --git a/src/minit-asset-cache.php b/src/minit-asset-cache.php
index c0abf70..5b4eab6 100644
--- a/src/minit-asset-cache.php
+++ b/src/minit-asset-cache.php
@@ -146,7 +146,7 @@ class Minit_Asset_Cache {
public function files() {
$files = glob( $this->dir() . '/*', GLOB_NOSORT );
- if ( ! empty( $files ) && is_array( $files ) ) {
+ if ( ! empty( $files ) ) {
return $files;
}
diff --git a/src/minit-plugin.php b/src/minit-plugin.php
index 4cc8b85..a7c3cbe 100644
--- a/src/minit-plugin.php
+++ b/src/minit-plugin.php
@@ -73,19 +73,19 @@ class Minit_Plugin {
/**
* Bump the cache version to bust the cache.
*
- * @return boolean
+ * @return void
*/
public function cache_bump() {
- return $this->minit_cache->bump();
+ $this->minit_cache->bump();
}
/**
* Delete all the cache files.
*
- * @return boolean
+ * @return void
*/
public function cache_purge() {
- return $this->minit_cache->purge();
+ $this->minit_cache->purge();
}
public function init() { |
Owner
Author
|
Thank you @szepeviktor! I'll add phpstan soon! Most of the code was written 10 years ago and I don't relate to a lot of choices made then :) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #96
wp-envas local dep.