@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | bool $requireActivation = true, |
| 43 | 43 | bool $isChildAccount = false |
| 44 | 44 | ): \stdClass { |
| 45 | - $getParameters = []; |
|
| 45 | + $getParameters = [ ]; |
|
| 46 | 46 | $postParameters = [ |
| 47 | 47 | 'login' => $login, |
| 48 | 48 | 'password' => $password, |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | 'child_account' => $isChildAccount |
| 56 | 56 | ]; |
| 57 | 57 | |
| 58 | - $postParameters = array_filter($postParameters, function ($value) { |
|
| 58 | + $postParameters = array_filter($postParameters, function($value) { |
|
| 59 | 59 | return $value !== null; |
| 60 | 60 | }); |
| 61 | 61 | $response = $this->processRequest($getParameters, $postParameters); |
@@ -30,8 +30,8 @@ |
||
| 30 | 30 | public function getSmsHandlerMock($sendRequestReturnValue) |
| 31 | 31 | { |
| 32 | 32 | $smsHandler = $this->getMockBuilder('\MSlwk\FreshMail\Handler\Message\SmsHandler') |
| 33 | - ->setConstructorArgs([new ErrorHandler(), '', '']) |
|
| 34 | - ->setMethods(['sendRequest']) |
|
| 33 | + ->setConstructorArgs([ new ErrorHandler(), '', '' ]) |
|
| 34 | + ->setMethods([ 'sendRequest' ]) |
|
| 35 | 35 | ->getMock(); |
| 36 | 36 | |
| 37 | 37 | $smsHandler->expects($this->once()) |
@@ -30,8 +30,8 @@ |
||
| 30 | 30 | public function getTransactionalEmailHandlerMock($sendRequestReturnValue) |
| 31 | 31 | { |
| 32 | 32 | $transactionalEmailHandler = $this->getMockBuilder('\MSlwk\FreshMail\Handler\Message\TransactionalEmailHandler') |
| 33 | - ->setConstructorArgs([new ErrorHandler(), '', '']) |
|
| 34 | - ->setMethods(['sendRequest']) |
|
| 33 | + ->setConstructorArgs([ new ErrorHandler(), '', '' ]) |
|
| 34 | + ->setMethods([ 'sendRequest' ]) |
|
| 35 | 35 | ->getMock(); |
| 36 | 36 | |
| 37 | 37 | $transactionalEmailHandler->expects($this->once()) |
@@ -30,8 +30,8 @@ |
||
| 30 | 30 | public function getListEditHandlerMock($sendRequestReturnValue) |
| 31 | 31 | { |
| 32 | 32 | $listEditHandler = $this->getMockBuilder('\MSlwk\FreshMail\Handler\Lists\ListEditHandler') |
| 33 | - ->setConstructorArgs([new ErrorHandler(), '', '']) |
|
| 34 | - ->setMethods(['sendRequest']) |
|
| 33 | + ->setConstructorArgs([ new ErrorHandler(), '', '' ]) |
|
| 34 | + ->setMethods([ 'sendRequest' ]) |
|
| 35 | 35 | ->getMock(); |
| 36 | 36 | |
| 37 | 37 | $listEditHandler->expects($this->once()) |
@@ -30,8 +30,8 @@ |
||
| 30 | 30 | public function getListDeleteHandlerMock($sendRequestReturnValue) |
| 31 | 31 | { |
| 32 | 32 | $listDeleteHandler = $this->getMockBuilder('\MSlwk\FreshMail\Handler\Lists\ListDeleteHandler') |
| 33 | - ->setConstructorArgs([new ErrorHandler(), '', '']) |
|
| 34 | - ->setMethods(['sendRequest']) |
|
| 33 | + ->setConstructorArgs([ new ErrorHandler(), '', '' ]) |
|
| 34 | + ->setMethods([ 'sendRequest' ]) |
|
| 35 | 35 | ->getMock(); |
| 36 | 36 | |
| 37 | 37 | $listDeleteHandler->expects($this->once()) |
@@ -29,8 +29,8 @@ |
||
| 29 | 29 | public function getListsGetHandlerMock($sendRequestReturnValue) |
| 30 | 30 | { |
| 31 | 31 | $listsGetHandler = $this->getMockBuilder('\MSlwk\FreshMail\Handler\Lists\ListsGetHandler') |
| 32 | - ->setConstructorArgs([new ErrorHandler(), '', '']) |
|
| 33 | - ->setMethods(['sendRequest']) |
|
| 32 | + ->setConstructorArgs([ new ErrorHandler(), '', '' ]) |
|
| 33 | + ->setMethods([ 'sendRequest' ]) |
|
| 34 | 34 | ->getMock(); |
| 35 | 35 | |
| 36 | 36 | $listsGetHandler->expects($this->once()) |
@@ -30,8 +30,8 @@ discard block |
||
| 30 | 30 | public function getListCreateHandlerMock($sendRequestReturnValue) |
| 31 | 31 | { |
| 32 | 32 | $listCreateHandler = $this->getMockBuilder('\MSlwk\FreshMail\Handler\Lists\ListCreateHandler') |
| 33 | - ->setConstructorArgs([new ErrorHandler(), '', '']) |
|
| 34 | - ->setMethods(['sendRequest']) |
|
| 33 | + ->setConstructorArgs([ new ErrorHandler(), '', '' ]) |
|
| 34 | + ->setMethods([ 'sendRequest' ]) |
|
| 35 | 35 | ->getMock(); |
| 36 | 36 | |
| 37 | 37 | $listCreateHandler->expects($this->once()) |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | public function testListCreatedSuccessfully() |
| 45 | 45 | { |
| 46 | - $expectedCustomFields = (object)['ssfas' => '4124rfd']; |
|
| 46 | + $expectedCustomFields = (object) [ 'ssfas' => '4124rfd' ]; |
|
| 47 | 47 | $expectedHash = 'gvrheg'; |
| 48 | 48 | $listCreateHandler = $this->getListCreateHandlerMock( |
| 49 | 49 | '{"status":"OK","hash":"' |
@@ -30,8 +30,8 @@ discard block |
||
| 30 | 30 | public function getSpamTestHandlerMock($sendRequestReturnValue) |
| 31 | 31 | { |
| 32 | 32 | $spamTestHandler = $this->getMockBuilder('\MSlwk\FreshMail\Handler\SpamTest\SpamTestHandler') |
| 33 | - ->setConstructorArgs([new ErrorHandler(), '', '']) |
|
| 34 | - ->setMethods(['sendRequest']) |
|
| 33 | + ->setConstructorArgs([ new ErrorHandler(), '', '' ]) |
|
| 34 | + ->setMethods([ 'sendRequest' ]) |
|
| 35 | 35 | ->getMock(); |
| 36 | 36 | |
| 37 | 37 | $spamTestHandler->expects($this->once()) |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | public function testSpamTestSuccessful() |
| 45 | 45 | { |
| 46 | - $expectedTestsFailed = ['test1']; |
|
| 46 | + $expectedTestsFailed = [ 'test1' ]; |
|
| 47 | 47 | $expectedScore = 3.2; |
| 48 | 48 | $spamTestHandler = $this->getSpamTestHandlerMock('{"status":"OK","tests":' |
| 49 | 49 | . json_encode($expectedTestsFailed) . ',"score":' . $expectedScore . '}'); |
@@ -30,8 +30,8 @@ discard block |
||
| 30 | 30 | public function getSubscriberGetHandlerMock($sendRequestReturnValue) |
| 31 | 31 | { |
| 32 | 32 | $subscriberGetHandler = $this->getMockBuilder('\MSlwk\FreshMail\Handler\Subscriber\SubscriberGetHandler') |
| 33 | - ->setConstructorArgs([new ErrorHandler(), '', '']) |
|
| 34 | - ->setMethods(['sendRequest']) |
|
| 33 | + ->setConstructorArgs([ new ErrorHandler(), '', '' ]) |
|
| 34 | + ->setMethods([ 'sendRequest' ]) |
|
| 35 | 35 | ->getMock(); |
| 36 | 36 | |
| 37 | 37 | $subscriberGetHandler->expects($this->once()) |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | { |
| 46 | 46 | $expectedEmail = '15fewdg13f'; |
| 47 | 47 | $expectedState = 2; |
| 48 | - $expectedCustomFields = (object)['ssfas' => '4124rfd']; |
|
| 48 | + $expectedCustomFields = (object) [ 'ssfas' => '4124rfd' ]; |
|
| 49 | 49 | $expectedHash = 'gvrheg'; |
| 50 | 50 | $subscriberGetHandler = $this->getSubscriberGetHandlerMock( |
| 51 | 51 | '{"status":"OK","data":{"email":"' |