Skip to content

Commit 45998a8

Browse files
committed
Initial commit
1 parent 5bd8426 commit 45998a8

31 files changed

Lines changed: 5860 additions & 1 deletion

.github/workflows/test.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [ "main", "develop" ]
6+
pull_request:
7+
branches: [ "main", "develop" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
phpunit:
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
php-version: ["8.5"]
20+
21+
steps:
22+
# Workspace development workflow:
23+
# this job reconstructs the local workspace layout expected by sibling path
24+
# repositories, so related packages are checked out side by side during development.
25+
#
26+
# Release workflow:
27+
# tagged release validation must also succeed from an isolated checkout with
28+
# `composer validate`, `composer test`, and `composer analyse`.
29+
- name: Checkout value-kit
30+
uses: actions/checkout@v4
31+
with:
32+
path: value-kit
33+
34+
- name: Setup PHP
35+
uses: shivammathur/setup-php@v2
36+
with:
37+
php-version: ${{ matrix.php-version }}
38+
extensions: bcmath, mbstring
39+
tools: composer:v2, phpunit
40+
coverage: none
41+
42+
- name: Validate composer.json
43+
working-directory: value-kit
44+
run: composer validate --strict
45+
46+
- name: Get Composer Cache Directory
47+
id: composer-cache
48+
working-directory: value-kit
49+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
50+
51+
- name: Cache dependencies
52+
uses: actions/cache@v4
53+
with:
54+
path: ${{ steps.composer-cache.outputs.dir }}
55+
key: ${{ runner.os }}-composer-${{ matrix.php-version }}-${{ hashFiles('value-kit/composer.json') }}
56+
restore-keys: ${{ runner.os }}-composer-
57+
58+
- name: Install dependencies
59+
working-directory: value-kit
60+
run: |
61+
bash ./tools/ensure-vendor.sh
62+
if [ ! -f vendor/autoload.php ]; then
63+
composer update -W --prefer-dist --no-progress
64+
fi
65+
66+
- name: Run test suite
67+
working-directory: value-kit
68+
run: composer test
69+
70+
- name: Run static analysis
71+
working-directory: value-kit
72+
run: composer analyse

.gitignore

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# ENV
2+
/.buildpath
3+
4+
## vagrant
5+
/.project
6+
.vagrant
7+
/.vscode
8+
.vagrant.d
9+
/.settings/
10+
.php-version
11+
/composer.lock
12+
/composer.phar
13+
/vendor/
14+
15+
# composer
16+
vendor/
17+
composer.lock
18+
19+
# Framework
20+
## var directorys
21+
/var/*
22+
src/web/*/*/logs/*
23+
24+
# IDE ane editor
25+
## Eclipse
26+
.project
27+
.settings
28+
.buildpath
29+
.ide
30+
Bundle-SourceCode.ps1
31+
32+
# PHPUnit
33+
.phpunit.cache
34+
.phpunit.result.cache
35+
/phpunit.phar
36+
tests/.phpunit.cache/test-results
37+
38+
# etc
39+
.svn
40+
.gitignore
41+
!/.gitignore
42+
.git
43+
/log/*
44+
!/log/.gitkeep
45+
46+
# AI
47+
.github/copilot-instructions.md
48+
.copilotignore
49+
CODING_STANDARDS.md
50+
.clinerules

.php-cs-fixer.dist.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
/**
3+
* ___ _____ __ __ __
4+
* / _ )__ _____ ___ ____ ___ / _/ ___ _/ / / /_____/ /_
5+
* / _ / // / _ / _ `(_-<(_-</ _/ / _ `/ /_/ / __/ _ /
6+
* /____/\_, / .__\_,_/___/___/_//_/\_,_/\____/_/ \_,_/
7+
* /___/_/ ValueKit — Access Helpers for PHP Values and Nested Paths.
8+
*
9+
* @package bypassflow
10+
* @category value-kit
11+
* @author wakaba <wakabadou@gmail.com>
12+
* @since 8.5.0
13+
* @copyright Copyright (c) 2025 Project ICKX
14+
* (http://www.wakabadou.net/) / Project ICKX (https://ickx.jp/).
15+
* @license http://opensource.org/licenses/MIT The MIT License.
16+
* This software is released under the MIT License.
17+
*/
18+
19+
declare(strict_types=1);
20+
21+
return (include \sprintf('%s/.php-cs-fixer/.php-cs-fixer.config.php', __DIR__))->setFinder(
22+
include \sprintf('%s/.php-cs-fixer/.php-cs-fixer.finder.php', __DIR__),
23+
);
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
/**
3+
* ___ _____ __ __ __
4+
* / _ )__ _____ ___ ____ ___ / _/ ___ _/ / / /_____/ /_
5+
* / _ / // / _ / _ `(_-<(_-</ _/ / _ `/ /_/ / __/ _ /
6+
* /____/\_, / .__\_,_/___/___/_//_/\_,_/\____/_/ \_,_/
7+
* /___/_/ value-kit
8+
*
9+
* @package bypassflow
10+
* @category value-kit
11+
* @author wakaba <wakabadou@gmail.com>
12+
* @since 8.5.0
13+
* @copyright Copyright (c) 2025 Project ICKX
14+
* (http://www.wakabadou.net/) / Project ICKX (https://ickx.jp/).
15+
* @license http://opensource.org/licenses/MIT The MIT License.
16+
* This software is released under the MIT License.
17+
*/
18+
19+
declare(strict_types=1);
20+
21+
require_once \sprintf('%s/vendor/autoload.php', dirname(__DIR__));
22+
23+
return (new PhpCsFixer\Config())
24+
->registerCustomFixers([
25+
new \bypassflow\Standards\PhpCsFixer\CustomFixer\LeadingContinuationIndentFixer(),
26+
])
27+
->setLineEnding("\n")
28+
->setRiskyAllowed(true)
29+
->setUsingCache(false)
30+
->setRules(include \sprintf('%s/.php-cs-fixer.rules.php', __DIR__));
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
/**
3+
* ___ _____ __ __ __
4+
* / _ )__ _____ ___ ____ ___ / _/ ___ _/ / / /_____/ /_
5+
* / _ / // / _ / _ `(_-<(_-</ _/ / _ `/ /_/ / __/ _ /
6+
* /____/\_, / .__\_,_/___/___/_//_/\_,_/\____/_/ \_,_/
7+
* /___/_/ value-kit
8+
*
9+
* @package bypassflow
10+
* @category value-kit
11+
* @author wakaba <wakabadou@gmail.com>
12+
* @since 8.5.0
13+
* @copyright Copyright (c) 2025 Project ICKX
14+
* (http://www.wakabadou.net/) / Project ICKX (https://ickx.jp/).
15+
* @license http://opensource.org/licenses/MIT The MIT License.
16+
* This software is released under the MIT License.
17+
*/
18+
19+
declare(strict_types=1);
20+
21+
/**
22+
* 除外ディレクトリ設定
23+
*
24+
* @see \PhpCsFixer\Finder::exclude()
25+
*/
26+
return [
27+
'.git',
28+
'.settings',
29+
'.buildpath',
30+
'.project',
31+
'.php-cs-fixer',
32+
'vendor',
33+
];
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
/**
3+
* ___ _____ __ __ __
4+
* / _ )__ _____ ___ ____ ___ / _/ ___ _/ / / /_____/ /_
5+
* / _ / // / _ / _ `(_-<(_-</ _/ / _ `/ /_/ / __/ _ /
6+
* /____/\_, / .__\_,_/___/___/_//_/\_,_/\____/_/ \_,_/
7+
* /___/_/ value-kit
8+
*
9+
* @package bypassflow
10+
* @category value-kit
11+
* @author wakaba <wakabadou@gmail.com>
12+
* @since 8.5.0
13+
* @copyright Copyright (c) 2025 Project ICKX
14+
* (http://www.wakabadou.net/) / Project ICKX (https://ickx.jp/).
15+
* @license http://opensource.org/licenses/MIT The MIT License.
16+
* This software is released under the MIT License.
17+
*/
18+
19+
declare(strict_types=1);
20+
21+
$root_dir = \dirname(__DIR__);
22+
23+
return PhpCsFixer\Finder::create()
24+
->in($root_dir) // 読み込み対象ディレクトリ
25+
->notPath(\array_merge( // 除外対象ファイルパス
26+
include \sprintf('%s/.php-cs-fixer/.php-cs-fixer.not_path.php', $root_dir),
27+
))
28+
->exclude(\array_merge( // 除外対象ディレクトリ
29+
include \sprintf('%s/.php-cs-fixer/.php-cs-fixer.exclude.php', $root_dir),
30+
));
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
/**
3+
* ___ _____ __ __ __
4+
* / _ )__ _____ ___ ____ ___ / _/ ___ _/ / / /_____/ /_
5+
* / _ / // / _ / _ `(_-<(_-</ _/ / _ `/ /_/ / __/ _ /
6+
* /____/\_, / .__\_,_/___/___/_//_/\_,_/\____/_/ \_,_/
7+
* /___/_/ value-kit
8+
*
9+
* @package bypassflow
10+
* @category value-kit
11+
* @author wakaba <wakabadou@gmail.com>
12+
* @since 8.5.0
13+
* @copyright Copyright (c) 2025 Project ICKX
14+
* (http://www.wakabadou.net/) / Project ICKX (https://ickx.jp/).
15+
* @license http://opensource.org/licenses/MIT The MIT License.
16+
* This software is released under the MIT License.
17+
*/
18+
19+
declare(strict_types=1);
20+
21+
/**
22+
* 除外ファイルパス設定
23+
*
24+
* @see \PhpCsFixer\Finder::notPath()
25+
*/
26+
return [
27+
'*.xml',
28+
'.php_cs',
29+
'.project.php_cs',
30+
'composer.*',
31+
'phpunit.xml*',
32+
'README.md',
33+
];

0 commit comments

Comments
 (0)