-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8d31042
Showing
16 changed files
with
1,544 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.github/ export-ignore | ||
.editorconfig export-ignore | ||
tests/ export-ignore | ||
phpunit.xml.dist export-ignore | ||
phpstan.neon.dist export-ignore | ||
.php-cs-fixer.dist.php export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '**' | ||
|
||
jobs: | ||
build: | ||
name: Create a release | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Create release | ||
uses: actions/create-release@latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} Dimtrov - Sysinfo | ||
draft: true | ||
prerelease: false | ||
body: | | ||
Please refer to the [CHANGELOG](CHANGELOG.md) for the detailed list of changes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Coding Standards | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
pull_request: | ||
paths: | ||
- '**.php' | ||
- '**.neon.dist' | ||
- '.github/workflows/**' | ||
- composer.json | ||
- phpunit.xml.dist | ||
push: | ||
paths: | ||
- '**.php' | ||
- '**.neon.dist' | ||
- '.github/workflows/**' | ||
- composer.json | ||
- phpunit.xml.dist | ||
|
||
jobs: | ||
coding-standards: | ||
name: Coding Standards with PHP CS Fixer [PHP ${{ matrix.php-version }}] | ||
runs-on: ubuntu-20.04 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: | ||
- '7.4' | ||
- '8.0' | ||
- '8.1' | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: tokenizer | ||
coverage: none | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache composer dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.*') }} | ||
restore-keys: | | ||
composer-${{ runner.os }}-${{ matrix.php-version }}- | ||
composer-${{ runner.os }}- | ||
composer- | ||
- name: Setup Composer's GitHub OAuth access | ||
run: composer config --global github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install dependencies on tools | ||
run: composer update --ansi | ||
|
||
- name: Run PHP CS Fixer | ||
run: vendor/bin/php-cs-fixer fix --verbose --ansi --dry-run --using-cache=no --diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: PHPStan Static Analysis | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
pull_request: | ||
paths: | ||
- '**.php' | ||
- '**.neon.dist' | ||
- '.github/workflows/**' | ||
- composer.json | ||
- phpunit.xml.dist | ||
push: | ||
paths: | ||
- '**.php' | ||
- '**.neon.dist' | ||
- '.github/workflows/**' | ||
- composer.json | ||
- phpunit.xml.dist | ||
|
||
jobs: | ||
static-analyses: | ||
name: PHPStan Static Analysis [PHP ${{ matrix.php-version }}] | ||
runs-on: ubuntu-20.04 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: | ||
- '7.4' | ||
- '8.0' | ||
- '8.1' | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: tokenizer | ||
coverage: none | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache composer dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.*') }} | ||
restore-keys: | | ||
composer-${{ runner.os }}-${{ matrix.php-version }}- | ||
composer-${{ runner.os }}- | ||
composer- | ||
- name: Create PHPStan cache directory | ||
run: mkdir --parents build/phpstan | ||
|
||
- name: Cache PHPStan cache directory | ||
uses: actions/cache@v2 | ||
with: | ||
path: build/phpstan | ||
key: phpstan-${{ runner.os }}-${{ github.sha }} | ||
restore-keys: | | ||
phpstan-${{ runner.os }}- | ||
phpstan- | ||
- name: Setup Composer's GitHub OAuth access | ||
run: composer config --global github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install dependencies | ||
run: composer update --ansi | ||
|
||
- name: Run PHPStan | ||
run: vendor/bin/phpstan analyse --ansi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
#------------------------- | ||
# Operating Specific Junk Files | ||
#------------------------- | ||
|
||
# OS X | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# OS X Thumbnails | ||
._* | ||
|
||
# Windows image file caches | ||
Thumbs.db | ||
ehthumbs.db | ||
Desktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Windows Installer files | ||
*.cab | ||
*.msi | ||
*.msm | ||
*.msp | ||
|
||
# Windows shortcuts | ||
*.lnk | ||
|
||
# Linux | ||
*~ | ||
|
||
# KDE directory preferences | ||
.directory | ||
|
||
# Linux trash folder which might appear on any partition or disk | ||
.Trash-* | ||
|
||
#------------------------- | ||
# Environment Files | ||
#------------------------- | ||
# These should never be under version control, | ||
# as it poses a security risk. | ||
.env | ||
.vagrant | ||
Vagrantfile | ||
|
||
#------------------------- | ||
# Temporary Files | ||
#------------------------- | ||
|
||
php_errors.log | ||
|
||
#------------------------- | ||
# Test Files | ||
#------------------------- | ||
tests/coverage* | ||
|
||
# Don't save phpunit under version control. | ||
phpunit | ||
|
||
#------------------------- | ||
# Composer | ||
#------------------------- | ||
vendor/ | ||
composer.lock | ||
|
||
#------------------------- | ||
# IDE / Development Files | ||
#------------------------- | ||
|
||
# Modules Testing | ||
_modules/* | ||
|
||
# phpenv local config | ||
.php-version | ||
|
||
# Jetbrains editors (PHPStorm, etc) | ||
.idea/ | ||
*.iml | ||
|
||
# Netbeans | ||
nbproject/ | ||
build/ | ||
nbbuild/ | ||
dist/ | ||
nbdist/ | ||
nbactions.xml | ||
nb-configuration.xml | ||
.nb-gradle/ | ||
|
||
# Sublime Text | ||
*.tmlanguage.cache | ||
*.tmPreferences.cache | ||
*.stTheme.cache | ||
*.sublime-workspace | ||
*.sublime-project | ||
.phpintel | ||
/api/ | ||
|
||
# Visual Studio Code | ||
.vscode/ | ||
|
||
/results/ | ||
/phpunit*.xml | ||
/.phpunit.*.cache | ||
|
||
/.php-cs-fixer.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of dimtrov/sysinfo (PHP System Informations). | ||
* | ||
* (c) 2022 Dimitri Sitchet Tomkeu <[email protected]> | ||
* | ||
* For the full copyright and license information, please view | ||
* the LICENSE file that was distributed with this source code. | ||
*/ | ||
|
||
use BlitzPHP\CodingStandard\Blitz; | ||
use Nexus\CsConfig\Factory; | ||
use Nexus\CsConfig\Fixer\Comment\NoCodeSeparatorCommentFixer; | ||
use Nexus\CsConfig\Fixer\Comment\SpaceAfterCommentStartFixer; | ||
use Nexus\CsConfig\FixerGenerator; | ||
use PhpCsFixer\Finder; | ||
|
||
$finder = Finder::create() | ||
->files() | ||
->in([ | ||
__DIR__ . '/src', | ||
]) | ||
->notName('#Foobar.php$#') | ||
->append([ | ||
__FILE__, | ||
]); | ||
|
||
$overrides = []; | ||
|
||
$options = [ | ||
'cacheFile' => 'build/.php-cs-fixer.cache', | ||
'finder' => $finder, | ||
'customFixers' => FixerGenerator::create('vendor/nexusphp/cs-config/src/Fixer', 'Nexus\\CsConfig\\Fixer'), | ||
'customRules' => [ | ||
NoCodeSeparatorCommentFixer::name() => true, | ||
SpaceAfterCommentStartFixer::name() => true, | ||
], | ||
]; | ||
|
||
return Factory::create(new Blitz(), $overrides, $options)->forLibrary( | ||
'dimtrov/sysinfo (PHP System Informations)', | ||
'Dimitri Sitchet Tomkeu', | ||
'[email protected]', | ||
2022 | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Dimitri Sitchet Tomkeu - dimtrov/sysinfo | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.