Skip to content

Commit

Permalink
Fix basic errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jaapio committed Apr 20, 2022
1 parent ffe0939 commit fb5ac6b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion data/templates/default/template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<version>1.0.0</version>
<transformations>
<transformation writer="twig" source="templates/default/project_index.html.twig" artifact="project_index.html"/>
<transformation writer="twig" query="versions" source="templates/default/version_index.html.twig" artifact="{{folder}}/index.html"/>
<!-- <transformation writer="twig" query="versions" source="templates/default/version_index.html.twig" artifact="{{folder}}/index.html"/>-->
<transformation writer="twig" source="templates/default/index.html.twig" artifact="index.html"/>
<transformation writer="twig" query="files" source="templates/default/file.html.twig" />
<transformation writer="sourcecode" query="files" source="templates/default/source/file.source.txt.twig" artifact="files/{{path}}.txt" />
Expand Down
4 changes: 2 additions & 2 deletions src/phpDocumentor/FlowService/Guide/RenderGuide.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ public function execute(ProjectDescriptor $project, DocumentationSetDescriptor $
function () use ($template, $project, $documentationSet) {
$twig = $this->environmentFactory->create($project, $template);
$twig->addGlobal('project', $project);
$twig->addGlobal('usesNamespaces', count($project->getNamespace()->getChildren()) > 0);
$twig->addGlobal('usesPackages', count($project->getPackage()->getChildren()) > 0);
// $twig->addGlobal('usesNamespaces', count($project->getNamespace()->getChildren()) > 0);
// $twig->addGlobal('usesPackages', count($project->getPackage()->getChildren()) > 0);
$twig->addGlobal('documentationSet', $documentationSet);
$twig->addGlobal('destinationPath', null);

Expand Down
2 changes: 1 addition & 1 deletion src/phpDocumentor/Pipeline/Stage/Transform.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function __invoke(Payload $payload): Payload
$this->transformerProvider->get($documentationSet)->execute(
$project,
$documentationSet,
current($templates)
current($templates->getArrayCopy())
);

/** @var PostTransformEvent $postTransformEvent */
Expand Down
1 change: 0 additions & 1 deletion tests/unit/phpDocumentor/Faker/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
use phpDocumentor\Descriptor\VersionDescriptor;
use phpDocumentor\FileSystem\FlySystemFactory;
use phpDocumentor\Dsn;
use phpDocumentor\FileSystem\FlySystemFactory;
use phpDocumentor\Path;
use phpDocumentor\Reflection\Fqsen;
use phpDocumentor\Reflection\Php\Factory\ContextStack;
Expand Down

0 comments on commit fb5ac6b

Please sign in to comment.