src/Mouf/Reflection/TypesDescriptor.php
public function getCompatibleTypeForInstance($value) {
		foreach ($this->types as $type) {
			if ($type->isCompatible($value)) {
				return $type;
			}
		}
		return null;
	}
public function getCompatibleTypeForInstance($value) {
		foreach ($this->types as $type) {
			if ($type->isCompatible($value)) {
				return $type;
			}
		}
		return null;
	}
public function getCompatibleTypeForInstance ( $ value ) { foreach ( $ this -> types as $ type ) { if ( $ type -> isCompatible ( $ value ) ) { return $ type ; } } return null ; }
Returns the TypeDescriptor that is part of these types that is the most likely to fit the propertyDescriptor's value
passed in parameter.
Returns null if no type is compatible.

@param string|array|MoufInstanceDescriptor|MoufInstanceDescriptor[] $instanceDescriptor
@return TypeDescriptor
Returns the TypeDescriptor that is part of these types that is the most likely to fit the propertyDescriptor s value passed in parameter . Returns null if no type is compatible .