/**
  * @param Project|array $jsonData
  *
  * @return Project|void
  * @throws \Crane\Validator\ValidatorException
  */
 public function append($jsonData)
 {
     if (false === $jsonData instanceof Project) {
         $this->linter->check($jsonData);
         if (false === $this->linter->isValid()) {
             throw new ValidatorException($this->linter);
         }
         $project = new Project($jsonData);
     } else {
         $project = $jsonData;
     }
     $this->offsetSet($project->getName(), $project);
     return $project;
 }
 public function __construct(CraneJsonValidator $validator, Exception $previous = null)
 {
     $this->errors = $validator->getErrors();
     parent::__construct("JSON is not valid\n" . print_r($validator->getErrors(), 1), 1, $previous);
 }