-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix descripyion and price #6
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Наконец-то сел и посмотрел, что поменялось.
@@ -272,7 +272,7 @@ protected function newOffer( $id, $price, $currency, $category, $type, $from ) | |||
if( (!is_int($category)) || ($category<1) || ($category>=pow(10,19)) ) | |||
$this->exc("categoryId - целое число, не более 18 знаков"); | |||
|
|||
if( !is_int($price) || $price<0 ) $this->exc("price должно быть целым и положительным"); | |||
if( !is_numeric($price) || $price<0 ) $this->exc("price должно быть положительным числом"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
В идеале в файлах документации (вроде docs/simple.md ) еще заменить int на numeric
$desc = new \DomElement( 'description'); | ||
if ($tags) { | ||
$cdata = new \DOMCdataSection($txt); | ||
$this->appendChild($desc); | ||
$desc->appendChild($cdata); | ||
} else { | ||
$desc->textContent = $txt; | ||
$this->appendChild($desc); | ||
} | ||
return $this; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Это поправили в предыдущем PR, который уже влит. И там как-то компактнее, тут бросается в глаза два раза $this->appendChild($desc);
fix descripyion without tags and change requirement for price to float