Skip to content

Commit bc38891

Browse files
committed
Applied latest CS rules
1 parent 2ea53f4 commit bc38891

File tree

244 files changed

+776
-163
lines changed

Some content is hidden

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

244 files changed

+776
-163
lines changed

.php_cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php declare(strict_types=1);
22

3-
use ApiClients\Tools\TestUtilities\PhpCsFixerConfig;
3+
use ApiClients\Tools\CsFixerConfig\PhpCsFixerConfig;
44
use PhpCsFixer\Config;
55

66
return (function (): Config
@@ -11,7 +11,12 @@ return (function (): Config
1111
__DIR__ . DIRECTORY_SEPARATOR . 'examples',
1212
];
1313

14-
return PhpCsFixerConfig::create()
14+
$config = PhpCsFixerConfig::create();
15+
$rules = $config->getRules();
16+
$rules['void_return'] = false;
17+
18+
return $config
19+
->setRules($rules)
1520
->setFinder(
1621
PhpCsFixer\Finder::create()
1722
->in($paths)

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"wyrihaximus/react-stream-json": "^1.0"
3030
},
3131
"require-dev": {
32+
"api-clients/cs-fixer-config": "^1.1",
3233
"api-clients/middleware-delay": "^3.0",
3334
"api-clients/middleware-pool": "^3.0",
3435
"api-clients/resource-generator": "^1.0",

composer.lock

Lines changed: 114 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/advanced-add-topic-php-to-all-repositories-that-start-their-name-with-php.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use function ApiClients\Foundation\resource_pretty_print;
88
use function ApiClients\Tools\Rx\unwrapObservableFromPromise;
99

10-
require dirname(__DIR__) . DIRECTORY_SEPARATOR . 'vendor/autoload.php';
10+
require \dirname(__DIR__) . \DIRECTORY_SEPARATOR . 'vendor/autoload.php';
1111

1212
$loop = Factory::create();
1313
$client = AsyncClient::create($loop, require 'resolve_token.php');
@@ -26,10 +26,10 @@
2626
return $repository->size() > 0;
2727
})->filter(function (Repository $repository) {
2828
// Filter out all repositories that start their name with php
29-
return substr($repository->name(), 0, 3) === 'php';
29+
return \substr($repository->name(), 0, 3) === 'php';
3030
})->filter(function (Repository $repository) {
3131
// Be sure the repository doesn't have PHP in it's topics already
32-
return !in_array('php', $repository->topics(), true);
32+
return !\in_array('php', $repository->topics(), true);
3333
})->subscribe(function (Repository $repository) {
3434
// Add php to the list of topics and update (replace) the topics
3535
$topics = $repository->topics();

0 commit comments

Comments
 (0)