Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Massive VCF Import – Thrown problematic #223

Open
wants to merge 2 commits into
base: 2.0.0-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Property/Parameter/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ final class Type implements PropertyParameterInterface, SimpleNodeInterface
public function __construct(string $value)
{
if (!in_array($value, self::POSSIBLE_VALUES, true)) {
throw PropertyParameterException::forWrongValue($value, self::POSSIBLE_VALUES);
$value = self::HOME;
}

$this->value = $value;
Expand Down
5 changes: 2 additions & 3 deletions src/VCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,19 +120,18 @@ private function addProperty(PropertyInterface $property): void

/**
* @param PropertyParameterInterface $propertyParameter
* @throws VCardException
*/
private function addPropertyParameter(PropertyParameterInterface $propertyParameter): void
{
// Parameter is not allowed multiple times
if ($this->hasParameter(get_class($propertyParameter))) {
throw VCardException::forExistingPropertyParameter($propertyParameter);
return;
}

$this->parameters[] = $propertyParameter;
}

public function getKind(): Kind
public function getKind()
{
$kind = $this->getParameters(Kind::class);

Expand Down