|
| 1 | +<?php |
| 2 | + |
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +namespace Workbench\App\Data; |
| 6 | + |
| 7 | +use function json_encode; |
| 8 | + |
| 9 | +class ProductFakeData |
| 10 | +{ |
| 11 | + public static function toArray(): array |
| 12 | + { |
| 13 | + return [ |
| 14 | + [ |
| 15 | + 'article' => 'GD-PRDCT-1', |
| 16 | + 'title' => 'Some 1', |
| 17 | + 'description' => 'Some description 1', |
| 18 | + |
| 19 | + 'price' => 100, |
| 20 | + 'quantity' => 5, |
| 21 | + 'currency' => 'USD', |
| 22 | + |
| 23 | + 'brand' => 'The Best', |
| 24 | + |
| 25 | + 'images' => json_encode([ |
| 26 | + 'https://via.placeholder.com/640x480.png/00ff55?text=s1', |
| 27 | + ]), |
| 28 | + |
| 29 | + 'created_at' => '2025-08-31 00:00:00', |
| 30 | + 'updated_at' => '2025-08-31 20:00:00', |
| 31 | + ], |
| 32 | + [ |
| 33 | + 'article' => 'GD-PRDCT-2', |
| 34 | + 'title' => 'Some 2', |
| 35 | + 'description' => 'Some description 2', |
| 36 | + |
| 37 | + 'price' => 250, |
| 38 | + 'quantity' => 20, |
| 39 | + 'currency' => 'USD', |
| 40 | + |
| 41 | + 'brand' => 'The Best', |
| 42 | + |
| 43 | + 'images' => json_encode([ |
| 44 | + 'https://via.placeholder.com/640x480.png/00ff55?text=s20', |
| 45 | + 'https://via.placeholder.com/640x480.png/00ff55?text=s21', |
| 46 | + 'https://via.placeholder.com/640x480.png/00ff55?text=s22', |
| 47 | + ]), |
| 48 | + |
| 49 | + 'created_at' => '2025-08-30 00:00:00', |
| 50 | + 'updated_at' => '2025-08-30 19:00:00', |
| 51 | + ], |
| 52 | + [ |
| 53 | + 'article' => 'GD-PRDCT-3', |
| 54 | + 'title' => 'Some 3', |
| 55 | + 'description' => 'Some description 3', |
| 56 | + |
| 57 | + 'price' => 400, |
| 58 | + 'quantity' => 0, |
| 59 | + 'currency' => 'USD', |
| 60 | + |
| 61 | + 'brand' => 'The Best', |
| 62 | + |
| 63 | + 'images' => json_encode([ |
| 64 | + 'https://via.placeholder.com/640x480.png/00ff55?text=s30', |
| 65 | + 'https://via.placeholder.com/640x480.png/00ff55?text=s31', |
| 66 | + ]), |
| 67 | + |
| 68 | + 'created_at' => '2025-08-29 00:00:00', |
| 69 | + 'updated_at' => '2025-08-29 18:00:00', |
| 70 | + ], |
| 71 | + ]; |
| 72 | + } |
| 73 | +} |
0 commit comments