@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -require dirname(__DIR__) . '/vendor/autoload.php'; |
|
| 3 | +require dirname(__DIR__).'/vendor/autoload.php'; |
|
| 4 | 4 | |
| 5 | 5 | use Aws\DynamoDb\Marshaler; |
| 6 | 6 | use Guillermoandrae\Db\DynamoDb\AttributeTypes; |
@@ -40,15 +40,15 @@ discard block |
||
| 40 | 40 | 'year' => 1984, |
| 41 | 41 | 'single' => 'Nightshift' |
| 42 | 42 | ]); |
| 43 | - printf("Successfully added '%s' to the '%s' table!" . PHP_EOL, $name, $tableName); |
|
| 43 | + printf("Successfully added '%s' to the '%s' table!".PHP_EOL, $name, $tableName); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | // get all items |
| 47 | 47 | $items = $adapter->useTable($tableName)->findAll(); |
| 48 | - printf("The following items were found in the '%s' table:" . PHP_EOL, $tableName); |
|
| 48 | + printf("The following items were found in the '%s' table:".PHP_EOL, $tableName); |
|
| 49 | 49 | foreach ($items as $item) { |
| 50 | 50 | printf( |
| 51 | - "\t - '%s', who died in '%s'" . PHP_EOL, |
|
| 51 | + "\t - '%s', who died in '%s'".PHP_EOL, |
|
| 52 | 52 | $item['name'], |
| 53 | 53 | $item['year'], |
| 54 | 54 | $tableName |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | 'year' => 1984 |
| 62 | 62 | ]); |
| 63 | 63 | printf( |
| 64 | - "Successfully retrieved '%s' (mentioned in the Commodores' tribute single '%s') from the '%s' table!" . PHP_EOL, |
|
| 64 | + "Successfully retrieved '%s' (mentioned in the Commodores' tribute single '%s') from the '%s' table!".PHP_EOL, |
|
| 65 | 65 | $item['name'], |
| 66 | 66 | $item['single'], |
| 67 | 67 | $tableName |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | // delete an item |
| 71 | 71 | if ($adapter->useTable($tableName)->delete(['name' => 'Marvin Gaye', 'year' => 1984])) { |
| 72 | 72 | printf( |
| 73 | - "Successfully deleted '%s' from the '%s' table!" . PHP_EOL, |
|
| 73 | + "Successfully deleted '%s' from the '%s' table!".PHP_EOL, |
|
| 74 | 74 | $item['name'], |
| 75 | 75 | $tableName |
| 76 | 76 | ); |
@@ -78,10 +78,10 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | // get all items |
| 80 | 80 | $items = $adapter->useTable($tableName)->findAll(); |
| 81 | - printf("The following items remain in the '%s' table:" . PHP_EOL, $tableName); |
|
| 81 | + printf("The following items remain in the '%s' table:".PHP_EOL, $tableName); |
|
| 82 | 82 | foreach ($items as $item) { |
| 83 | 83 | printf( |
| 84 | - "\t - '%s', who died in '%s'" . PHP_EOL, |
|
| 84 | + "\t - '%s', who died in '%s'".PHP_EOL, |
|
| 85 | 85 | $item['name'], |
| 86 | 86 | $item['year'], |
| 87 | 87 | $tableName |