-
Notifications
You must be signed in to change notification settings - Fork 430
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
a6322dc
commit 4bef757
Showing
2 changed files
with
38 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
namespace FalseyCoalesce; | ||
|
||
use PHPStan\TrinaryLogic; | ||
use function PHPStan\Testing\assertVariableCertainty; | ||
|
||
interface TipPluginInterface | ||
{ | ||
|
||
/** | ||
* Used for returning values by key. | ||
* | ||
* @return string | ||
* Value of the key. | ||
* @var string | ||
* Key of the value. | ||
* | ||
*/ | ||
public function get($key); | ||
|
||
} | ||
|
||
abstract class TipPluginBase implements TipPluginInterface | ||
{ | ||
|
||
public function getLocation(): void | ||
{ | ||
$location = $this->get('position'); | ||
assertVariableCertainty(TrinaryLogic::createYes(), $location); | ||
|
||
$location ?? ''; | ||
assertVariableCertainty(TrinaryLogic::createYes(), $location); | ||
} | ||
|
||
} | ||
|