Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
Code checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
webeweb committed Mar 28, 2023
1 parent 94009f7 commit 2bef759
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Resources/config/controllers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
public: true

wbw.smsmode.controller.default:
class: WBW\Bundle\SmsModeBundle\Controller\DefaultController
class: WBW\Bundle\SmsModeBundle\Controller\DefaultController
public: true
calls:
- [ "setContainer", [ "@service_container" ] ]
Expand Down
17 changes: 10 additions & 7 deletions Tests/AbstractTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

use DateTime;
use WBW\Bundle\CoreBundle\Tests\AbstractTestCase as BaseTestCase;
use WBW\Library\SmsMode\Api\SendingSmsBatchInterface as ApiSendingSmsBatchInterface;
use WBW\Library\SmsMode\Api\SendingSmsMessageInterface as ApiSendingSmsMessageInterface;
use WBW\Library\SmsMode\Api\SendingTextToSpeechSmsInterface as ApiSendingTextToSpeechSmsInterface;
use WBW\Library\SmsMode\Entity\AddingContactInterface;
use WBW\Library\SmsMode\Entity\CheckingSmsMessageStatusInterface;
use WBW\Library\SmsMode\Entity\CreatingSubAccountInterface;
Expand Down Expand Up @@ -144,7 +147,7 @@ abstract class AbstractTestCase extends BaseTestCase {
protected function setUp(): void {
parent::setUp();

// Set a Fichier mock.
// Set a fichier mock.
$this->fichier = realpath(__DIR__ . "/../vendor/webeweb/smsmode-library/tests/Fixtures/Request/SendingSmsBatchRequest.csv");

// Set an Adding contact mock.
Expand Down Expand Up @@ -200,7 +203,7 @@ protected function setUp(): void {

// Set a Sending SMS batch mock.
$this->sendingSmsBatch = $this->getMockBuilder(SendingSmsBatchInterface::class)->getMock();
$this->sendingSmsBatch->expects($this->any())->method("getSmsModeClasseMsg")->willReturn(SendingSmsBatchRequest::CLASSE_MSG_SMS);
$this->sendingSmsBatch->expects($this->any())->method("getSmsModeClasseMsg")->willReturn(ApiSendingSmsBatchInterface::CLASSE_MSG_SMS);
$this->sendingSmsBatch->expects($this->any())->method("getSmsModeDateEnvoi")->willReturn(new DateTime("2019-02-05 18:00:00"));
$this->sendingSmsBatch->expects($this->any())->method("getSmsModeEmetteur")->willReturn("emetteur");
$this->sendingSmsBatch->expects($this->any())->method("getSmsModeFichier")->willReturn($this->fichier);
Expand All @@ -210,7 +213,7 @@ protected function setUp(): void {

// Set a Sending SMS message mock.
$this->sendingSmsMessage = $this->getMockBuilder(SendingSmsMessageInterface::class)->getMock();
$this->sendingSmsMessage->expects($this->any())->method("getSmsModeClasseMsg")->willReturn(SendingSmsMessageRequest::CLASSE_MSG_SMS);
$this->sendingSmsMessage->expects($this->any())->method("getSmsModeClasseMsg")->willReturn(ApiSendingSmsBatchInterface::CLASSE_MSG_SMS);
$this->sendingSmsMessage->expects($this->any())->method("getSmsModeDateEnvoi")->willReturn(new DateTime("2019-02-05 18:00:00"));
$this->sendingSmsMessage->expects($this->any())->method("getSmsModeEmetteur")->willReturn("emetteur");
$this->sendingSmsMessage->expects($this->any())->method("getSmsModeGroupe")->willReturn("groupe");
Expand All @@ -220,19 +223,19 @@ protected function setUp(): void {
$this->sendingSmsMessage->expects($this->any())->method("getSmsModeNotificationUrlReponse")->willReturn("notificationUrlReponse");
$this->sendingSmsMessage->expects($this->any())->method("getSmsModeNumero")->willReturn(["33600000000"]);
$this->sendingSmsMessage->expects($this->any())->method("getSmsModeRefClient")->willReturn("refClient");
$this->sendingSmsMessage->expects($this->any())->method("getSmsModeStop")->willReturn(SendingSmsMessageRequest::STOP_ALWAYS);
$this->sendingSmsMessage->expects($this->any())->method("getSmsModeStop")->willReturn(ApiSendingSmsMessageInterface::STOP_ALWAYS);

// Set a Sending text-to-speech SMS mock.
$this->sendingTextToSpeechSms = $this->getMockBuilder(SendingTextToSpeechSmsInterface::class)->getMock();
$this->sendingTextToSpeechSms->expects($this->any())->method("getSmsModeDateEnvoi")->willReturn(new DateTime("2019-02-05 18:00:00"));
$this->sendingTextToSpeechSms->expects($this->any())->method("getSmsModeMessage")->willReturn("message");
$this->sendingTextToSpeechSms->expects($this->any())->method("getSmsModeNumero")->willReturn(["33600000000"]);
$this->sendingTextToSpeechSms->expects($this->any())->method("getSmsModeLanguage")->willReturn(SendingTextToSpeechSmsRequest::LANGUAGE_FR);
$this->sendingTextToSpeechSms->expects($this->any())->method("getSmsModeLanguage")->willReturn(ApiSendingTextToSpeechSmsInterface::LANGUAGE_FR);
$this->sendingTextToSpeechSms->expects($this->any())->method("getSmsModeTitle")->willReturn("title");

// Set a Sending unicode SMS mock.
$this->sendingUnicodeSms = $this->getMockBuilder(SendingUnicodeSmsInterface::class)->getMock();
$this->sendingUnicodeSms->expects($this->any())->method("getSmsModeClasseMsg")->willReturn(SendingUnicodeSmsRequest::CLASSE_MSG_SMS);
$this->sendingUnicodeSms->expects($this->any())->method("getSmsModeClasseMsg")->willReturn(ApiSendingSmsBatchInterface::CLASSE_MSG_SMS);
$this->sendingUnicodeSms->expects($this->any())->method("getSmsModeDateEnvoi")->willReturn(new DateTime("2019-02-05 18:00:00"));
$this->sendingUnicodeSms->expects($this->any())->method("getSmsModeEmetteur")->willReturn("emetteur");
$this->sendingUnicodeSms->expects($this->any())->method("getSmsModeGroupe")->willReturn("groupe");
Expand All @@ -242,7 +245,7 @@ protected function setUp(): void {
$this->sendingUnicodeSms->expects($this->any())->method("getSmsModeNotificationUrlReponse")->willReturn("notificationUrlReponse");
$this->sendingUnicodeSms->expects($this->any())->method("getSmsModeNumero")->willReturn(["33600000000"]);
$this->sendingUnicodeSms->expects($this->any())->method("getSmsModeRefClient")->willReturn("refClient");
$this->sendingUnicodeSms->expects($this->any())->method("getSmsModeStop")->willReturn(SendingSmsMessageRequest::STOP_ALWAYS);
$this->sendingUnicodeSms->expects($this->any())->method("getSmsModeStop")->willReturn(ApiSendingSmsMessageInterface::STOP_ALWAYS);

// Set a Sent SMS message list mock.
$this->sentSmsMessageList = $this->getMockBuilder(SentSmsMessageListInterface::class)->getMock();
Expand Down
2 changes: 1 addition & 1 deletion Tests/Fixtures/app/TestKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class TestKernel extends AbstractKernel {
*/
public function registerBundles(): array {

return [
return [
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
Expand Down
2 changes: 1 addition & 1 deletion Tests/Fixtures/app/config/services_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
services:

wbw.smsmode.event_listener:
class: WBW\Bundle\SmsModeBundle\Tests\Fixtures\EventListener\TestEventListener
class: WBW\Bundle\SmsModeBundle\Tests\Fixtures\EventListener\TestEventListener
public: true
tags:
- { name: "kernel.event_listener", event: "wbw.smsmode.event.delivery_report_callback", method: "onDeliveryReportCallback" }
Expand Down
4 changes: 2 additions & 2 deletions WBWSmsModeBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace WBW\Bundle\SmsModeBundle;

use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use WBW\Bundle\SmsModeBundle\DependencyInjection\WBWSmsModeExtension;

Expand All @@ -26,7 +26,7 @@ class WBWSmsModeBundle extends Bundle {
/**
* {@inheritdoc}
*/
public function getContainerExtension(): Extension {
public function getContainerExtension(): ExtensionInterface {
return new WBWSmsModeExtension();
}
}

0 comments on commit 2bef759

Please sign in to comment.