Skip to content

Commit

Permalink
Bumped
Browse files Browse the repository at this point in the history
  • Loading branch information
roadiz-ci committed Feb 21, 2024
1 parent 4e80558 commit e5982d4
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.1', '8.2', '8.3']
php-version: ['8.0', '8.1']
steps:
- uses: shivammathur/setup-php@v2
with:
Expand Down
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
language: php
sudo: required
php:
- 7.4
- 8.0
- 8.1
- nightly
install:
- curl -s http://getcomposer.org/installer | php
- php composer.phar install --dev --no-interaction
script:
- vendor/bin/phpcs --report=full --report-file=./report.txt -p ./
- vendor/bin/phpstan analyse -c phpstan.neon
jobs:
allow_failures:
- php: nightly
9 changes: 0 additions & 9 deletions LICENSE.md

This file was deleted.

4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.2.x-dev",
"dev-develop": "2.3.x-dev"
"dev-master": "2.1.x-dev",
"dev-develop": "2.2.x-dev"
}
}
}
15 changes: 0 additions & 15 deletions src/Generators/DeclarationGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,9 @@ public function getContents(): string
$blocks[] = $this->generatorFactory->createForNodeType($nodeType)->getContents();
}

$blocks[] = $this->getAllTypesInterface();

return implode(PHP_EOL . PHP_EOL, $blocks);
}

private function getAllTypesInterface(): string
{
$nodeTypeNames = array_map(function (NodeTypeInterface $nodeType) {
return $nodeType->getSourceEntityClassName();
}, $this->nodeTypes);

$nodeTypeNames = implode(' | ', $nodeTypeNames);

return <<<EOT
export type AllRoadizNodesSources = {$nodeTypeNames};
EOT;
}

private function getHeader(): string
{
return <<<EOT
Expand Down
2 changes: 1 addition & 1 deletion src/Generators/NodeTypeGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function getContents(): string
protected function getInterfaceBody(): string
{
$lines = [
'export interface ' . $this->nodeType->getSourceEntityClassName() . ' extends RoadizNodesSources {',
'interface ' . $this->nodeType->getSourceEntityClassName() . ' extends RoadizNodesSources {',
$this->getFieldsContents(),
'}'
];
Expand Down

0 comments on commit e5982d4

Please sign in to comment.