Skip to content

Commit

Permalink
rename class
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Aug 18, 2024
1 parent 2400d11 commit 9aa4b8a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/Generator/Client/Php.php → src/Generator/Client/PHP.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
use PSX\Schema\GeneratorInterface;

/**
* Php
* PHP
*
* @author Christoph Kappestein <christoph.kappestein@gmail.com>
* @license http://www.apache.org/licenses/LICENSE-2.0
* @link https://phpsx.org
*/
class Php extends LanguageAbstract
class PHP extends LanguageAbstract
{
protected function getOperationTemplate(): string
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
use PSX\Schema\GeneratorInterface;

/**
* Typescript
* TypeScript
*
* @author Christoph Kappestein <christoph.kappestein@gmail.com>
* @license http://www.apache.org/licenses/LICENSE-2.0
* @link https://phpsx.org
*/
class Typescript extends LanguageAbstract
class TypeScript extends LanguageAbstract
{
protected function getOperationTemplate(): string
{
Expand Down
4 changes: 2 additions & 2 deletions src/Repository/LocalRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ public function getAll(): array
$result = [];

$result[self::CLIENT_PHP] = new GeneratorConfig(
fn(?string $baseUrl, ?Config $config) => new Generator\Client\Php($baseUrl, $config),
fn(?string $baseUrl, ?Config $config) => new Generator\Client\PHP($baseUrl, $config),
'php',
'application/php'
);

$result[self::CLIENT_TYPESCRIPT] = new GeneratorConfig(
fn(?string $baseUrl, ?Config $config) => new Generator\Client\Typescript($baseUrl, $config),
fn(?string $baseUrl, ?Config $config) => new Generator\Client\TypeScript($baseUrl, $config),
'ts',
'application/typescript'
);
Expand Down
10 changes: 5 additions & 5 deletions tests/Generator/Client/PhpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
namespace PSX\Api\Tests\Generator\Client;

use PSX\Api\Exception\InvalidTypeException;
use PSX\Api\Generator\Client\Php;
use PSX\Api\Generator\Client\PHP;
use PSX\Api\Tests\Generator\GeneratorTestCase;
use PSX\Schema\Generator\Config;

Expand All @@ -36,7 +36,7 @@ class PhpTest extends GeneratorTestCase
{
public function testGenerate()
{
$generator = new Php('http://api.foo.com');
$generator = new PHP('http://api.foo.com');

$result = $generator->generate($this->getSpecification());
$target = __DIR__ . '/resource/php';
Expand All @@ -48,7 +48,7 @@ public function testGenerate()

public function testGenerateCollection()
{
$generator = new Php('http://api.foo.com', Config::of('Foo\\Bar'));
$generator = new PHP('http://api.foo.com', Config::of('Foo\\Bar'));

$result = $generator->generate($this->getSpecificationCollection());
$target = __DIR__ . '/resource/php_collection';
Expand All @@ -62,13 +62,13 @@ public function testGenerateComplex()
{
$this->expectException(InvalidTypeException::class);

$generator = new Php('http://api.foo.com', Config::of('Foo\\Bar'));
$generator = new PHP('http://api.foo.com', Config::of('Foo\\Bar'));
$generator->generate($this->getSpecificationComplex());
}

public function testGenerateTest()
{
$generator = new Php('http://127.0.0.1:8081', Config::of('Sdkgen\\Client\\Tests\\Generated'));
$generator = new PHP('http://127.0.0.1:8081', Config::of('Sdkgen\\Client\\Tests\\Generated'));

$result = $generator->generate($this->getSpecificationTest());
$target = __DIR__ . '/resource/php_test';
Expand Down
10 changes: 5 additions & 5 deletions tests/Generator/Client/TypescriptTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
namespace PSX\Api\Tests\Generator\Client;

use PSX\Api\Exception\InvalidTypeException;
use PSX\Api\Generator\Client\Typescript;
use PSX\Api\Generator\Client\TypeScript;
use PSX\Api\Tests\Generator\GeneratorTestCase;

/**
Expand All @@ -35,7 +35,7 @@ class TypescriptTest extends GeneratorTestCase
{
public function testGenerate()
{
$generator = new Typescript('http://api.foo.com');
$generator = new TypeScript('http://api.foo.com');

$result = $generator->generate($this->getSpecification());
$target = __DIR__ . '/resource/typescript';
Expand All @@ -47,7 +47,7 @@ public function testGenerate()

public function testGenerateCollection()
{
$generator = new Typescript('http://api.foo.com');
$generator = new TypeScript('http://api.foo.com');

$result = $generator->generate($this->getSpecificationCollection());
$target = __DIR__ . '/resource/typescript_collection';
Expand All @@ -61,13 +61,13 @@ public function testGenerateComplex()
{
$this->expectException(InvalidTypeException::class);

$generator = new Typescript('http://api.foo.com');
$generator = new TypeScript('http://api.foo.com');
$generator->generate($this->getSpecificationComplex());
}

public function testGenerateTest()
{
$generator = new Typescript('http://127.0.0.1:8081');
$generator = new TypeScript('http://127.0.0.1:8081');

$result = $generator->generate($this->getSpecificationTest());
$target = __DIR__ . '/resource/typescript_test';
Expand Down

0 comments on commit 9aa4b8a

Please sign in to comment.