public function finishProperty(&$property = null)
    {
        if (!$this->property) {
            throw new DcGeneralRuntimeException('Property is missing, please create a property first');
        }

        if ($this->condition) {
            $this->finishCondition();
        }

        $properties = \is_object($this->property) ? [$this->property] : $this->property;

        foreach ($properties as $index => $tempProperty) {
            $event = new FinishPropertyEvent($tempProperty, $this);
            $this->dispatchEvent($event);
            $properties[$index] = $event->getProperty();
        }

        if ($this->legend) {
            $this->legend->addProperties($properties);
        }

        $property = $properties;

        $this->property = null;

        return $this;
    }