@@ -169,13 +169,13 @@ discard block |
||
| 169 | 169 | // Iterate and create all fields |
| 170 | 170 | foreach ($fields as $field) { |
| 171 | 171 | |
| 172 | - $fieldInstance = $this->isFieldExists($field['Name'] . '_' . $prefix); |
|
| 172 | + $fieldInstance = $this->isFieldExists($field['Name'].'_'.$prefix); |
|
| 173 | 173 | |
| 174 | 174 | // If field not exists then create it |
| 175 | 175 | if (!$fieldInstance) { |
| 176 | 176 | // Create and add field to structure |
| 177 | 177 | $fieldInstance = $this->createField( |
| 178 | - $field['Name'] . '_' . $prefix, |
|
| 178 | + $field['Name'].'_'.$prefix, |
|
| 179 | 179 | $field['Description'], |
| 180 | 180 | $field['Type'], |
| 181 | 181 | // If it is the select type then add value |
@@ -361,8 +361,8 @@ discard block |
||
| 361 | 361 | // Set prefix of material |
| 362 | 362 | $prefix = 'Material of '; |
| 363 | 363 | $material = $this->createNestedMaterial( |
| 364 | - $prefix . $structure->Name, |
|
| 365 | - $prefix . $structure->Url |
|
| 364 | + $prefix.$structure->Name, |
|
| 365 | + $prefix.$structure->Url |
|
| 366 | 366 | ); |
| 367 | 367 | |
| 368 | 368 | $this->assignNestedMaterial($material, $structure); |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | /** |
| 104 | 104 | * Assign structure to passed material |
| 105 | - * @param $material |
|
| 105 | + * @param null|\samson\activerecord\Material $material |
|
| 106 | 106 | * @param $structure |
| 107 | 107 | * @return mixed|structurematerial |
| 108 | 108 | */ |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | |
| 207 | 207 | /** |
| 208 | 208 | * Create field |
| 209 | - * @param $name |
|
| 209 | + * @param string $name |
|
| 210 | 210 | * @param $description |
| 211 | 211 | * @param $type |
| 212 | 212 | * @param $value |
@@ -278,8 +278,8 @@ discard block |
||
| 278 | 278 | |
| 279 | 279 | /** |
| 280 | 280 | * Get structure if exists |
| 281 | - * @param $name |
|
| 282 | - * @param $url |
|
| 281 | + * @param string $name |
|
| 282 | + * @param string $url |
|
| 283 | 283 | * @return mixed |
| 284 | 284 | */ |
| 285 | 285 | public function isStructureExists($name, $url) |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | |
| 293 | 293 | /** |
| 294 | 294 | * Get field if exists |
| 295 | - * @param $name |
|
| 295 | + * @param string $name |
|
| 296 | 296 | * @return mixed |
| 297 | 297 | */ |
| 298 | 298 | public function isFieldExists($name) |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | |
| 319 | 319 | /** |
| 320 | 320 | * Assign nested material to the structure |
| 321 | - * @param $material |
|
| 321 | + * @param \samson\activerecord\Material $material |
|
| 322 | 322 | * @param $structure |
| 323 | 323 | */ |
| 324 | 324 | public function assignNestedMaterial($material, $structure) |
@@ -337,8 +337,8 @@ discard block |
||
| 337 | 337 | |
| 338 | 338 | /** |
| 339 | 339 | * Create nested material of structure |
| 340 | - * @param $name |
|
| 341 | - * @param $url |
|
| 340 | + * @param string $name |
|
| 341 | + * @param string $url |
|
| 342 | 342 | * @return \samson\activerecord\material |
| 343 | 343 | */ |
| 344 | 344 | public function createNestedMaterial($name, $url) |