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 6acde9e commit b3a35f5
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 26 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 Trimmer
# Trimmer in the Boatrace Venture Project

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

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

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

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

use Boatrace\Sakura\Trimmer;
use Boatrace\Venture\Project\Trimmer;

var_dump(Trimmer::trim(null)); // NULL
var_dump(Trimmer::trim(' 競艇 ')); // string(6) "競艇"
Expand All @@ -30,4 +30,4 @@ var_dump(Trimmer::rtrim(' 競艇 ')); // string(7) " 競艇"
```

## License
The Boatrace Sakura Trimmer is open source software licensed under the [MIT license](LICENSE).
Trimmer in the Boatrace Venture Project is open source software licensed under the [MIT license](LICENSE).
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "boatrace-sakura/trimmer",
"description": "The Boatrace Sakura Trimmer.",
"name": "bvp/trimmer",
"description": "Trimmer in the Boatrace Venture Project.",
"license": "MIT",
"type": "library",
"authors": [
Expand All @@ -18,12 +18,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 [
'Trimmer' => \DI\create('\Boatrace\Sakura\Trimmer')->constructor(
'Trimmer' => \DI\create('\Boatrace\Venture\Project\Trimmer')->constructor(
\DI\get('MainTrimmer')
),
'MainTrimmer' => function ($container) {
return $container->get('\Boatrace\Sakura\MainTrimmer');
return $container->get('\Boatrace\Venture\Project\MainTrimmer');
},
];
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
2 changes: 1 addition & 1 deletion src/MainTrimmer.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;

/**
* @author shimomo
Expand Down
8 changes: 4 additions & 4 deletions src/Trimmer.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 Trimmer
{
/**
* @var \Boatrace\Sakura\Trimmer
* @var \Boatrace\Venture\Project\Trimmer
*/
protected static Trimmer $instance;

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

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

/**
* @return \Boatrace\Sakura\Trimmer
* @return \Boatrace\Venture\Project\Trimmer
*/
public static function getInstance(): Trimmer
{
Expand Down
6 changes: 3 additions & 3 deletions tests/MainTrimmerTest.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\MainTrimmer;
use Boatrace\Venture\Project\MainTrimmer;
use PHPUnit\Framework\TestCase as PHPUnitTestCase;

/**
Expand All @@ -13,7 +13,7 @@
class MainTrimmerTest extends PHPUnitTestCase
{
/**
* @var \Boatrace\Sakura\MainTrimmer
* @var \Boatrace\Venture\Project\MainTrimmer
*/
protected MainTrimmer $trimmer;

Expand Down
4 changes: 2 additions & 2 deletions tests/TrimmerTest.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\Trimmer;
use Boatrace\Venture\Project\Trimmer;
use PHPUnit\Framework\TestCase as PHPUnitTestCase;

/**
Expand Down

0 comments on commit b3a35f5

Please sign in to comment.