ubah ke docker mode
This commit is contained in:
28
htdocs/vendor/picqer/php-barcode-generator/generate-examples.php
vendored
Normal file
28
htdocs/vendor/picqer/php-barcode-generator/generate-examples.php
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
require('vendor/autoload.php');
|
||||
require(__DIR__ . '/tests/VerifiedBarcodeTest.php');
|
||||
$verifiedFiles = VerifiedBarcodeTest::$supportedBarcodes;
|
||||
|
||||
$result = [];
|
||||
$result[] = '# Examples of supported barcodes';
|
||||
$result[] = 'These are examples of supported barcodes with this library.';
|
||||
$result[] = 'All types can be found in the src/Types directory.';
|
||||
$result[] = '';
|
||||
|
||||
foreach ($verifiedFiles as $verifiedFile) {
|
||||
$result[] = '### ' . substr($verifiedFile['type'], strrpos($verifiedFile['type'], '\\') + 1);
|
||||
foreach ($verifiedFile['barcodes'] as $barcode) {
|
||||
$result[] = sprintf(
|
||||
'',
|
||||
$barcode,
|
||||
$verifiedFile['type'],
|
||||
Picqer\Barcode\Helpers\StringHelpers::getSafeFilenameFrom($verifiedFile['type'] . '-' . $barcode)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$result[] = '';
|
||||
$result[] = '*This file is generated by generate-examples.php*';
|
||||
|
||||
file_put_contents('examples.md', implode(PHP_EOL . PHP_EOL, $result));
|
||||
Reference in New Issue
Block a user