Skip to content

Commit 1f437a5

Browse files
committed
Delete composer 1 dev dependency and update php style fixer configuration.
1 parent 73793b5 commit 1f437a5

73 files changed

Lines changed: 1017 additions & 746 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.php-cs-fixer.php

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
$header = <<<'EOF'
6+
BigBlueButton open source conferencing system - https://www.bigbluebutton.org/.
7+
8+
Copyright (c) 2016-2022 BigBlueButton Inc. and by respective authors (see below).
9+
10+
This program is free software; you can redistribute it and/or modify it under the
11+
terms of the GNU Lesser General Public License as published by the Free Software
12+
Foundation; either version 3.0 of the License, or (at your option) any later
13+
version.
14+
15+
BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
16+
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
17+
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
18+
19+
You should have received a copy of the GNU Lesser General Public License along
20+
with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
21+
EOF;
22+
23+
$finder = PhpCsFixer\Finder::create()
24+
->files()
25+
->name(['*.php'])
26+
->in(__DIR__ . '/src')
27+
->in(__DIR__ . '/tests');
28+
29+
$config = new PhpCsFixer\Config();
30+
$config
31+
->setRiskyAllowed(true)
32+
->setRules([
33+
'@PhpCsFixer' => true,
34+
'general_phpdoc_annotation_remove' => ['annotations' => ['expectedDeprecation']], // one should use PHPUnit built-in method instead
35+
'header_comment' => ['header' => $header],
36+
'concat_space' => ['spacing' => 'one'],
37+
'function_declaration' => ['closure_function_spacing' => 'none'],
38+
'constant_case' => ['case' => 'lower'],
39+
'single_quote' => true,
40+
'mb_str_functions' => true,
41+
'array_syntax' => ['syntax' => 'short'],
42+
'binary_operator_spaces' => ['operators' =>
43+
['=>' => 'align_single_space_minimal', '=' => 'align_single_space_minimal']
44+
],
45+
])
46+
->setFinder($finder);
47+
48+
return $config;

.php_cs

Lines changed: 0 additions & 53 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Bugs and feature request are tracked on [GitHub](https://github.com/bigbluebutto
3737
Make sure the code style configuration is applied by running PHPCS-Fixer.
3838

3939
```
40-
./vendor/bin/php-cs-fixer fix --allow-risky yes
40+
./vendor/bin/php-cs-fixer fix
4141
```
4242

4343
### Running tests

composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,10 @@
3030
},
3131
"require-dev": {
3232
"ext-mbstring": "*",
33-
"composer/composer": "^1.10.24",
3433
"phpunit/phpunit": "^8.5",
3534
"fakerphp/faker": "^1.17",
36-
"friendsofphp/php-cs-fixer": "^2.19",
37-
"squizlabs/php_codesniffer": "^3.6",
35+
"friendsofphp/php-cs-fixer": "^3.8.0",
36+
"squizlabs/php_codesniffer": "^3.7",
3837
"php-coveralls/php-coveralls": "^2.5.2"
3938
},
4039
"options": {

0 commit comments

Comments
 (0)