private function validateBeacon(Beacon $beacon) { if ($this->isBlankOrNull($beacon->getProximityUUID())) { $this->addError(self::BEACON_PROXIMITY_UUID_REQUIRED); } if (null !== $beacon->getMajor()) { if (!is_int($beacon->getMajor()) || $beacon->getMajor() < 0 || $beacon->getMajor() > 65535) { $this->addError(self::BEACON_MAJOR_INVALID); } } if (null !== $beacon->getMinor()) { if (!is_int($beacon->getMinor()) || $beacon->getMinor() < 0 || $beacon->getMinor() > 65535) { $this->addError(self::BEACON_MINOR_INVALID); } } }