Skip to content

Commit

Permalink
Restructure the project
Browse files Browse the repository at this point in the history
  • Loading branch information
shimomo committed Jan 8, 2025
1 parent 92d2864 commit d03fa72
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 27 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Boatrace Sakura Converter
# Converter in the Boatrace Venture Project

[![Build Status](https://github.com/boatrace-sakura/converter/workflows/tests/badge.svg)](https://github.com/boatrace-sakura/converter/actions?query=workflow%3Atests)
[![Coverage Status](https://coveralls.io/repos/github/boatrace-sakura/converter/badge.svg?branch=main)](https://coveralls.io/github/boatrace-sakura/converter?branch=main)
[![Latest Stable Version](https://poser.pugx.org/boatrace-sakura/converter/v/stable)](https://packagist.org/packages/boatrace-sakura/converter)
[![Latest Unstable Version](https://poser.pugx.org/boatrace-sakura/converter/v/unstable)](https://packagist.org/packages/boatrace-sakura/converter)
[![License](https://poser.pugx.org/boatrace-sakura/converter/license)](https://packagist.org/packages/boatrace-sakura/converter)
[![Build Status](https://github.com/BoatraceVentureProject/Converter/workflows/tests/badge.svg)](https://github.com/BoatraceVentureProject/Converter/actions?query=workflow%3Atests)
[![Coverage Status](https://coveralls.io/repos/github/BoatraceVentureProject/Converter/badge.svg?branch=main)](https://coveralls.io/github/BoatraceVentureProject/Converter?branch=main)
[![Latest Stable Version](https://poser.pugx.org/bvp/Converter/v/stable)](https://packagist.org/packages/bvp/Converter)
[![Latest Unstable Version](https://poser.pugx.org/bvp/Converter/v/unstable)](https://packagist.org/packages/bvp/Converter)
[![License](https://poser.pugx.org/bvp/Converter/license)](https://packagist.org/packages/bvp/Converter)

## Installation
```bash
composer require boatrace-sakura/converter
composer require bvp/converter
```

## Usage
Expand All @@ -17,7 +17,7 @@ composer require boatrace-sakura/converter

require __DIR__ . '/vendor/autoload.php';

use Boatrace\Sakura\Converter;
use Boatrace\Venture\Project\Converter;

var_dump(Converter::convertToTechniqueId('逃げ')); // int(1)
var_dump(Converter::convertToTechniqueId('差し')); // int(2)
Expand All @@ -35,4 +35,4 @@ var_dump(Converter::convertToTechniqueName(6)); // string(9) "恵まれ"
```

## License
The Boatrace Sakura Converter is open source software licensed under the [MIT license](LICENSE).
Converter in the Boatrace Venture Project is open source software licensed under the [MIT license](LICENSE).
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "boatrace-sakura/converter",
"description": "The Boatrace Sakura Converter.",
"name": "bvp/converter",
"description": "Converter in the Boatrace Venture Project.",
"license": "MIT",
"type": "library",
"authors": [
Expand All @@ -11,7 +11,7 @@
],
"require": {
"php": "^8.1",
"boatrace-sakura/trimmer": "^1.0",
"bvp/trimmer": "^2.0",
"nesbot/carbon": "^2.63 || ^3.0",
"php-di/php-di": "^6.1 || ^7.0"
},
Expand All @@ -20,12 +20,12 @@
},
"autoload": {
"psr-4": {
"Boatrace\\Sakura\\": "src/"
"Boatrace\\Venture\\Project\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Boatrace\\Sakura\\Tests\\": "tests/"
"Boatrace\\Venture\\Project\\Tests\\": "tests/"
}
}
}
4 changes: 2 additions & 2 deletions config/definitions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
declare(strict_types=1);

return [
'Converter' => \DI\create('\Boatrace\Sakura\Converter')->constructor(
'Converter' => \DI\create('\Boatrace\Venture\Project\Converter')->constructor(
\DI\get('MainConverter')
),
'MainConverter' => function ($container) {
return $container->get('\Boatrace\Sakura\MainConverter');
return $container->get('\Boatrace\Venture\Project\MainConverter');
},
];
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
stopOnFailure="false">

<testsuites>
<testsuite name="boatrace-sakura">
<testsuite name="Boatrace Venture Project">
<directory suffix="Test.php">./tests/</directory>
</testsuite>
</testsuites>
Expand Down
8 changes: 4 additions & 4 deletions src/Converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Boatrace\Sakura;
namespace Boatrace\Venture\Project;

use DI\Container;
use DI\ContainerBuilder;
Expand All @@ -13,7 +13,7 @@
class Converter
{
/**
* @var \Boatrace\Sakura\Converter
* @var \Boatrace\Venture\Project\Converter
*/
protected static Converter $instance;

Expand All @@ -23,7 +23,7 @@ class Converter
protected static Container $container;

/**
* @param \Boatrace\Sakura\MainConverter $converter
* @param \Boatrace\Venture\Project\MainConverter $converter
* @return void
*/
public function __construct(protected MainConverter $converter){}
Expand All @@ -49,7 +49,7 @@ public static function __callStatic(string $name, array $arguments): string|floa
}

/**
* @return \Boatrace\Sakura\Converter
* @return \Boatrace\Venture\Project\Converter
*/
public static function getInstance(): Converter
{
Expand Down
2 changes: 1 addition & 1 deletion src/MainConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Boatrace\Sakura;
namespace Boatrace\Venture\Project;

use Carbon\CarbonImmutable as Carbon;

Expand Down
4 changes: 2 additions & 2 deletions tests/ConverterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Boatrace\Sakura\Tests;
namespace Boatrace\Venture\Project\Tests;

use Boatrace\Sakura\Converter;
use Boatrace\Venture\Project\Converter;
use PHPUnit\Framework\TestCase as PHPUnitTestCase;

/**
Expand Down
6 changes: 3 additions & 3 deletions tests/MainConverterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Boatrace\Sakura\Tests;
namespace Boatrace\Venture\Project\Tests;

use Boatrace\Sakura\MainConverter;
use Boatrace\Venture\Project\MainConverter;
use PHPUnit\Framework\TestCase as PHPUnitTestCase;

/**
Expand All @@ -13,7 +13,7 @@
class MainConverterTest extends PHPUnitTestCase
{
/**
* @var \Boatrace\Sakura\MainConverter
* @var \Boatrace\Venture\Project\MainConverter
*/
protected MainConverter $converter;

Expand Down

0 comments on commit d03fa72

Please sign in to comment.