productName = trim($this->productName); $this->productVersion = trim($this->productVersion); $this->bankCode = trim($this->bankCode); $this->url = trim($this->url); if (strlen($this->productName) === 0) { throw new \InvalidArgumentException('Product name required!'); } if (strlen($this->productVersion) === 0) { throw new \InvalidArgumentException('Product version required!'); } if (strlen($this->bankCode) === 0) { throw new \InvalidArgumentException('Bank code required!'); } if (strlen($this->url) === 0) { throw new \InvalidArgumentException('Server URL required!'); } } }