Skip to content

Commit 25dd730

Browse files
committed
fix: indentation in php to use 4 spaces instead of 2
1 parent f5161f9 commit 25dd730

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

templates/cli/lib/type-generation/languages/php.js.twig

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,39 +62,39 @@ use Appwrite\\Models\\<%- toPascalCase(attribute.relatedCollection) %>;
6262
<% if (attribute.format === 'enum') { -%>
6363
enum <%- toPascalCase(attribute.key) %>: string {
6464
<% for (const [index, element] of Object.entries(attribute.elements)) { -%>
65-
case <%- strict ? toUpperSnakeCase(element) : element %> = '<%- element %>';
65+
case <%- strict ? toUpperSnakeCase(element) : element %> = '<%- element %>';
6666
<% } -%>
6767
}
6868
6969
<% } -%>
7070
<% } -%>
7171
class <%- toPascalCase(collection.name) %> {
7272
<% for (const attribute of collection.attributes ){ -%>
73-
private <%- getType(attribute) %> $<%- strict ? toCamelCase(attribute.key) : attribute.key %>;
73+
private <%- getType(attribute) %> $<%- strict ? toCamelCase(attribute.key) : attribute.key %>;
7474
<% } -%>
7575
76-
public function __construct(
76+
public function __construct(
7777
<% for (const attribute of collection.attributes ){ -%>
7878
<% if (attribute.required) { -%>
79-
<%- getType(attribute).replace('|null', '') %> $<%- strict ? toCamelCase(attribute.key) : attribute.key %><% if (collection.attributes.indexOf(attribute) < collection.attributes.length - 1) { %>,<% } %>
79+
<%- getType(attribute).replace('|null', '') %> $<%- strict ? toCamelCase(attribute.key) : attribute.key %><% if (collection.attributes.indexOf(attribute) < collection.attributes.length - 1) { %>,<% } %>
8080
<% } else { -%>
81-
?<%- getType(attribute).replace('|null', '') %> $<%- strict ? toCamelCase(attribute.key) : attribute.key %> = null<% if (collection.attributes.indexOf(attribute) < collection.attributes.length - 1) { %>,<% } %>
81+
?<%- getType(attribute).replace('|null', '') %> $<%- strict ? toCamelCase(attribute.key) : attribute.key %> = null<% if (collection.attributes.indexOf(attribute) < collection.attributes.length - 1) { %>,<% } %>
8282
<% } -%>
8383
<% } -%>
84-
) {
84+
) {
8585
<% for (const attribute of collection.attributes ){ -%>
86-
$this-><%- strict ? toCamelCase(attribute.key) : attribute.key %> = $<%- strict ? toCamelCase(attribute.key) : attribute.key %>;
86+
$this-><%- strict ? toCamelCase(attribute.key) : attribute.key %> = $<%- strict ? toCamelCase(attribute.key) : attribute.key %>;
8787
<% } -%>
88-
}
88+
}
8989
9090
<% for (const [index, attribute] of Object.entries(collection.attributes)) { -%>
91-
public function get<%- toPascalCase(attribute.key) %>(): <%- getType(attribute) %> {
92-
return $this-><%- strict ? toCamelCase(attribute.key) : attribute.key %>;
93-
}
91+
public function get<%- toPascalCase(attribute.key) %>(): <%- getType(attribute) %> {
92+
return $this-><%- strict ? toCamelCase(attribute.key) : attribute.key %>;
93+
}
9494
95-
public function set<%- toPascalCase(attribute.key) %>(<%- getType(attribute) %> $<%- strict ? toCamelCase(attribute.key) : attribute.key %>): void {
96-
$this-><%- strict ? toCamelCase(attribute.key) : attribute.key %> = $<%- strict ? toCamelCase(attribute.key) : attribute.key %>;
97-
}
95+
public function set<%- toPascalCase(attribute.key) %>(<%- getType(attribute) %> $<%- strict ? toCamelCase(attribute.key) : attribute.key %>): void {
96+
$this-><%- strict ? toCamelCase(attribute.key) : attribute.key %> = $<%- strict ? toCamelCase(attribute.key) : attribute.key %>;
97+
}
9898
<% if (index < collection.attributes.length - 1) { %>
9999
<% } -%>
100100
<% } -%>

0 commit comments

Comments
 (0)