:octocat: generate doc from QROptions instead of QROptionsTrait

This commit is contained in:
smiley
2024-04-19 10:20:51 +02:00
parent 8d5d5db991
commit cfbf49a870
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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);