File tree Expand file tree Collapse file tree 2 files changed +14
-18
lines changed
lib/internal/Magento/Framework/View Expand file tree Collapse file tree 2 files changed +14
-18
lines changed Original file line number Diff line number Diff line change @@ -542,8 +542,7 @@ public function flushScheduledStructure()
542
542
}
543
543
544
544
/**
545
- * Reformat layout scheduled structure to array.
546
- * It can be possible for serialization and save to cache storage for example.
545
+ * Reformat 'Layout scheduled structure' to array.
547
546
*
548
547
* @return array
549
548
*/
@@ -558,28 +557,27 @@ public function __toArray()
558
557
}
559
558
560
559
/**
561
- * Update layout scheduled structure data.
562
- * It can be used for case of set data from cache storage after initialization this class.
560
+ * Update 'Layout scheduled structure' data.
563
561
*
564
562
* @param array $data
565
563
* @return void
566
564
*/
567
565
public function populateWithArray (array $ data )
568
566
{
569
567
foreach ($ this ->serializableProperties as $ property ) {
570
- $ this ->{$ property } = $ this ->getDataValue ($ property , $ data );
568
+ $ this ->{$ property } = $ this ->getArrayValueByKey ($ property , $ data );
571
569
}
572
570
}
573
571
574
572
/**
575
573
* Get value from array by key.
576
574
*
577
- * @param string $name
578
- * @param array $data
575
+ * @param string $key
576
+ * @param array $array
579
577
* @return array
580
578
*/
581
- private function getDataValue ( $ name , array $ data )
579
+ private function getArrayValueByKey ( $ key , array $ array )
582
580
{
583
- return isset ($ data [ $ name ]) ? $ data [ $ name ] : [];
581
+ return isset ($ array [ $ key ]) ? $ array [ $ key ] : [];
584
582
}
585
583
}
Original file line number Diff line number Diff line change @@ -212,8 +212,7 @@ public function getAssets()
212
212
}
213
213
214
214
/**
215
- * Reformat page config structure to array.
216
- * It can be possible for serialization and save to cache storage for example.
215
+ * Reformat 'Page config structure' to array.
217
216
*
218
217
* @return array
219
218
*/
@@ -228,28 +227,27 @@ public function __toArray()
228
227
}
229
228
230
229
/**
231
- * Update page config structure data.
232
- * It can be used for case of set data from cache storage after initialization this class.
230
+ * Update 'Page config structure' data.
233
231
*
234
232
* @param array $data
235
233
* @return void
236
234
*/
237
235
public function populateWithArray (array $ data )
238
236
{
239
237
foreach ($ this ->serializableProperties as $ property ) {
240
- $ this ->{$ property } = $ this ->getDataValue ($ property , $ data );
238
+ $ this ->{$ property } = $ this ->getArrayValueByKey ($ property , $ data );
241
239
}
242
240
}
243
241
244
242
/**
245
243
* Get value from array by key.
246
244
*
247
- * @param string $name
248
- * @param array $data
245
+ * @param string $key
246
+ * @param array $array
249
247
* @return array
250
248
*/
251
- private function getDataValue ( $ name , array $ data )
249
+ private function getArrayValueByKey ( $ key , array $ array )
252
250
{
253
- return isset ($ data [ $ name ]) ? $ data [ $ name ] : [];
251
+ return isset ($ array [ $ key ]) ? $ array [ $ key ] : [];
254
252
}
255
253
}
You can’t perform that action at this time.
0 commit comments