Aggiornato Composer
This commit is contained in:
@@ -17,6 +17,7 @@ namespace Ramsey\Collection\Tool;
|
||||
use Ramsey\Collection\Exception\ValueExtractionException;
|
||||
|
||||
use function get_class;
|
||||
use function is_object;
|
||||
use function method_exists;
|
||||
use function property_exists;
|
||||
use function sprintf;
|
||||
@@ -37,6 +38,7 @@ trait ValueExtractorTrait
|
||||
*
|
||||
* @throws ValueExtractionException if the method or property is not defined.
|
||||
*/
|
||||
// phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
|
||||
protected function extractValue($object, string $propertyOrMethod)
|
||||
{
|
||||
if (!is_object($object)) {
|
||||
@@ -52,7 +54,8 @@ trait ValueExtractorTrait
|
||||
}
|
||||
|
||||
throw new ValueExtractionException(
|
||||
sprintf('Method or property "%s" not defined in %s', $propertyOrMethod, get_class($object))
|
||||
// phpcs:ignore SlevomatCodingStandard.Classes.ModernClassNameReference.ClassNameReferencedViaFunctionCall
|
||||
sprintf('Method or property "%s" not defined in %s', $propertyOrMethod, get_class($object)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user