mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-30 20:17:17 +00:00
:octocat: generate doc from QROptions instead of QROptionsTrait
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Configuration settings
|
||||
<!-- This file is auto generated from the source of QROptionsTrait.php -->
|
||||
<!-- This file is auto generated from the source of QROptions.php -->
|
||||
## version
|
||||
|
||||
QR Code version number
|
||||
|
||||
@@ -8,17 +8,17 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
use chillerlan\QRCode\QROptionsTrait;
|
||||
use chillerlan\QRCode\QROptions;
|
||||
|
||||
require_once __DIR__.'/../vendor/autoload.php';
|
||||
|
||||
$file = 'Usage/Configuration-settings.md';
|
||||
$content = [
|
||||
'# Configuration settings',
|
||||
'<!-- This file is auto generated from the source of QROptionsTrait.php -->',
|
||||
'<!-- This file is auto generated from the source of QROptions.php -->',
|
||||
];
|
||||
|
||||
$reflectionClass = new ReflectionClass(QROptionsTrait::class);
|
||||
$reflectionClass = new ReflectionClass(QROptions::class);
|
||||
|
||||
foreach($reflectionClass->getProperties(ReflectionProperty::IS_PROTECTED) as $reflectionProperty){
|
||||
$docblock = $reflectionProperty->getDocComment();
|
||||
@@ -93,6 +93,6 @@ foreach($reflectionClass->getProperties(ReflectionProperty::IS_PROTECTED) as $re
|
||||
|
||||
file_put_contents(__DIR__.'/'.$file, implode("\n", $content));
|
||||
|
||||
printf('Built "%s" from "%s"', $file, QROptionsTrait::class);
|
||||
printf('Built "%s" from "%s"', $file, QROptions::class);
|
||||
|
||||
exit(0);
|
||||
|
||||
Reference in New Issue
Block a user