Skip to content

Commit

Permalink
Merge pull request #132 from WebProject-xyz/develop
Browse files Browse the repository at this point in the history
Next Release
  • Loading branch information
Fahl-Design authored Jun 4, 2022
2 parents 8fb0b89 + 1ff8328 commit c3024db
Show file tree
Hide file tree
Showing 18 changed files with 1,116 additions and 700 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cocdeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
php-version: "${{ matrix.php-version }}"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependencies }}"

Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ on: [ push, pull_request ]
name: CodeStyle

jobs:
codeception-tests:
name: "Codeception tests"
code-style-tests:
name: "Style Checks"
runs-on: "ubuntu-latest"
continue-on-error: ${{ matrix.allow-fail }}
strategy:
Expand All @@ -18,7 +18,7 @@ jobs:

steps:
- name: "Checkout code"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
Expand All @@ -28,11 +28,12 @@ jobs:
php-version: "${{ matrix.php-version }}"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependencies }}"

- name: "Run Grump checks"
- name: "Run PHPStan checks"
run: |
vendor/bin/grumphp run -c .
vendor/bin/codecept build -c .
vendor/bin/phpstan
6 changes: 3 additions & 3 deletions .github/workflows/mr-auto-merge-dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ on:
types:
- completed
workflows:
- "Cocdeception"
# - "Cocdeception"
- "Codacy Security Scan"
- "CodeStyle"
- "Codecov"
# - "CodeStyle"
# - "Codecov"

jobs:
merge-me:
Expand Down
191 changes: 171 additions & 20 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<?php
declare(strict_types=1);

$header = <<<'EOF'
HEADER
EOF;

$finder = \PhpCsFixer\Finder::create()
->files()
->in(__DIR__ . '/src')
Expand All @@ -14,26 +10,178 @@
->name('*.php');

$rules = [
// start symfony set
'@Symfony' => true,
/* symfony set @see \PhpCsFixer\RuleSet\Sets\SymfonySet */
'@PSR12' => true,
'array_syntax' => true,
'backtick_to_shell_exec' => true,
// 'binary_operator_spaces' => true,
'blank_line_before_statement' => [
'statements' => [
'return',
],
],
'braces' => [
'allow_single_line_anonymous_class_with_empty_body' => true,
'allow_single_line_closure' => true,
],
'cast_spaces' => true,
'class_attributes_separation' => [
'elements' => [
'method' => 'one',
],
],
'class_definition' => [
'single_line' => true,
],
'clean_namespace' => true,
// 'concat_space' => true,
'echo_tag_syntax' => true,
'empty_loop_body' => ['style' => 'braces'],
'empty_loop_condition' => true,
'fully_qualified_strict_types' => true,
'function_typehint_space' => true,
'general_phpdoc_tag_rename' => [
'replacements' => [
'inheritDocs' => 'inheritDoc',
],
],
'include' => true,
'increment_style' => true,
'integer_literal_case' => true,
'lambda_not_used_import' => true,
'linebreak_after_opening_tag' => true,
'magic_constant_casing' => true,
'magic_method_casing' => true,
'method_argument_space' => [
'on_multiline' => 'ignore',
],
'native_function_casing' => true,
'native_function_type_declaration_casing' => true,
'no_alias_language_construct_call' => true,
'no_alternative_syntax' => true,
'no_binary_string' => true,
'no_blank_lines_after_phpdoc' => true,
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_extra_blank_lines' => [
'tokens' => [
'case',
'continue',
'curly_brace_block',
'default',
'extra',
'parenthesis_brace_block',
'square_brace_block',
'switch',
'throw',
'use',
],
],
'no_leading_namespace_whitespace' => true,
'no_mixed_echo_print' => true,
'no_multiline_whitespace_around_double_arrow' => true,
'no_short_bool_cast' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_spaces_around_offset' => true,
'no_superfluous_phpdoc_tags' => [
'allow_mixed' => true,
'allow_unused_params' => true,
],
'no_trailing_comma_in_list_call' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_unneeded_control_parentheses' => [
'statements' => [
'break',
'clone',
'continue',
'echo_print',
'return',
'switch_case',
'yield',
'yield_from',
],
],
'no_unneeded_curly_braces' => [
'namespaces' => true,
],
'no_unset_cast' => true,
'no_unused_imports' => true,
'no_whitespace_before_comma_in_array' => true,
'normalize_index_brace' => true,
'object_operator_without_whitespace' => true,
// 'ordered_imports' => true,
'php_unit_fqcn_annotation' => true,
'php_unit_method_casing' => true,
'phpdoc_align' => true,
'phpdoc_annotation_without_dot' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => true,
'phpdoc_no_access' => true,
'phpdoc_no_alias_tag' => true,
'phpdoc_no_package' => true,
'phpdoc_no_useless_inheritdoc' => true,
'phpdoc_return_self_reference' => true,
'phpdoc_scalar' => true,
'phpdoc_separation' => true,
'phpdoc_single_line_var_spacing' => true,
'phpdoc_summary' => true,
'phpdoc_tag_type' => [
'tags' => [
'inheritDoc' => 'inline',
],
],
// see below! 'phpdoc_to_comment' => true,
'phpdoc_trim' => true,
'phpdoc_trim_consecutive_blank_line_separation' => true,
'phpdoc_types' => true,
'phpdoc_types_order' => [
'null_adjustment' => 'always_last',
'sort_algorithm' => 'none',
],
'phpdoc_var_without_name' => true,
'protected_to_private' => true,
'semicolon_after_instruction' => true,
'single_class_element_per_statement' => true,
'single_line_comment_style' => [
'comment_types' => [
'hash',
],
],
'single_line_throw' => true,
'single_quote' => true,
'single_space_after_construct' => true,
'space_after_semicolon' => [
'remove_in_empty_for_expressions' => true,
],
'standardize_increment' => true,
'standardize_not_equals' => true,
'switch_continue_to_break' => true,
'trailing_comma_in_multiline' => true,
'trim_array_spaces' => true,
'types_spaces' => true,
'unary_operator_spaces' => true,
'whitespace_after_comma_in_array' => true,
'yoda_style' => true,
// END \PhpCsFixer\RuleSet\Sets\SymfonySet
'binary_operator_spaces' => [
'default' => 'align',
'operators' => [
'??' => 'single_space',
],
],
'concat_space' => ['spacing' => 'one'],
'@PhpCsFixer:risky' => true,
'encoding' => true,
'single_blank_line_before_namespace' => true,
'blank_line_after_opening_tag' => false,
'strict_param' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'modernize_types_casting' => true,
'declare_strict_types' => true,
'dir_constant' => true,
'no_whitespace_in_blank_line' => true,
'concat_space' => ['spacing' => 'one'],
'@PhpCsFixer:risky' => true,
'encoding' => true,
'single_blank_line_before_namespace' => true,
'blank_line_after_opening_tag' => false,
'strict_param' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'modernize_types_casting' => true,
'declare_strict_types' => true,
'dir_constant' => true,
'no_whitespace_in_blank_line' => true,

