Skip to content

Commit

Permalink
Merge pull request #48 from BedrockStreaming/feat/update-code-style
Browse files Browse the repository at this point in the history
Add code style check to the CI
  • Loading branch information
valentin-claras authored Sep 1, 2021
2 parents aa078bb + 1801080 commit f99d578
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ jobs:

- name: 'Static analysis'
run: composer static-analysis

- name: 'Code style check'
run: composer code-style-check
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/bin/
/vendor/
/composer.lock
/.php_cs.cache
/.php-cs-fixer.cache
15 changes: 15 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

$finder = PhpCsFixer\Finder::create();
$finder->in(
[
__DIR__.'/src',
__DIR__.'/tests',
__DIR__.'/examples',
]
);

$config = new M6Web\CS\Config\BedrockStreaming();
$config->setFinder($finder);

return $config;
11 changes: 0 additions & 11 deletions .php_cs

This file was deleted.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"phpunit/phpunit": "^7.3",
"amphp/amp": "^2.0",
"guzzlehttp/guzzle": "^6.3",
"m6web/php-cs-fixer-config": "^1.0",
"m6web/php-cs-fixer-config": "^2.0",
"ext-curl": "^7.1",
"react/event-loop": "^1.0",
"react/promise": "^2.7",
Expand Down
1 change: 1 addition & 0 deletions src/Deferred.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public function getPromise(): Promise;

/**
* Resolves associated promise.
*
* @param mixed $value
*/
public function resolve($value): void;
Expand Down
1 change: 1 addition & 0 deletions src/EventLoop.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public function promiseRace(Promise ...$promises): Promise;

/**
* Creates a promise already resolved with $value.
*
* @param mixed $value
*/
public function promiseFulfilled($value): Promise;
Expand Down
1 change: 1 addition & 0 deletions tests/EventLoopTest/PromiseForeachTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ abstract protected function createEventLoop(): EventLoop;

/**
* Helper function to test that promiseForeach works for array AND iterator inputs.
*
* @param mixed[] $input
* @param mixed[] $expected
*/
Expand Down

0 comments on commit f99d578

Please sign in to comment.