Skip to content

Commit

Permalink
fix: phpstan issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Soare-Robert-Daniel committed Sep 25, 2023
1 parent c9472fc commit a9b7491
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion inc/class-blocks-css.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function_exists( 'wp_is_block_theme' ) &&
$templates_parts = get_block_templates( array( 'slugs__in' => $slugs ), 'wp_template_part' );

foreach ( $templates_parts as $templates_part ) {
if ( isset( $templates_part->content ) && isset( $templates_part->slug ) && in_array( $templates_part->slug, $slugs ) ) {
if ( ! empty( $templates_part->content ) && ! empty( $templates_part->slug ) && in_array( $templates_part->slug, $slugs ) ) {
$content .= $templates_part->content;
}
}
Expand Down
2 changes: 1 addition & 1 deletion inc/class-registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ public function enqueue_dependencies( $post = null ) {
$templates_parts = get_block_templates( array( 'slugs__in' => $slugs ), 'wp_template_part' );

foreach ( $templates_parts as $templates_part ) {
if ( isset( $templates_part->content ) && isset( $templates_part->slug ) && in_array( $templates_part->slug, $slugs ) ) {
if ( ! empty( $templates_part->content ) && ! empty( $templates_part->slug ) && in_array( $templates_part->slug, $slugs ) ) {
$content .= $templates_part->content;
}
}
Expand Down
2 changes: 1 addition & 1 deletion inc/css/class-block-frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ public function enqueue_fse_css() {
$templates_parts = get_block_templates( array( 'slugs__in' => $slugs ), 'wp_template_part' );

foreach ( $templates_parts as $templates_part ) {
if ( isset( $templates_part->content ) && isset( $templates_part->slug ) && in_array( $templates_part->slug, $slugs ) ) {
if ( ! empty( $templates_part->content ) && ! empty( $templates_part->slug ) && in_array( $templates_part->slug, $slugs ) ) {
$content .= $templates_part->content;
}
}
Expand Down

0 comments on commit a9b7491

Please sign in to comment.