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
def deprecated(arg): | |
if callable(arg): | |
return deprecated_auto_message(arg) | |
else: | |
return deprecated_user_message(arg) | |
def deprecated_auto_message(func): | |
def wrapper(*args, **kwargs): | |
message = "Function {} is deprecated.".format(func.__name__) | |
warn_deprecation(message, 3) |
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
<?php | |
namespace Tests; | |
use PHPUnit\Framework\TestCase; | |
class TestUtils | |
{ | |
public static function invokePrivateMethod(object $object, string $methodName): callable | |
{ |
OlderNewer