Skip to content

Commit 307e781

Browse files
authored
Merge pull request #195 from jakubkulhan/0.6.x-include-benchmark-examples-and-toturial-in-PHPCS-run
[0.6.x] Include benchmark, examples, and tutorial in PHPCS runs
2 parents 7a99f8d + 7917594 commit 307e781

File tree

10 files changed

+17
-3
lines changed

10 files changed

+17
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ all: ## Runs everything ###
3333
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | grep -v "###" | awk 'BEGIN {FS = ":.*?## "}; {printf "%s\n", $$1}' | xargs --open-tty $(MAKE)
3434

3535
cs-fix: ## Fix any automatically fixable code style issues
36-
$(DOCKER_RUN) vendor/bin/phpcbf --parallel=$(THREADS) --cache=./var/.phpcs.cache.json --standard=./phpcs.xml || $(DOCKER_RUN) vendor/bin/phpcbf --parallel=$(THREADS) --cache=./var/.phpcs.cache.json --standard=./phpcs.xml || $(DOCKER_RUN) vendor/bin/phpcbf --parallel=$(THREADS) --cache=./var/.phpcs.cache.json --standard=./etc/qa/phpcs.xml -vvvv
36+
$(DOCKER_RUN) vendor/bin/phpcbf --parallel=$(THREADS) --cache=./var/.phpcs.cache.json --standard=./phpcs.xml || $(DOCKER_RUN) vendor/bin/phpcbf --parallel=$(THREADS) --cache=./var/.phpcs.cache.json --standard=./phpcs.xml || $(DOCKER_RUN) vendor/bin/phpcbf --parallel=$(THREADS) --cache=./var/.phpcs.cache.json --standard=./phpcs.xml -vvvv
3737

3838
cs: ## Check the code for code style issues
3939
$(DOCKER_RUN) vendor/bin/phpcs --parallel=$(THREADS) --cache=./var/.phpcs.cache.json --standard=./phpcs.xml

benchmark/consumer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
if ($msg->content === 'quit') {
2929
$runTime = microtime(true) - $time;
30-
printf("Consume: Pid: %s, Count: %s, Time: %.6f, Msg/sec: %.0f\n", getmypid(), $count, $runTime, (1 / $runTime) * $count);
30+
printf("Consume: Pid: %s, Count: %s, Time: %.6f, Msg/sec: %.0f\n", getmypid(), $count, $runTime, 1 / $runTime * $count);
3131
$c->disconnect();
3232
} else {
3333
++$count;

benchmark/producer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
}
4040

4141
$runTime = microtime(true) - $time;
42-
printf("Produce: Pid: %s, Time: %.6f, Msg/sec: %.0f\n", getmypid(), $runTime, (1 / $runTime) * $max);
42+
printf("Produce: Pid: %s, Time: %.6f, Msg/sec: %.0f\n", getmypid(), $runTime, 1 / $runTime * $max);
4343

4444
$ch->publish('quit', [], 'bench_exchange');
4545

examples/tls/01-selfsigned.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
/*
46
* Use case
57
* - self-signed certificates

examples/tls/02-peer-verify.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
/*
46
* Use case
57
* - self-signed certificates

examples/tls/03-client-verify.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
/*
46
* Use case
57
* - client certificate should be used

examples/tls/04-client-verify-passphrase.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
/*
46
* Use case
57
* - client certificate should be used

examples/tls/05-client-verify-multiple-files.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
/*
46
* Use case
57
* - client certificate should be used

phpcs.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
<arg name="encoding" value="utf-8"/>
55
<arg name="colors"/>
66
<arg value="sp"/>
7+
<file>benchmark</file>
8+
<file>examples</file>
79
<file>src</file>
10+
<file>tutorial</file>
811
<file>test</file>
912
<!-- <file>benchmark</file>-->
1013
<!-- <file>examples</file>-->

tutorial/6-rpc/rpc_client.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
require dirname(__DIR__, 2) . '/vendor/autoload.php';
1313

14+
// phpcs:disabled
1415
class FibonacciRpcClient
1516
{
1617
private Client $client;

0 commit comments

Comments
 (0)