@@ -221,7 +221,7 @@ std::string DefaultForField(const FieldDescriptor* field) {
221
221
222
222
std::string DeprecatedConditionalForField(const FieldDescriptor* field) {
223
223
if (field->is_repeated()) {
224
-
return absl::StrCat("$this->", field->name(), "->count() !== 0");
224
+
return absl::StrCat("count($this->", field->name(), ") !== 0");
225
225
}
226
226
if (field->real_containing_oneof() != nullptr) {
227
227
return absl::StrCat("$this->hasOneof(", field->number(), ")");
@@ -749,7 +749,7 @@ void GenerateFieldAccessor(const FieldDescriptor* field, const Options& options,
749
749
750
750
if (field->options().deprecated() &&
751
751
(field->is_map() || field->is_repeated())) {
752
-
printer->Print("if ($arr->count() !== 0) {\n ^deprecation_trigger^}\n",
752
+
printer->Print("if (count($arr) !== 0) {\n ^deprecation_trigger^}\n",
753
753
"deprecation_trigger", deprecation_trigger);
754
754
}
755
755
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4