Skip to content

Commit

Permalink
GKarman/hw-19-rabbitMQ правки после ревью
Browse files Browse the repository at this point in the history
  • Loading branch information
gkarman committed Mar 30, 2024
1 parent 4a9ec6e commit e91838a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 deletions.
32 changes: 15 additions & 17 deletions hw19/code/src/Infrastructure/RabbitMQConfigs.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,23 @@

namespace Gkarman\Rabbitmq\Infrastructure;

use PhpAmqpLib\Connection\AMQPStreamConnection;

class RabbitMQConfigs
{
private readonly ?string $host;
private readonly ?string $port;
private readonly ?string $user;
private readonly ?string $password;
private readonly ?string $queue;

public function __construct()
{
$configs = parse_ini_file('src/Configs/rabbitMQ.ini');
$this->host = $configs['host'] ?? null;
$this->port = $configs['port'] ?? null;
$this->user = $configs['user'] ?? null;
$this->password = $configs['password'] ?? null;
$this->queue = $configs['queue'] ?? null;
}
private readonly ?string $host;
private readonly ?string $port;
private readonly ?string $user;
private readonly ?string $password;
private readonly ?string $queue;

public function __construct()
{
$configs = parse_ini_file('src/Configs/rabbitMQ.ini');
$this->host = $configs['host'] ?? null;
$this->port = $configs['port'] ?? null;
$this->user = $configs['user'] ?? null;
$this->password = $configs['password'] ?? null;
$this->queue = $configs['queue'] ?? null;
}

public function getHost(): ?string
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ class GenerateReportUseCase
{
public function __construct(
private OrderReportRepositoryInterface $repository,
)
{}
) {}

Check failure on line 20 in hw19/code/src/Modules/OrderReport/Application/GenerateReportUseCase.php

View workflow job for this annotation

GitHub Actions / phpcs

Closing brace must be on a line by itself

public function run(GenerateOrderRequest $request): GenerateReportResponse
{
Expand Down

0 comments on commit e91838a

Please sign in to comment.