@@ -85,7 +85,7 @@ |
||
85 | 85 | * @param ObjectInterface|EzPlatformObject $object |
86 | 86 | * @param bool $throwException |
87 | 87 | * |
88 | - * @return ContentType|false |
|
88 | + * @return ContentType |
|
89 | 89 | * |
90 | 90 | * @throws NotFoundException |
91 | 91 | */ |
@@ -109,7 +109,7 @@ |
||
109 | 109 | * @param int $id |
110 | 110 | * @param bool $throwException |
111 | 111 | * |
112 | - * @return Location|false |
|
112 | + * @return Location |
|
113 | 113 | */ |
114 | 114 | public function findById($id, $throwException = false) |
115 | 115 | { |
@@ -151,9 +151,9 @@ discard block |
||
151 | 151 | */ |
152 | 152 | private function sortFieldDefinitionsByPosition() |
153 | 153 | { |
154 | - if(!$this->notSetOrEmpty($this->data, 'fields')) { |
|
154 | + if (!$this->notSetOrEmpty($this->data, 'fields')) { |
|
155 | 155 | |
156 | - usort($this->data['fields'], function($a, $b) { |
|
156 | + usort($this->data['fields'], function ($a, $b) { |
|
157 | 157 | return |
158 | 158 | (isset($a->data['position']) ? $a->data['position'] : 100) |
159 | 159 | > |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | }); |
162 | 162 | |
163 | 163 | $priority = 10; |
164 | - foreach($this->data['fields'] as $field) { |
|
164 | + foreach ($this->data['fields'] as $field) { |
|
165 | 165 | $field->data['position'] = $priority; |
166 | 166 | $priority += 5; |
167 | 167 | } |
@@ -70,31 +70,31 @@ discard block |
||
70 | 70 | { |
71 | 71 | $contentTypeCreateStruct->remoteId = sha1(microtime()); |
72 | 72 | |
73 | - if(isset($this->contentTypeObject->data['names'])) { |
|
73 | + if (isset($this->contentTypeObject->data['names'])) { |
|
74 | 74 | $contentTypeCreateStruct->names = $this->contentTypeObject->data['names']; |
75 | 75 | } |
76 | - if(isset($this->contentTypeObject->data['descriptions'])) { |
|
76 | + if (isset($this->contentTypeObject->data['descriptions'])) { |
|
77 | 77 | $contentTypeCreateStruct->descriptions = $this->contentTypeObject->data['descriptions']; |
78 | 78 | } |
79 | - if(isset($this->contentTypeObject->data['main_language_code'])) { |
|
79 | + if (isset($this->contentTypeObject->data['main_language_code'])) { |
|
80 | 80 | $contentTypeCreateStruct->mainLanguageCode = $this->contentTypeObject->data['main_language_code']; |
81 | 81 | } |
82 | - if(isset($this->contentTypeObject->data['name_schema'])) { |
|
82 | + if (isset($this->contentTypeObject->data['name_schema'])) { |
|
83 | 83 | $contentTypeCreateStruct->nameSchema = $this->contentTypeObject->data['name_schema']; |
84 | 84 | } |
85 | - if(isset($this->contentTypeObject->data['url_alias_schema'])) { |
|
85 | + if (isset($this->contentTypeObject->data['url_alias_schema'])) { |
|
86 | 86 | $contentTypeCreateStruct->urlAliasSchema = $this->contentTypeObject->data['url_alias_schema']; |
87 | 87 | } |
88 | - if(isset($this->contentTypeObject->data['is_container'])) { |
|
88 | + if (isset($this->contentTypeObject->data['is_container'])) { |
|
89 | 89 | $contentTypeCreateStruct->isContainer = $this->contentTypeObject->data['is_container']; |
90 | 90 | } |
91 | - if(isset($this->contentTypeObject->data['default_always_available'])) { |
|
91 | + if (isset($this->contentTypeObject->data['default_always_available'])) { |
|
92 | 92 | $contentTypeCreateStruct->defaultAlwaysAvailable = $this->contentTypeObject->data['default_always_available']; |
93 | 93 | } |
94 | - if(isset($this->contentTypeObject->data['default_sort_field'])) { |
|
94 | + if (isset($this->contentTypeObject->data['default_sort_field'])) { |
|
95 | 95 | $contentTypeCreateStruct->defaultSortField = $this->contentTypeObject->data['default_sort_field']; |
96 | 96 | } |
97 | - if(isset($this->contentTypeObject->data['default_sort_order'])) { |
|
97 | + if (isset($this->contentTypeObject->data['default_sort_order'])) { |
|
98 | 98 | $contentTypeCreateStruct->defaultSortOrder = $this->contentTypeObject->data['default_sort_order']; |
99 | 99 | } |
100 | 100 | } |
@@ -104,31 +104,31 @@ discard block |
||
104 | 104 | */ |
105 | 105 | public function fillContentTypeUpdateStruct(ContentTypeUpdateStruct $contentTypeUpdateStruct) |
106 | 106 | { |
107 | - if(isset($this->contentTypeObject->data['names'])) { |
|
107 | + if (isset($this->contentTypeObject->data['names'])) { |
|
108 | 108 | $contentTypeUpdateStruct->names = $this->contentTypeObject->data['names']; |
109 | 109 | } |
110 | - if(isset($this->contentTypeObject->data['descriptions'])) { |
|
110 | + if (isset($this->contentTypeObject->data['descriptions'])) { |
|
111 | 111 | $contentTypeUpdateStruct->descriptions = $this->contentTypeObject->data['descriptions']; |
112 | 112 | } |
113 | - if(isset($this->contentTypeObject->data['main_language_code'])) { |
|
113 | + if (isset($this->contentTypeObject->data['main_language_code'])) { |
|
114 | 114 | $contentTypeUpdateStruct->mainLanguageCode = $this->contentTypeObject->data['main_language_code']; |
115 | 115 | } |
116 | - if(isset($this->contentTypeObject->data['name_schema'])) { |
|
116 | + if (isset($this->contentTypeObject->data['name_schema'])) { |
|
117 | 117 | $contentTypeUpdateStruct->nameSchema = $this->contentTypeObject->data['name_schema']; |
118 | 118 | } |
119 | - if(isset($this->contentTypeObject->data['url_alias_schema'])) { |
|
119 | + if (isset($this->contentTypeObject->data['url_alias_schema'])) { |
|
120 | 120 | $contentTypeUpdateStruct->urlAliasSchema = $this->contentTypeObject->data['url_alias_schema']; |
121 | 121 | } |
122 | - if(isset($this->contentTypeObject->data['is_container'])) { |
|
122 | + if (isset($this->contentTypeObject->data['is_container'])) { |
|
123 | 123 | $contentTypeUpdateStruct->isContainer = $this->contentTypeObject->data['is_container']; |
124 | 124 | } |
125 | - if(isset($this->contentTypeObject->data['default_always_available'])) { |
|
125 | + if (isset($this->contentTypeObject->data['default_always_available'])) { |
|
126 | 126 | $contentTypeUpdateStruct->defaultAlwaysAvailable = $this->contentTypeObject->data['default_always_available']; |
127 | 127 | } |
128 | - if(isset($this->contentTypeObject->data['default_sort_field'])) { |
|
128 | + if (isset($this->contentTypeObject->data['default_sort_field'])) { |
|
129 | 129 | $contentTypeUpdateStruct->defaultSortField = $this->contentTypeObject->data['default_sort_field']; |
130 | 130 | } |
131 | - if(isset($this->contentTypeObject->data['default_sort_order'])) { |
|
131 | + if (isset($this->contentTypeObject->data['default_sort_order'])) { |
|
132 | 132 | $contentTypeUpdateStruct->defaultSortOrder = $this->contentTypeObject->data['default_sort_order']; |
133 | 133 | } |
134 | 134 | } |
@@ -111,7 +111,7 @@ |
||
111 | 111 | ); |
112 | 112 | } |
113 | 113 | |
114 | - if(isset($this->data['priority'])) { |
|
114 | + if (isset($this->data['priority'])) { |
|
115 | 115 | $this->data['priority'] = 10; |
116 | 116 | } |
117 | 117 | } |