Skip to content
Merged
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
14 changes: 14 additions & 0 deletions src/SecretObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -1286,6 +1286,20 @@ public function validate(
return $this;
}

/**
* Check if a property has a value set.
*
* This method checks if the specified property is set (exists and has a value). It returns true if the property exists and has a value, and false otherwise.
*
* @param string $propertyName The name of the property to check.
* @return bool true if the property is set, false otherwise.
*/
public function hasValue($propertyName)
{
$var = PicoStringUtil::camelize($propertyName);
return isset($this->{$var});
}

/**
* Retrieves a value from a nested object using a series of keys.
*
Expand Down