Skip to content

Commit

Permalink
StyleCI Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
johnny-bit committed Oct 28, 2019
1 parent f3ce608 commit a773ec3
Show file tree
Hide file tree
Showing 22 changed files with 32 additions and 36 deletions.
14 changes: 7 additions & 7 deletions examples/Connection/http_connect.php
Expand Up @@ -8,9 +8,9 @@

require '../../vendor/autoload.php';

use AfriCC\EPP\HTTPClient as EPPClient;
use \AfriCC\EPP\Extension\NASK\ObjectSpec as NASKObjectSpec;
use AfriCC\EPP\Extension\NASK\ObjectSpec as NASKObjectSpec;
use AfriCC\EPP\Frame\Command\Poll;
use AfriCC\EPP\HTTPClient as EPPClient;

$objectSpec = new NASKObjectSpec();
$config = [
Expand Down Expand Up @@ -38,22 +38,22 @@

$response = $epp_client->request($frame);

while($response->success() && $response->code() !== 1300 ){ // 1300 = result successful, no more mesages
while ($response->success() && $response->code() !== 1300) { // 1300 = result successful, no more mesages

echo "Epp Poll message ID: ";
echo 'Epp Poll message ID: ';
echo $response->queueId();
echo "\n";
echo "Epp Poll Message: ";
echo 'Epp Poll Message: ';
echo $response->queueMessage();

$ackFrame = new Poll($epp_client->getObjectSpec());
$ackFrame->ack($response->queueId());
$ackResponse = $epp_client->request($ackFrame);
if(!$ackResponse->success()){
if (!$ackResponse->success()) {
echo "Couldn't ACK poll message\n";
break; // no ack!
}
$response= $client->request($frame); //reuse already existing poll request frame
$response = $client->request($frame); //reuse already existing poll request frame
}
} catch (Exception $e) {
echo $e->getMessage() . PHP_EOL;
Expand Down
2 changes: 1 addition & 1 deletion examples/Extension/NASK/renew_future.php
Expand Up @@ -7,8 +7,8 @@
chdir(__DIR__);

require './_autoload.php';
use AfriCC\EPP\Extension\NASK\Renew\Future as RenewFuture;
use AfriCC\EPP\Extension\NASK\ObjectSpec as NASKObjectSpec;
use AfriCC\EPP\Extension\NASK\Renew\Future as RenewFuture;

$frame = new RenewFuture(new NASKObjectSpec());
$frame->setFuture('example.pl');
Expand Down
2 changes: 1 addition & 1 deletion examples/Extension/NASK/report_basic.php
Expand Up @@ -7,8 +7,8 @@
chdir(__DIR__);

require './_autoload.php';
use AfriCC\EPP\Extension\NASK\Report;
use AfriCC\EPP\Extension\NASK\ObjectSpec as NASKObjectSpec;
use AfriCC\EPP\Extension\NASK\Report;

$frame = new Report(new NASKObjectSpec());
$frame->setOffset(0);
Expand Down
2 changes: 1 addition & 1 deletion examples/Extension/NASK/report_cancel.php
Expand Up @@ -7,8 +7,8 @@
chdir(__DIR__);

require './_autoload.php';
use AfriCC\EPP\Extension\NASK\Report\Cancel as ReportCancel;
use AfriCC\EPP\Extension\NASK\ObjectSpec as NASKObjectSpec;
use AfriCC\EPP\Extension\NASK\Report\Cancel as ReportCancel;

$frame = new ReportCancel(new NASKObjectSpec());
$frame->setReportId('e264a95d-0ba0-40f1-a0e0-97407fd5cdbe');
Expand Down
2 changes: 1 addition & 1 deletion examples/Extension/NASK/report_contact.php
Expand Up @@ -7,8 +7,8 @@
chdir(__DIR__);

require './_autoload.php';
use AfriCC\EPP\Extension\NASK\Report\Contact as ReportContact;
use AfriCC\EPP\Extension\NASK\ObjectSpec as NASKObjectSpec;
use AfriCC\EPP\Extension\NASK\Report\Contact as ReportContact;

$frame = new ReportContact(new NASKObjectSpec());
$frame->setContactId('k13');
Expand Down
2 changes: 1 addition & 1 deletion examples/Extension/NASK/report_domain.php
Expand Up @@ -7,8 +7,8 @@
chdir(__DIR__);

require './_autoload.php';
use AfriCC\EPP\Extension\NASK\Report\Domain as ReportDomain;
use AfriCC\EPP\Extension\NASK\ObjectSpec as NASKObjectSpec;
use AfriCC\EPP\Extension\NASK\Report\Domain as ReportDomain;

$frame = new ReportDomain(new NASKObjectSpec());
$frame->setState('STATE_REGISTERED');
Expand Down
2 changes: 1 addition & 1 deletion examples/Extension/NASK/report_future.php
Expand Up @@ -7,8 +7,8 @@
chdir(__DIR__);

require './_autoload.php';
use AfriCC\EPP\Extension\NASK\Report\Future as ReportFuture;
use AfriCC\EPP\Extension\NASK\ObjectSpec as NASKObjectSpec;
use AfriCC\EPP\Extension\NASK\Report\Future as ReportFuture;

$frame = new ReportFuture(new NASKObjectSpec());
$frame->setExDate('2007-04-23T15:22:34.0Z');
Expand Down
2 changes: 1 addition & 1 deletion examples/Extension/NASK/report_getdata.php
Expand Up @@ -7,8 +7,8 @@
chdir(__DIR__);

require './_autoload.php';
use AfriCC\EPP\Extension\NASK\Report\GetData as ReportGetData;
use AfriCC\EPP\Extension\NASK\ObjectSpec as NASKObjectSpec;
use AfriCC\EPP\Extension\NASK\Report\GetData as ReportGetData;

$frame = new ReportGetData(new NASKObjectSpec());
$frame->setReportId('58ab3bd1-fcce-4c03-b159-8af5f1adb447');
Expand Down
2 changes: 1 addition & 1 deletion examples/Extension/NASK/report_host.php
Expand Up @@ -7,8 +7,8 @@
chdir(__DIR__);

require './_autoload.php';
use AfriCC\EPP\Extension\NASK\Report\Host as ReportHost;
use AfriCC\EPP\Extension\NASK\ObjectSpec as NASKObjectSpec;
use AfriCC\EPP\Extension\NASK\Report\Host as ReportHost;

$frame = new ReportHost(new NASKObjectSpec());
$frame->setName('ns1.temp.pl');
Expand Down
2 changes: 1 addition & 1 deletion examples/Extension/NASK/report_prepaid_paymentfunds.php
Expand Up @@ -7,8 +7,8 @@
chdir(__DIR__);

require './_autoload.php';
use AfriCC\EPP\Extension\NASK\Report\Prepaid as ReportPaymentFunds;
use AfriCC\EPP\Extension\NASK\ObjectSpec as NASKObjectSpec;
use AfriCC\EPP\Extension\NASK\Report\Prepaid as ReportPaymentFunds;

$frame = new ReportPaymentFunds(new NASKObjectSpec());
$frame->setFundsAccountType('DOMAIN');
Expand Down
2 changes: 1 addition & 1 deletion examples/Extension/NASK/report_prepaid_payments.php
Expand Up @@ -7,8 +7,8 @@
chdir(__DIR__);

require './_autoload.php';
use AfriCC\EPP\Extension\NASK\Report\Prepaid as ReportPayments;
use AfriCC\EPP\Extension\NASK\ObjectSpec as NASKObjectSpec;
use AfriCC\EPP\Extension\NASK\Report\Prepaid as ReportPayments;

$frame = new ReportPayments(new NASKObjectSpec());
$frame->setPaymentsAccountType('DOMAIN');
Expand Down
2 changes: 1 addition & 1 deletion examples/Extension/NASK/transfer_future.php
Expand Up @@ -7,8 +7,8 @@
chdir(__DIR__);

require './_autoload.php';
use AfriCC\EPP\Extension\NASK\Transfer\Future as TransferFuture;
use AfriCC\EPP\Extension\NASK\ObjectSpec as NASKObjectSpec;
use AfriCC\EPP\Extension\NASK\Transfer\Future as TransferFuture;

$frame = new TransferFuture(new NASKObjectSpec());
$frame->setOperation('request');
Expand Down
2 changes: 1 addition & 1 deletion examples/Extension/NASK/transfer_future_resend.php
Expand Up @@ -7,8 +7,8 @@
chdir(__DIR__);

require './_autoload.php';
use AfriCC\EPP\Extension\NASK\Transfer\Future as TransferFuture;
use AfriCC\EPP\Extension\NASK\ObjectSpec as NASKObjectSpec;
use AfriCC\EPP\Extension\NASK\Transfer\Future as TransferFuture;

$frame = new TransferFuture(new NASKObjectSpec());
$frame->setOperation('request');
Expand Down
2 changes: 1 addition & 1 deletion examples/Extension/NASK/update_future.php
Expand Up @@ -7,8 +7,8 @@
chdir(__DIR__);

require './_autoload.php';
use AfriCC\EPP\Extension\NASK\Update\Future as UpdateFuture;
use AfriCC\EPP\Extension\NASK\ObjectSpec as NASKObjectSpec;
use AfriCC\EPP\Extension\NASK\Update\Future as UpdateFuture;

$frame = new UpdateFuture(new NASKObjectSpec());
$frame->setFuture('example7.pl');
Expand Down
7 changes: 4 additions & 3 deletions src/AfriCC/EPP/AbstractClient.php
Expand Up @@ -51,16 +51,17 @@ abstract protected function log($message);
* Send frame to EPP server
*
* @param FrameInterface $frame Frame to send
* @return void Doesn't return!
*
* @throws Exception on send error
*/
abstract protected function sendFrame(FrameInterface $frame);

/**
* Get response frame from EPP server (use after sendFrame)
*
* @return string raw XML of EPP Frame
* @throws Exception on frame receive error
*
* @return string raw XML of EPP Frame
*/
abstract protected function getFrame();

Expand All @@ -87,7 +88,7 @@ public function __construct(array $config, ObjectSpec $objectSpec = null)
$this->debug = false;
}

if(is_null($objectSpec)){
if (is_null($objectSpec)) {
$objectSpec = new ObjectSpec();
}

Expand Down
12 changes: 6 additions & 6 deletions src/AfriCC/EPP/AbstractFrame.php
Expand Up @@ -56,21 +56,21 @@ public function __construct()
$objectSpec = null;

$num = func_num_args();
if($num>2){
throw new Exception("Too many arguments");
if ($num > 2) {
throw new Exception('Too many arguments');
}

$args = func_get_args();
foreach($args as $arg){
if($arg instanceof \DOMDocument){
foreach ($args as $arg) {
if ($arg instanceof \DOMDocument) {
$import = $arg;
}
if($arg instanceof ObjectSpec){
if ($arg instanceof ObjectSpec) {
$objectSpec = $arg;
}
}

if(\is_null($objectSpec)){
if (\is_null($objectSpec)) {
$objectSpec = new ObjectSpec();
}

Expand Down
1 change: 0 additions & 1 deletion src/AfriCC/EPP/Client.php
Expand Up @@ -12,7 +12,6 @@
namespace AfriCC\EPP;

use AfriCC\EPP\Frame\Command\Logout as LogoutCommand;
use AfriCC\EPP\Frame\ResponseFactory;
use Exception;

/**
Expand Down
1 change: 0 additions & 1 deletion src/AfriCC/EPP/ClientInterface.php
Expand Up @@ -10,7 +10,6 @@
*
* @see http://tools.ietf.org/html/rfc5734
* @see AbstractClient
*
*/
interface ClientInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/AfriCC/EPP/Frame/ResponseFactory.php
Expand Up @@ -11,8 +11,8 @@

namespace AfriCC\EPP\Frame;

use AfriCC\EPP\ObjectSpec;
use AfriCC\EPP\Frame\Response\MessageQueue;
use AfriCC\EPP\ObjectSpec;
use DOMDocument;
use DOMXPath;

Expand All @@ -35,7 +35,7 @@ public static function build($buffer, ObjectSpec $objectSpec = null)

$xpath = new DOMXPath($xml);

if(is_null($objectSpec)){
if (is_null($objectSpec)) {
$objectSpec = new ObjectSpec();
}

Expand Down
1 change: 0 additions & 1 deletion src/AfriCC/EPP/HTTPClient.php
Expand Up @@ -3,7 +3,6 @@
namespace AfriCC\EPP;

use AfriCC\EPP\Frame\Command\Logout as LogoutCommand;
use AfriCC\EPP\Frame\ResponseFactory;

/**
* A high level HTTP(S) based client for the Extensible Provisioning Protocol (EPP)
Expand Down
1 change: 0 additions & 1 deletion tests/EPP/Extension/NASK/Check/FutureCheckTest.php
Expand Up @@ -12,7 +12,6 @@
*/
class FutureCheckTest extends TestCase
{

/**
* Tests Future->addFuture()
*/
Expand Down
1 change: 0 additions & 1 deletion tests/EPP/Extension/NASK/Update/ContactUpdateTest.php
Expand Up @@ -8,7 +8,6 @@

class ContactUpdateTest extends TestCase
{

public function testContactUpdateIndividual()
{
$frame = new Contact(new NASKObjectSpec());
Expand Down

0 comments on commit a773ec3

Please sign in to comment.