'@Symfony:risky' => true,
'@PHPUnit75Migration:risky' => true,
Expand All @@ -42,18 +190,21 @@
'fopen_flags' => false,
'combine_nested_dirname' => true,

'ordered_imports' => [
'ordered_imports' => [
'sort_algorithm' => 'alpha',
'imports_order' => [
'const', 'class', 'function',
],
],

'global_namespace_import' => [
'global_namespace_import' => [
'import_classes' => true,
'import_functions' => true,
'import_constants' => true,
],

// if this is true, phpstan checks will fail
'phpdoc_to_comment' => false,
];

$config = new \PhpCsFixer\Config('default');
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Inspired by

### Main

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b317b3e9521740e59e7dff003a0cbd69)](https://app.codacy.com/app/Fahl-Design/ikea-tradfri-php?utm_source=github.com&utm_medium=referral&utm_content=WebProject-xyz/ikea-tradfri-php&utm_campaign=badger)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/a04395190abd4cb1aa4fa9c7c8077810)](https://www.codacy.com/gh/WebProject-xyz/ikea-tradfri-php/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=WebProject-xyz/ikea-tradfri-php&amp;utm_campaign=Badge_Grade)
[![Cocdeception](https://github.com/WebProject-xyz/ikea-tradfri-php/actions/workflows/cocdeception.yml/badge.svg?branch=master&style=flat)](https://github.com/WebProject-xyz/ikea-tradfri-php/actions/workflows/cocdeception.yml)
[![Maintainability](https://api.codeclimate.com/v1/badges/c3a38c872794aa6a83c9/maintainability)](https://codeclimate.com/github/WebProject-xyz/ikea-tradfri-php/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/c3a38c872794aa6a83c9/test_coverage)](https://codeclimate.com/github/WebProject-xyz/ikea-tradfri-php/test_coverage)
Expand Down
7 changes: 0 additions & 7 deletions build/script/travis_after_success.sh

This file was deleted.

17 changes: 0 additions & 17 deletions build/script/travis_before_install.sh

This file was deleted.

16 changes: 0 additions & 16 deletions build/script/travis_script.sh

This file was deleted.

Loading

0 comments on commit c3024db

Please sign in to comment.