GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 218b29...ff0709 )
by Anton
03:10
created
src/functions.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
  * });
51 51
  * ```
52 52
  */
53
-function host(string ...$hostname): Host|ObjectProxy
53
+function host(string ...$hostname): Host | ObjectProxy
54 54
 {
55 55
     $deployer = Deployer::get();
56 56
     if (count($hostname) === 1 && $deployer->hosts->has($hostname[0])) {
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $deployer->hosts->set($aliases[0], $host);
71 71
         return $host;
72 72
     } else {
73
-        $hosts = array_map(function ($hostname) use ($deployer): Host {
73
+        $hosts = array_map(function($hostname) use ($deployer): Host {
74 74
             $host = new Host($hostname);
75 75
             $deployer->hosts->set($hostname, $host);
76 76
             return $host;
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
  * localhost('ci'); // Alias and hostname will be "ci".
88 88
  * ```
89 89
  */
90
-function localhost(string ...$hostnames): Localhost|ObjectProxy
90
+function localhost(string ...$hostnames): Localhost | ObjectProxy
91 91
 {
92 92
     $deployer = Deployer::get();
93 93
     $hostnames = Range::expand($hostnames);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $deployer->hosts->set($host->getAlias(), $host);
98 98
         return $host;
99 99
     } else {
100
-        $hosts = array_map(function ($hostname) use ($deployer): Localhost {
100
+        $hosts = array_map(function($hostname) use ($deployer): Localhost {
101 101
             $host = new Localhost($hostname);
102 102
             $deployer->hosts->set($host->getAlias(), $host);
103 103
             return $host;
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
  * @param callable|array|null $body Callable task, array of other tasks names or nothing to get a defined tasks
184 184
  * @return Task
185 185
  */
186
-function task(string $name, callable|array|null $body = null): Task
186
+function task(string $name, callable | array | null $body = null): Task
187 187
 {
188 188
     $deployer = Deployer::get();
189 189
 
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
  *
236 236
  * @return ?Task
237 237
  */
238
-function before(string $task, string|callable $do): ?Task
238
+function before(string $task, string | callable $do): ?Task
239 239
 {
240 240
     if (is_closure($do)) {
241 241
         $newTask = task("before:$task", $do);
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
  *
256 256
  * @return ?Task
257 257
  */
258
-function after(string $task, string|callable $do): ?Task
258
+function after(string $task, string | callable $do): ?Task
259 259
 {
260 260
     if (is_closure($do)) {
261 261
         $newTask = task("after:$task", $do);
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
  *
277 277
  * @return ?Task
278 278
  */
279
-function fail(string $task, string|callable $do): ?Task
279
+function fail(string $task, string | callable $do): ?Task
280 280
 {
281 281
     if (is_callable($do)) {
282 282
         $newTask = task("fail:$task", $do);
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 {
338 338
     $currentBecome = get('become');
339 339
     set('become', $user);
340
-    return function () use ($currentBecome) {
340
+    return function() use ($currentBecome) {
341 341
         set('become', $currentBecome);
342 342
     };
343 343
 }
@@ -400,14 +400,14 @@  discard block
 block discarded – undo
400 400
     ?int    $idleTimeout = null,
401 401
 ): string {
402 402
     $runParams = new RunParams(
403
-        shell: currentHost()->getShell(),
404
-        cwd: $cwd ?? has('working_path') ? get('working_path') : null,
405
-        env: array_merge_alternate(get('env', []), $env ?? []),
406
-        nothrow: $nothrow,
407
-        timeout: $timeout ?? get('default_timeout', 300),
408
-        idleTimeout: $idleTimeout,
409
-        forceOutput: $forceOutput,
410
-        secrets: empty($secret) ? null : ['secret' => $secret],
403
+        shell : currentHost()->getShell(),
404
+        cwd : $cwd ?? has('working_path') ? get('working_path') : null,
405
+        env : array_merge_alternate(get('env', []), $env ?? []),
406
+        nothrow : $nothrow,
407
+        timeout : $timeout ?? get('default_timeout', 300),
408
+        idleTimeout : $idleTimeout,
409
+        forceOutput : $forceOutput,
410
+        secrets : empty($secret) ? null : ['secret' => $secret],
411 411
     );
412 412
 
413 413
     $dotenv = get('dotenv', false);
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
         $runParams->dotenv = $dotenv;
416 416
     }
417 417
 
418
-    $run = function (string $command, ?RunParams $params = null) use ($runParams): string {
418
+    $run = function(string $command, ?RunParams $params = null) use ($runParams) : string {
419 419
         $params = $params ?? $runParams;
420 420
         $host = currentHost();
421 421
         $command = parse($command);
@@ -490,14 +490,14 @@  discard block
 block discarded – undo
490 490
     ?string $shell = null,
491 491
 ): string {
492 492
     $runParams = new RunParams(
493
-        shell: $shell ?? 'bash -s',
494
-        cwd: $cwd,
495
-        env: $env,
496
-        nothrow: $nothrow,
497
-        timeout: $timeout,
498
-        idleTimeout: $idleTimeout,
499
-        forceOutput: $forceOutput,
500
-        secrets: empty($secret) ? null : ['secret' => $secret],
493
+        shell : $shell ?? 'bash -s',
494
+        cwd : $cwd,
495
+        env : $env,
496
+        nothrow : $nothrow,
497
+        timeout : $timeout,
498
+        idleTimeout : $idleTimeout,
499
+        forceOutput : $forceOutput,
500
+        secrets : empty($secret) ? null : ['secret' => $secret],
501 501
     );
502 502
 
503 503
     $process = Deployer::get()->processRunner;
Please login to merge, or discard this patch.
src/ProcessRunner/ProcessRunner.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         $this->pop->command($host, 'run', $command);
39 39
 
40 40
         $terminalOutput = $this->pop->callback($host, $params->forceOutput);
41
-        $callback = function ($type, $buffer) use ($host, $terminalOutput) {
41
+        $callback = function($type, $buffer) use ($host, $terminalOutput) {
42 42
             $this->logger->printBuffer($host, $type, $buffer);
43 43
             $terminalOutput($type, $buffer);
44 44
         };
Please login to merge, or discard this patch.
src/Ssh/SshClient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
             ->setTimeout($params->timeout)
79 79
             ->setIdleTimeout($params->idleTimeout);
80 80
 
81
-        $callback = function ($type, $buffer) use ($params, $host) {
81
+        $callback = function($type, $buffer) use ($params, $host) {
82 82
             $this->logger->printBuffer($host, $type, $buffer);
83 83
             $this->pop->callback($host, $params->forceOutput)($type, $buffer);
84 84
         };
Please login to merge, or discard this patch.
contrib/cachetool.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -58,13 +58,13 @@  discard block
 block discarded – undo
58 58
  */
59 59
 set('cachetool_url', 'https://github.com/gordalina/cachetool/releases/download/9.1.0/cachetool.phar');
60 60
 set('cachetool_args', '');
61
-set('bin/cachetool', function () {
61
+set('bin/cachetool', function() {
62 62
     if (!test('[ -f {{release_or_current_path}}/cachetool.phar ]')) {
63 63
         run("cd {{release_or_current_path}} && curl -sLO {{cachetool_url}}");
64 64
     }
65 65
     return '{{release_or_current_path}}/cachetool.phar';
66 66
 });
67
-set('cachetool_options', function () {
67
+set('cachetool_options', function() {
68 68
     $options = (array) get('cachetool');
69 69
     $fullOptions = (string) get('cachetool_args');
70 70
     $return = [];
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
  * Clear opcache cache
87 87
  */
88 88
 desc('Clears OPcode cache');
89
-task('cachetool:clear:opcache', function () {
89
+task('cachetool:clear:opcache', function() {
90 90
     $options = get('cachetool_options');
91 91
     foreach ($options as $option) {
92 92
         run("cd {{release_or_current_path}} && {{bin/php}} {{bin/cachetool}} opcache:reset $option");
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
  * Clear APCu cache
98 98
  */
99 99
 desc('Clears APCu system cache');
100
-task('cachetool:clear:apcu', function () {
100
+task('cachetool:clear:apcu', function() {
101 101
     $options = get('cachetool_options');
102 102
     foreach ($options as $option) {
103 103
         run("cd {{release_or_current_path}} && {{bin/php}} {{bin/cachetool}} apcu:cache:clear $option");
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
  * Clear file status cache, including the realpath cache
109 109
  */
110 110
 desc('Clears file status and realpath caches');
111
-task('cachetool:clear:stat', function () {
111
+task('cachetool:clear:stat', function() {
112 112
     $options = get('cachetool_options');
113 113
     foreach ($options as $option) {
114 114
         run("cd {{release_or_current_path}} && {{bin/php}} {{bin/cachetool}} stat:clear $option");
Please login to merge, or discard this patch.
recipe/deploy/env.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 set('dotenv_example', '.env.example');
6 6
 
7 7
 desc('Configure .env file');
8
-task('deploy:env', function () {
8
+task('deploy:env', function() {
9 9
     cd('{{release_or_current_path}}');
10 10
     if (test('[ ! -e .env ] && [ -f {{dotenv_example}} ]')) {
11 11
         run('cp {{dotenv_example}} .env');
Please login to merge, or discard this patch.
recipe/deploy/writable.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 // Used in `chown` and `acl` modes of {{writable_mode}}.
7 7
 // Attempts automatically to detect http user in process list.
8 8
 
9
-set('http_user', function () {
9
+set('http_user', function() {
10 10
     $candidates = explode("\n", run("ps axo comm,user | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | sort | awk '{print \$NF}' | uniq"));
11 11
     $httpUser = array_shift($candidates);
12 12
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 // Used to make a writable directory by a server.
24 24
 // Used in `chgrp` mode of {{writable_mode}} only.
25 25
 // Attempts automatically to detect http user in process list.
26
-set('http_group', function () {
26
+set('http_group', function() {
27 27
     $candidates = explode("\n", run("ps axo comm,group | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | sort | awk '{print \$NF}' | uniq"));
28 28
     $httpGroup = array_shift($candidates);
29 29
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 set('writable_acl_groups', []);
63 63
 
64 64
 desc('Makes writable dirs');
65
-task('deploy:writable', function () {
65
+task('deploy:writable', function() {
66 66
     $dirs = join(' ', get('writable_dirs'));
67 67
     $mode = get('writable_mode');
68 68
     $recursive = get('writable_recursive') ? '-R' : '';
Please login to merge, or discard this patch.
recipe/pimcore.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,13 +13,13 @@
 block discarded – undo
13 13
 add('writable_dirs', ['public/var', 'var/cache/dev']);
14 14
 
15 15
 desc('Rebuilds Pimcore Classes');
16
-task('pimcore:rebuild-classes', function () {
16
+task('pimcore:rebuild-classes', function() {
17 17
     run('{{bin/console}} pimcore:build:classes');
18 18
     run('{{bin/console}} pimcore:deployment:classes-rebuild --create-classes --delete-classes --no-interaction');
19 19
 });
20 20
 
21 21
 desc('Removes cache');
22
-task('pimcore:cache_clear', function () {
22
+task('pimcore:cache_clear', function() {
23 23
     run('rm -rf {{release_or_current_path}}/var/cache/dev/*');
24 24
 });
25 25
 
Please login to merge, or discard this patch.
contrib/crontab.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,12 +25,12 @@  discard block
 block discarded – undo
25 25
 namespace Deployer;
26 26
 
27 27
 // Get path to bin
28
-set('bin/crontab', function () {
28
+set('bin/crontab', function() {
29 29
     return which('crontab');
30 30
 });
31 31
 
32 32
 // Set the identifier used in the crontab, application name by default
33
-set('crontab:identifier', function () {
33
+set('crontab:identifier', function() {
34 34
     return get('application', 'application');
35 35
 });
36 36
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 set('crontab:use_sudo', false);
39 39
 
40 40
 desc('Sync crontab jobs');
41
-task('crontab:sync', function () {
41
+task('crontab:sync', function() {
42 42
     $cronJobsLocal = array_map(
43 43
         fn($job) => parse($job),
44 44
         get('crontab:jobs', []),
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 });
83 83
 
84 84
 desc('Remove crontab jobs');
85
-task('crontab:remove', function () {
85
+task('crontab:remove', function() {
86 86
     $cronJobsLocal = array_map(
87 87
         fn($job) => parse($job),
88 88
         get('crontab:jobs', []),
Please login to merge, or discard this patch.
recipe/shopware.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -72,20 +72,20 @@  discard block
 block discarded – undo
72 72
 ]);
73 73
 
74 74
 // This sets the shopware version to the version of the shopware console command.
75
-set('shopware_version', function () {
75
+set('shopware_version', function() {
76 76
     $versionOutput = run('cd {{release_path}} && {{bin/console}} -V');
77 77
     preg_match('/(\d+\.\d+\.\d+\.\d+)/', $versionOutput, $matches);
78 78
     return $matches[0] ?? '6.6.0';
79 79
 });
80 80
 
81 81
 // This task remotely executes the `cache:clear` console command on the target server.
82
-task('sw:cache:clear', static function () {
82
+task('sw:cache:clear', static function() {
83 83
     run('cd {{release_path}} && {{bin/console}} cache:clear --no-warmup');
84 84
 });
85 85
 
86 86
 // This task remotely executes the cache warmup console commands on the target server, so that the first user, who
87 87
 // visits the website, doesn't have to wait for the cache to be built up.
88
-task('sw:cache:warmup', static function () {
88
+task('sw:cache:warmup', static function() {
89 89
     run('cd {{release_path}} && {{bin/console}} cache:warmup');
90 90
 
91 91
     // Shopware 6.6+ dropped support for the http:cache:warmup command, so only execute it if the version is less than 6.6
@@ -95,25 +95,25 @@  discard block
 block discarded – undo
95 95
 });
96 96
 
97 97
 // This task remotely executes the `database:migrate` console command on the target server.
98
-task('sw:database:migrate', static function () {
98
+task('sw:database:migrate', static function() {
99 99
     run('cd {{release_path}} && {{bin/console}} database:migrate --all');
100 100
 });
101 101
 
102
-task('sw:plugin:refresh', function () {
102
+task('sw:plugin:refresh', function() {
103 103
     run('cd {{release_path}} && {{bin/console}} plugin:refresh');
104 104
 });
105 105
 
106
-task('sw:scheduled-task:register', function () {
106
+task('sw:scheduled-task:register', function() {
107 107
     run('cd {{release_path}} && {{bin/console}} scheduled-task:register');
108 108
 });
109 109
 
110
-task('sw:theme:refresh', function () {
110
+task('sw:theme:refresh', function() {
111 111
     run('cd {{release_path}} && {{bin/console}} theme:refresh');
112 112
 });
113 113
 
114 114
 // This task is not used per default, but can be used, e.g. in combination with `SHOPWARE_SKIP_THEME_COMPILE=1`,
115 115
 // to build the theme remotely instead of locally.
116
-task('sw:theme:compile', function () {
116
+task('sw:theme:compile', function() {
117 117
     run('cd {{release_path}} && {{bin/console}} theme:compile');
118 118
 });
119 119
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     return $plugins;
126 126
 }
127 127
 
128
-task('sw:plugin:update:all', static function () {
128
+task('sw:plugin:update:all', static function() {
129 129
     $plugins = getPlugins();
130 130
     foreach ($plugins as $plugin) {
131 131
         if ($plugin->installedAt && $plugin->upgradeVersion) {
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     }
136 136
 });
137 137
 
138
-task('sw:writable:jwt', static function () {
138
+task('sw:writable:jwt', static function() {
139 139
     run('cd {{release_path}} && chmod -R 660 config/jwt/*');
140 140
 });
141 141
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
     'deploy:publish',
163 163
 ]);
164 164
 
165
-task('deploy:update_code')->setCallback(static function () {
165
+task('deploy:update_code')->setCallback(static function() {
166 166
     upload('.', '{{release_path}}', [
167 167
         'options' => [
168 168
             '--exclude=.git',
@@ -172,11 +172,11 @@  discard block
 block discarded – undo
172 172
     ]);
173 173
 });
174 174
 
175
-task('sw-build-without-db:get-remote-config', static function () {
175
+task('sw-build-without-db:get-remote-config', static function() {
176 176
     if (!test('[ -d {{current_path}} ]')) {
177 177
         return;
178 178
     }
179
-    within('{{current_path}}', function () {
179
+    within('{{current_path}}', function() {
180 180
         run('{{bin/php}} ./bin/console bundle:dump');
181 181
         download('{{current_path}}/var/plugins.json', './var/');
182 182
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
     });
186 186
 });
187 187
 
188
-task('sw-build-without-db:build', static function () {
188
+task('sw-build-without-db:build', static function() {
189 189
     runLocally('CI=1 SHOPWARE_SKIP_BUNDLE_DUMP=1 ./bin/build-js.sh');
190 190
 });
191 191
 
Please login to merge, or discard this patch.