Skip to content

Commit fa391e6

Browse files
authored
add logic to commit php-cs-changes (#683)
* add logic to commit php-cs-changes
1 parent 66d6c51 commit fa391e6

Some content is hidden

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

41 files changed

+133
-107
lines changed

.github/workflows/lint.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
on: [push, pull_request]
2-
name: Main
2+
name: php-cs-fixer
33
jobs:
44
php-cs-fixer:
55
name: PHP-CS-Fixer
66
runs-on: ubuntu-latest
77
steps:
88
- uses: actions/checkout@v2
9+
910
- name: PHP-CS-Fixer
1011
uses: docker://oskarstark/php-cs-fixer-ga
12+
13+
- uses: stefanzweifel/git-auto-commit-action@v4
14+
with:
15+
commit_message: Apply php-cs-fixer changes

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ composer.lock
22
composer.phar
33
vendor
44
.phpunit.result.cache
5+
.php-cs-fixer.cache

Command/AnonConsumerCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ protected function configure()
1212
$this->setDescription('Executes an anonymous consumer');
1313
$this->getDefinition()->getOption('messages')->setDefault('1');
1414
$this->getDefinition()->getOption('route')->setDefault('#');
15-
1615
}
1716

1817
protected function getConsumerService()

Command/BaseConsumerCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ public function stopConsumer()
2727
// Halt consumer if waiting for a new message from the queue
2828
try {
2929
$this->consumer->stopConsuming();
30-
} catch (AMQPTimeoutException $e) {}
30+
} catch (AMQPTimeoutException $e) {
31+
}
3132
}
3233
}
3334

Command/BaseRabbitMqCommand.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,4 @@ public function getContainer()
2828
{
2929
return $this->container;
3030
}
31-
32-
3331
}

Command/BatchConsumerCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ public function stopConsumer()
2525
// Halt consumer if waiting for a new message from the queue
2626
try {
2727
$this->consumer->stopConsuming();
28-
} catch (AMQPTimeoutException $e) {}
28+
} catch (AMQPTimeoutException $e) {
29+
}
2930
}
3031
}
3132

Command/DynamicConsumerCommand.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*
99
* @author Tibor Barna <tibor.barna@wiredminds.de>
1010
*/
11+
1112
namespace OldSound\RabbitMqBundle\Command;
1213

1314
use Symfony\Component\Console\Input\InputArgument;

Command/SetupFabricCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,5 @@ protected function execute(InputInterface $input, OutputInterface $output): int
3838
}
3939

4040
return 0;
41-
4241
}
4342
}

Command/StdInProducerCommand.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
class StdInProducerCommand extends BaseRabbitMqCommand
1111
{
12-
const FORMAT_PHP = 'php';
13-
const FORMAT_RAW = 'raw';
12+
public const FORMAT_PHP = 'php';
13+
public const FORMAT_RAW = 'raw';
1414

1515
protected function configure()
1616
{
@@ -55,8 +55,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
5555
$data = serialize($data);
5656
break;
5757
default:
58-
throw new \InvalidArgumentException(sprintf('Invalid payload format "%s", expecting one of: %s.',
59-
$format, implode(', ', array(self::FORMAT_PHP, self::FORMAT_RAW))));
58+
throw new \InvalidArgumentException(sprintf(
59+
'Invalid payload format "%s", expecting one of: %s.',
60+
$format,
61+
implode(', ', array(self::FORMAT_PHP, self::FORMAT_RAW))
62+
));
6063
}
6164

6265
$producer->publish($data, $route);

DependencyInjection/Compiler/InjectEventDispatcherPass.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515
class InjectEventDispatcherPass implements CompilerPassInterface
1616
{
17-
const EVENT_DISPATCHER_SERVICE_ID = 'event_dispatcher';
17+
public const EVENT_DISPATCHER_SERVICE_ID = 'event_dispatcher';
1818

1919
/**
2020
* @inheritDoc
@@ -35,6 +35,5 @@ public function process(ContainerBuilder $container)
3535
)
3636
);
3737
}
38-
3938
}
4039
}

0 commit comments

Comments
 (0)