Skip to content

Commit

Permalink
fix: compat namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubmikita committed Jun 2, 2024
1 parent 9c89f2a commit e178200
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions compat/src-deprecated/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function notification_get_post_by_hash( $hash ) {
function notification_post_is_new( $post ) {
_deprecated_function( __FUNCTION__, '8.0.0' );

/** @var BracketSpace\Notification\Defaults\Adapter\WordPress $notification */
/** @var BracketSpace\Notification\Repository\Adapter\WordPress $notification */
$notification = notification_adapt_from( 'WordPress', $post );
return $notification->isNew();
}
Expand Down Expand Up @@ -482,8 +482,9 @@ function notification_adapt($adapterName, \BracketSpace\Notification\Core\Notifi

if (class_exists($adapterName)) {
$adapter = new $adapterName($notification);
} elseif (class_exists('BracketSpace\\Notification\\Defaults\\Adapter\\' . $adapterName)) {
$adapterName = 'BracketSpace\\Notification\\Defaults\\Adapter\\' . $adapterName;
} elseif (class_exists('BracketSpace\\Notification\\Repository\\Adapter\\' . $adapterName)) {
} elseif (class_exists('BracketSpace\\Notification\\Repository\\Adapter\\' . $adapterName)) {

Check failure on line 486 in compat/src-deprecated/functions.php

View workflow job for this annotation

GitHub Actions / PHPStan (7.4)

Elseif condition is always false.

Check failure on line 486 in compat/src-deprecated/functions.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0)

Elseif condition is always false.

Check failure on line 486 in compat/src-deprecated/functions.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.3)

Elseif condition is always false.

Check failure on line 486 in compat/src-deprecated/functions.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1)

Elseif condition is always false.

Check failure on line 486 in compat/src-deprecated/functions.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2)

Elseif condition is always false.
$adapterName = 'BracketSpace\\Notification\\Repository\\Adapter\\' . $adapterName;
$adapter = new $adapterName($notification);
} else {
throw new \Exception(
Expand Down

0 comments on commit e178200

Please sign in to comment.