Skip to content

Commit

Permalink
Do not require visibility in PHPSpec functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Zales0123 committed Jul 16, 2021
1 parent 04427af commit d01b60f
Show file tree
Hide file tree
Showing 26 changed files with 86 additions and 86 deletions.
2 changes: 1 addition & 1 deletion spec/Command/SendInvoiceEmailSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

final class SendInvoiceEmailSpec extends ObjectBehavior
{
public function it_represents_an_intention_to_send_email_containing_invoice(): void
function it_represents_an_intention_to_send_email_containing_invoice(): void
{
$this->beConstructedWith('0000001');

Expand Down
6 changes: 3 additions & 3 deletions spec/CommandHandler/SendInvoiceEmailHandlerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@

final class SendInvoiceEmailHandlerSpec extends ObjectBehavior
{
public function let(
function let(
InvoiceRepositoryInterface $invoiceRepository,
OrderRepositoryInterface $orderRepository,
InvoiceEmailSenderInterface $emailSender
): void {
$this->beConstructedWith($invoiceRepository, $orderRepository, $emailSender);
}

public function it_requests_an_email_with_an_invoice_to_be_sent(
function it_requests_an_email_with_an_invoice_to_be_sent(
InvoiceRepositoryInterface $invoiceRepository,
OrderRepositoryInterface $orderRepository,
InvoiceEmailSenderInterface $emailSender,
Expand All @@ -53,7 +53,7 @@ public function it_requests_an_email_with_an_invoice_to_be_sent(
$this->__invoke(new SendInvoiceEmail('0000001', new \DateTime('now')));
}

public function it_does_not_request_an_email_to_be_sent_if_invoice_was_not_found(
function it_does_not_request_an_email_to_be_sent_if_invoice_was_not_found(
InvoiceRepositoryInterface $invoiceRepository,
OrderRepositoryInterface $orderRepository,
InvoiceEmailSenderInterface $emailSender,
Expand Down
4 changes: 2 additions & 2 deletions spec/Converter/BillingDataConverterSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@

final class BillingDataConverterSpec extends ObjectBehavior
{
public function it_implements_billing_data_converter_interface(): void
function it_implements_billing_data_converter_interface(): void
{
$this->shouldImplement(BillingDataConverterInterface::class);
}

public function it_converts_address_to_billing_data(AddressInterface $address): void
function it_converts_address_to_billing_data(AddressInterface $address): void
{
$address->getCountryCode()->willReturn('US');
$address->getCity()->willReturn('Las Vegas');
Expand Down
4 changes: 2 additions & 2 deletions spec/Converter/InvoiceShopBillingDataConverterSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@

final class InvoiceShopBillingDataConverterSpec extends ObjectBehavior
{
public function it_implements_invoice_shop_billing_data_converter_interface(): void
function it_implements_invoice_shop_billing_data_converter_interface(): void
{
$this->shouldImplement(InvoiceShopBillingDataConverterInterface::class);
}

public function it_extracts_shop_billing_data_from_channel(
function it_extracts_shop_billing_data_from_channel(
ChannelInterface $channel,
ShopBillingDataInterface $shopBillingData
): void {
Expand Down
4 changes: 2 additions & 2 deletions spec/Converter/LineItemsConverterSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@

final class LineItemsConverterSpec extends ObjectBehavior
{
public function it_implements_line_items_converter_interface(): void
function it_implements_line_items_converter_interface(): void
{
$this->shouldImplement(LineItemsConverterInterface::class);
}

public function it_extracts_line_items_from_order(
function it_extracts_line_items_from_order(
OrderInterface $order,
OrderItemInterface $orderItem,
AdjustmentInterface $shippingAdjustment,
Expand Down
4 changes: 2 additions & 2 deletions spec/Converter/TaxItemsConverterSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@

final class TaxItemsConverterSpec extends ObjectBehavior
{
public function it_implements_tax_items_converter_interface(): void
function it_implements_tax_items_converter_interface(): void
{
$this->shouldImplement(TaxItemsConverterInterface::class);
}

public function it_extracts_tax_items_from_order(
function it_extracts_tax_items_from_order(
OrderInterface $order,
AdjustmentInterface $taxAdjustment
): void {
Expand Down
10 changes: 5 additions & 5 deletions spec/Creator/InvoiceCreatorSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

final class InvoiceCreatorSpec extends ObjectBehavior
{
public function let(
function let(
InvoiceRepositoryInterface $invoiceRepository,
OrderRepositoryInterface $orderRepository,
InvoiceGeneratorInterface $invoiceGenerator,
Expand All @@ -45,12 +45,12 @@ public function let(
);
}

public function it_implements_invoice_for_order_creator_interface(): void
function it_implements_invoice_for_order_creator_interface(): void
{
$this->shouldImplement(InvoiceCreatorInterface::class);
}

public function it_creates_invoice_for_order(
function it_creates_invoice_for_order(
InvoiceRepositoryInterface $invoiceRepository,
OrderRepositoryInterface $orderRepository,
InvoiceGeneratorInterface $invoiceGenerator,
Expand All @@ -76,7 +76,7 @@ public function it_creates_invoice_for_order(
$this->__invoke('0000001', $invoiceDateTime);
}

public function it_removes_saved_invoice_file_if_database_update_fails(
function it_removes_saved_invoice_file_if_database_update_fails(
InvoiceRepositoryInterface $invoiceRepository,
OrderRepositoryInterface $orderRepository,
InvoiceGeneratorInterface $invoiceGenerator,
Expand All @@ -103,7 +103,7 @@ public function it_removes_saved_invoice_file_if_database_update_fails(
$this->__invoke('0000001', $invoiceDateTime);
}

public function it_throws_an_exception_when_invoice_was_already_created_for_given_order(
function it_throws_an_exception_when_invoice_was_already_created_for_given_order(
InvoiceRepositoryInterface $invoiceRepository,
OrderRepositoryInterface $orderRepository,
InvoiceGeneratorInterface $invoiceGenerator,
Expand Down
4 changes: 2 additions & 2 deletions spec/Creator/MassInvoicesCreatorSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@

final class MassInvoicesCreatorSpec extends ObjectBehavior
{
public function let(
function let(
InvoiceCreatorInterface $invoiceCreator,
DateTimeProvider $dateTimeProvider
): void {
$this->beConstructedWith($invoiceCreator, $dateTimeProvider);
}

public function it_requests_invoices_creation_for_multiple_orders(
function it_requests_invoices_creation_for_multiple_orders(
InvoiceCreatorInterface $invoiceCreator,
DateTimeProvider $dateTimeProvider,
OrderInterface $firstOrder,
Expand Down
8 changes: 4 additions & 4 deletions spec/Entity/BillingDataSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

final class BillingDataSpec extends ObjectBehavior
{
public function let(): void
function let(): void
{
$this->beConstructedWith(
'John',
Expand All @@ -34,17 +34,17 @@ public function let(): void
);
}

public function it_implements_billing_data_interface(): void
function it_implements_billing_data_interface(): void
{
$this->shouldImplement(BillingDataInterface::class);
}

public function it_implements_resource_interface(): void
function it_implements_resource_interface(): void
{
$this->shouldImplement(ResourceInterface::class);
}

public function it_has_proper_billing_data(): void
function it_has_proper_billing_data(): void
{
$this->firstName()->shouldReturn('John');
$this->lastName()->shouldReturn('Doe');
Expand Down
8 changes: 4 additions & 4 deletions spec/Entity/InvoiceSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

final class InvoiceSpec extends ObjectBehavior
{
public function let(
function let(
BillingDataInterface $billingData,
LineItemInterface $lineItem,
TaxItemInterface $taxItem,
Expand All @@ -52,17 +52,17 @@ public function let(
);
}

public function it_implements_invoice_interface(): void
function it_implements_invoice_interface(): void
{
$this->shouldImplement(InvoiceInterface::class);
}

public function it_implements_resource_interface(): void
function it_implements_resource_interface(): void
{
$this->shouldImplement(ResourceInterface::class);
}

public function it_has_data(
function it_has_data(
BillingDataInterface $billingData,
LineItemInterface $lineItem,
TaxItemInterface $taxItem,
Expand Down
10 changes: 5 additions & 5 deletions spec/Entity/LineItemSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

final class LineItemSpec extends ObjectBehavior
{
public function let(): void
function let(): void
{
$this->beConstructedWith(
'Mjolnir',
Expand All @@ -34,17 +34,17 @@ public function let(): void
);
}

public function it_implements_line_item_interface(): void
function it_implements_line_item_interface(): void
{
$this->shouldImplement(LineItemInterface::class);
}

public function it_implements_resource_interface(): void
function it_implements_resource_interface(): void
{
$this->shouldImplement(ResourceInterface::class);
}

public function it_has_proper_line_item_data(): void
function it_has_proper_line_item_data(): void
{
$this->name()->shouldReturn('Mjolnir');
$this->quantity()->shouldReturn(2);
Expand All @@ -56,7 +56,7 @@ public function it_has_proper_line_item_data(): void
$this->variantCode()->shouldReturn('7903c83a-4c5e-4bcf-81d8-9dc304c6a353');
}

public function it_has_an_invoice(InvoiceInterface $invoice): void
function it_has_an_invoice(InvoiceInterface $invoice): void
{
$this->setInvoice($invoice);
$this->invoice()->shouldReturn($invoice);
Expand Down
10 changes: 5 additions & 5 deletions spec/Entity/TaxItemSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,28 @@

final class TaxItemSpec extends ObjectBehavior
{
public function let(): void
function let(): void
{
$this->beConstructedWith('VAT (23%)', 2300);
}

public function it_implements_tax_item_interface(): void
function it_implements_tax_item_interface(): void
{
$this->shouldImplement(TaxItemInterface::class);
}

public function it_implements_resource_interface(): void
function it_implements_resource_interface(): void
{
$this->shouldImplement(ResourceInterface::class);
}

public function it_has_proper_tax_item_data(): void
function it_has_proper_tax_item_data(): void
{
$this->label()->shouldReturn('VAT (23%)');
$this->amount()->shouldReturn(2300);
}

public function it_has_an_invoice(InvoiceInterface $invoice): void
function it_has_an_invoice(InvoiceInterface $invoice): void
{
$this->setInvoice($invoice);
$this->invoice()->shouldReturn($invoice);
Expand Down
2 changes: 1 addition & 1 deletion spec/Event/OrderPaymentPaidSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

final class OrderPaymentPaidSpec extends ObjectBehavior
{
public function it_represents_an_immutable_fact_that_payment_related_to_order_was_completed(): void
function it_represents_an_immutable_fact_that_payment_related_to_order_was_completed(): void
{
$date = new \DateTimeImmutable('now');

Expand Down
2 changes: 1 addition & 1 deletion spec/Event/OrderPlacedSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

final class OrderPlacedSpec extends ObjectBehavior
{
public function it_represents_an_immutable_fact_that_an_order_has_been_placed(): void
function it_represents_an_immutable_fact_that_an_order_has_been_placed(): void
{
$date = new \DateTimeImmutable();

Expand Down
4 changes: 2 additions & 2 deletions spec/EventListener/CreateInvoiceOnOrderPlacedListenerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

final class CreateInvoiceOnOrderPlacedListenerSpec extends ObjectBehavior
{
public function let(InvoiceCreatorInterface $invoiceCreator): void
function let(InvoiceCreatorInterface $invoiceCreator): void
{
$this->beConstructedWith($invoiceCreator);
}

public function it_requests_invoice_creation(InvoiceCreatorInterface $invoiceCreator): void
function it_requests_invoice_creation(InvoiceCreatorInterface $invoiceCreator): void
{
$issuedAt = new \DateTimeImmutable();

Expand Down
4 changes: 2 additions & 2 deletions spec/EventListener/OrderPaymentPaidListenerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@

final class OrderPaymentPaidListenerSpec extends ObjectBehavior
{
public function let(MessageBusInterface $commandBus): void
function let(MessageBusInterface $commandBus): void
{
$this->beConstructedWith($commandBus);
}

public function it_dispatches_send_invoice_email_command(MessageBusInterface $commandBus): void
function it_dispatches_send_invoice_email_command(MessageBusInterface $commandBus): void
{
$command = new SendInvoiceEmail('00000001');
$commandBus->dispatch($command)->shouldBeCalled()->willReturn(new Envelope($command));
Expand Down
8 changes: 4 additions & 4 deletions spec/EventProducer/OrderPaymentPaidProducerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@

final class OrderPaymentPaidProducerSpec extends ObjectBehavior
{
public function let(
function let(
MessageBusInterface $eventBus,
DateTimeProvider $dateTimeProvider,
InvoiceRepositoryInterface $invoiceRepository
): void {
$this->beConstructedWith($eventBus, $dateTimeProvider, $invoiceRepository);
}

public function it_dispatches_order_payment_paid_event_for_payment(
function it_dispatches_order_payment_paid_event_for_payment(
MessageBusInterface $eventBus,
DateTimeProvider $dateTimeProvider,
PaymentInterface $payment,
Expand All @@ -57,7 +57,7 @@ public function it_dispatches_order_payment_paid_event_for_payment(
$this->__invoke($payment);
}

public function it_does_not_dispatch_event_when_payment_is_not_related_to_order(
function it_does_not_dispatch_event_when_payment_is_not_related_to_order(
MessageBusInterface $eventBus,
DateTimeProvider $dateTimeProvider,
PaymentInterface $payment
Expand All @@ -71,7 +71,7 @@ public function it_does_not_dispatch_event_when_payment_is_not_related_to_order(
$this->__invoke($payment);
}

public function it_does_not_dispatch_event_when_there_is_no_invoice_related_to_order(
function it_does_not_dispatch_event_when_there_is_no_invoice_related_to_order(
MessageBusInterface $eventBus,
DateTimeProvider $dateTimeProvider,
PaymentInterface $payment,
Expand Down
Loading

0 comments on commit d01b60f

Please sign in to comment.