Added method validate() to \ncc\Objects > ProjectConfiguration

This commit is contained in:
Zi Xing 2022-04-06 22:23:00 -04:00
parent 9ebab2135b
commit 6e95945fa2

View file

@ -2,6 +2,7 @@
namespace ncc\Objects;
use ncc\Exceptions\InvalidProjectConfigurationException;
use ncc\Objects\ProjectConfiguration\Assembly;
use ncc\Objects\ProjectConfiguration\Build;
use ncc\Objects\ProjectConfiguration\Project;
@ -30,6 +31,21 @@
*/
public $Build;
/**
* Validates the object for any errors
*
* @param bool $throw_exception
* @return bool
* @throws InvalidProjectConfigurationException
*/
public function validate(bool $throw_exception=false): bool
{
if($this->Assembly->validate($throw_exception) == false)
return false;
return true;
}
/**
* Returns an array representation of the object
*