Skip to content

Commit 234c77e

Browse files
Merge pull request #42 from AfriCC/analysis-8m935Y
Apply fixes from StyleCI
2 parents ac95f9a + cc7ca40 commit 234c77e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+159
-130
lines changed

examples/check_contact.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use AfriCC\EPP\Frame\Command\Check\Contact as CheckContact;
1212

13-
$frame = new CheckContact;
13+
$frame = new CheckContact();
1414
$frame->addId('sh8013');
1515
$frame->addId('sah8013');
1616
$frame->addId('8013sah');

examples/check_domain.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use AfriCC\EPP\Frame\Command\Check\Domain as CheckDomain;
1212

13-
$frame = new CheckDomain;
13+
$frame = new CheckDomain();
1414
$frame->addDomain('example.com');
1515
$frame->addDomain('example.org');
1616
$frame->addDomain('example.net');

examples/check_host.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use AfriCC\EPP\Frame\Command\Check\Host as CheckHost;
1212

13-
$frame = new CheckHost;
13+
$frame = new CheckHost();
1414
$frame->addHost('ns1.example.com');
1515
$frame->addHost('ns2.example.com');
1616
$frame->addHost('ns3.example.com');

examples/connect.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@
1616
'password' => 'grodotzki',
1717
'services' => [
1818
'urn:ietf:params:xml:ns:domain-1.0',
19-
'urn:ietf:params:xml:ns:contact-1.0'
19+
'urn:ietf:params:xml:ns:contact-1.0',
2020
],
2121
'debug' => true,
2222
]);
2323

2424
try {
2525
$greeting = $epp_client->connect();
26-
} catch(Exception $e) {
26+
} catch (Exception $e) {
2727
echo $e->getMessage() . PHP_EOL;
2828
unset($epp_client);
2929
exit(1);
3030
}
3131

32-
$epp_client->close();
32+
$epp_client->close();

examples/create_contact.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use AfriCC\EPP\Frame\Command\Create\Contact as CreateContact;
1212

13-
$frame = new CreateContact;
13+
$frame = new CreateContact();
1414
$frame->setId('CONTACT1');
1515
$frame->setName('Günter Grodotzki');
1616
$frame->setName('Jun Grodotzki');

examples/create_contact_disclose.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use AfriCC\EPP\Frame\Command\Create\Contact as CreateContact;
1212

13-
$frame = new CreateContact;
13+
$frame = new CreateContact();
1414
$frame->skipInt();
1515
$frame->setId('CONTACT1');
1616
$frame->setName('Günter Grodotzki');

examples/create_contact_skipint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use AfriCC\EPP\Frame\Command\Create\Contact as CreateContact;
1212

13-
$frame = new CreateContact;
13+
$frame = new CreateContact();
1414
$frame->skipInt();
1515
$frame->setId('CONTACT1');
1616
$frame->setName('Günter Grodotzki');

examples/create_domain.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010

1111
use AfriCC\EPP\Frame\Command\Create\Domain as CreateDomain;
1212

13-
$frame = new CreateDomain;
13+
$frame = new CreateDomain();
1414
$frame->setDomain('google.co.uk');
1515
$frame->setPeriod('1y');
1616
//$frame->addHostObj('ns1.googledns.com');
1717
//$frame->addHostObj('ns2.googledns.com');
1818
$frame->addHostAttr('ns1.google.co.uk', [
19-
'8.8.8.8',
19+
'8.8.8.8',
2020
'2a00:1450:4009:809::100e',
2121
]);
2222
$frame->addHostAttr('ns2.google.com');

examples/create_host.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use AfriCC\EPP\Frame\Command\Create\Host as CreateHost;
1212

13-
$frame = new CreateHost;
13+
$frame = new CreateHost();
1414
$frame->setHost('ns1.example.com');
1515
$frame->setHost('ns2.example.com');
1616
$frame->addAddr('8.8.8.8');

examples/delete_contact.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010

1111
use AfriCC\EPP\Frame\Command\Delete\Contact as DeleteContact;
1212

13-
$frame = new DeleteContact;
13+
$frame = new DeleteContact();
1414
$frame->setId('C001');
1515
echo $frame;

examples/delete_domain.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010

1111
use AfriCC\EPP\Frame\Command\Delete\Domain as DeleteDomain;
1212

13-
$frame = new DeleteDomain;
13+
$frame = new DeleteDomain();
1414
$frame->setDomain('google.com');
1515
echo $frame;

examples/delete_host.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010

1111
use AfriCC\EPP\Frame\Command\Delete\Host as DeleteHost;
1212

13-
$frame = new DeleteHost;
13+
$frame = new DeleteHost();
1414
$frame->setHost('ns1.google.com');
1515
echo $frame;

examples/extension.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@
1111
use AfriCC\EPP\Extension\COZA\Info\CozaContact as CozaContactInfoExtension;
1212
use AfriCC\EPP\Extension\COZA\Update\CozaContact as CozaContactUpdateExtension;
1313

14-
$frame = new CozaContactInfoExtension;
14+
$frame = new CozaContactInfoExtension();
1515
$frame->setId('MyContact');
1616
$frame->setAuthInfo('password');
1717
$frame->requestBalance();
1818
echo $frame;
1919

2020
echo PHP_EOL;
2121

22-
$frame = new CozaContactInfoExtension;
22+
$frame = new CozaContactInfoExtension();
2323
$frame->setId('MyContact');
2424
$frame->setAuthInfo('password');
2525
$frame->requestDomainListing();
2626
echo $frame;
2727

2828
echo PHP_EOL;
2929

30-
$frame = new CozaContactUpdateExtension;
30+
$frame = new CozaContactUpdateExtension();
3131
$frame->setId('MyContact');
3232
$frame->cancelPendingAction();
3333
echo $frame;

examples/info_contact.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use AfriCC\EPP\Frame\Command\Info\Contact as InfoContact;
1212

13-
$frame = new InfoContact;
13+
$frame = new InfoContact();
1414
$frame->setId('C001');
1515
$frame->setAuthInfo('password');
1616
echo $frame;

examples/info_domain.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010

1111
use AfriCC\EPP\Frame\Command\Info\Domain as InfoDomain;
1212

13-
$frame = new InfoDomain;
13+
$frame = new InfoDomain();
1414
$frame->setDomain('example.com', 'all');
1515
echo $frame;

examples/info_host.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010

1111
use AfriCC\EPP\Frame\Command\Info\Host as InfoHost;
1212

13-
$frame = new InfoHost;
13+
$frame = new InfoHost();
1414
$frame->setHost('ns1.google.com');
1515
echo $frame;

examples/login.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use AfriCC\EPP\Frame\Command\Login;
1212

13-
$frame = new Login;
13+
$frame = new Login();
1414
$frame->setClientId('gunter');
1515
$frame->setPassword('grodotzki');
1616
$frame->setNewPassword('grodotzki2');

examples/login_extensions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use AfriCC\EPP\Frame\Command\Login;
1212

13-
$frame = new Login;
13+
$frame = new Login();
1414
$frame->setClientId('gunter');
1515
$frame->setPassword('grodotzki');
1616
$frame->setNewPassword('grodotzki2');

examples/logout.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010

1111
use AfriCC\EPP\Frame\Command\Logout;
1212

13-
$frame = new Logout;
13+
$frame = new Logout();
1414
echo $frame;

examples/poll.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111
use AfriCC\EPP\Frame\Command\Poll;
1212

13-
$frame = new Poll;
13+
$frame = new Poll();
1414
$frame->request();
1515
echo $frame;
1616

1717
echo PHP_EOL;
1818

19-
$frame = new Poll;
19+
$frame = new Poll();
2020
$frame->ack('FMS-EPP-12A18BE965E-6D25E');
2121
echo $frame;

examples/renew_domain.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use AfriCC\EPP\Frame\Command\Renew\Domain as RenewDomain;
1212

13-
$frame = new RenewDomain;
13+
$frame = new RenewDomain();
1414
$frame->setDomain('google.com');
1515
$frame->setCurrentExpirationDate(date('Y-m-d'));
1616
$frame->setPeriod('6m');

examples/transfer_contact.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use AfriCC\EPP\Frame\Command\Transfer\Contact as TransferContact;
1212

13-
$frame = new TransferContact;
13+
$frame = new TransferContact();
1414
$frame->setOperation('request');
1515
$frame->setId('C001');
1616
$frame->setAuthInfo('password');

examples/transfer_domain.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use AfriCC\EPP\Frame\Command\Transfer\Domain as TransferDomain;
1212

13-
$frame = new TransferDomain;
13+
$frame = new TransferDomain();
1414
$frame->setOperation('cancel');
1515
$frame->setDomain('google.com');
1616
$frame->setPeriod('6y');

examples/transfer_query.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use AfriCC\EPP\Frame\Command\Transfer\Domain as TransferDomain;
1212

13-
$frame = new TransferDomain;
13+
$frame = new TransferDomain();
1414
$frame->setOperation('query');
1515
$frame->setDomain('google.com');
1616
$frame->setAuthInfo('password');

examples/update_contact.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use AfriCC\EPP\Frame\Command\Update\Contact as UpdateContact;
1212

13-
$frame = new UpdateContact;
13+
$frame = new UpdateContact();
1414
$frame->setId('C0054');
1515
$frame->addCity('Voerde');
1616
$frame->addAddStreet('Long St. 14');

examples/update_contact_disclose.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use AfriCC\EPP\Frame\Command\Update\Contact as UpdateContact;
1212

13-
$frame = new UpdateContact;
13+
$frame = new UpdateContact();
1414
$frame->setId('C0054');
1515
$frame->addCity('Voerde');
1616
$frame->addAddStreet('Long St. 14');

examples/update_domain.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use AfriCC\EPP\Frame\Command\Update\Domain as UpdateDomain;
1212

13-
$frame = new UpdateDomain;
13+
$frame = new UpdateDomain();
1414
$frame->setDomain('google.com');
1515
$frame->addAdminContact('ADMIN-1');
1616
$frame->addTechContact('TECH-2');

examples/update_host.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use AfriCC\EPP\Frame\Command\Update\Host as UpdateHost;
1212

13-
$frame = new UpdateHost;
13+
$frame = new UpdateHost();
1414
$frame->setHost('ns1.google.com');
1515
$frame->addAddr('8.8.8.8');
1616
$frame->addAddr('2a00:1450:4009:803::1009');

src/AfriCC/EPP/AbstractFrame.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function get($query)
7777

7878
// @see http://stackoverflow.com/a/24730245/567193
7979
if ($nodes->length === 1 && (
80-
($last_bit{0} === '@' && $nodes->item(0)->nodeType === XML_ATTRIBUTE_NODE) ||
80+
($last_bit[0] === '@' && $nodes->item(0)->nodeType === XML_ATTRIBUTE_NODE) ||
8181
(stripos($last_bit, 'text()') === 0 && $nodes->item(0)->nodeType === XML_TEXT_NODE)
8282
)) {
8383
return $nodes->item(0)->nodeValue;
@@ -94,10 +94,9 @@ public function __toString()
9494
protected function createNodes($path)
9595
{
9696
$path_parts = explode('/', $path);
97-
$node_path = null;
97+
$node_path = null;
9898

9999
for ($i = 0, $limit = count($path_parts); $i < $limit; ++$i) {
100-
101100
$attr_name = $attr_value = null;
102101

103102
// if no namespace given, use root-namespace
@@ -130,8 +129,8 @@ protected function createNodes($path)
130129
}
131130
// check if attribute needs to be set
132131
elseif (preg_match('/^(.*)\[@([a-z0-9]+)=\'([a-z0-9]+)\'\]$/i', $node_name, $matches)) {
133-
$node_name = $matches[1];
134-
$attr_name = $matches[2];
132+
$node_name = $matches[1];
133+
$attr_name = $matches[2];
135134
$attr_value = $matches[3];
136135
}
137136

@@ -177,7 +176,7 @@ protected function realxpath($path)
177176
$path_parts = [];
178177
}
179178
// absolute path
180-
elseif (isset($path{1}) && $path{0} === '/' && $path{1} === '/') {
179+
elseif (isset($path[1]) && $path[0] === '/' && $path[1] === '/') {
181180
return substr($path, 2);
182181
} else {
183182
$path_parts = explode('/', $path);
@@ -196,6 +195,7 @@ protected function realxpath($path)
196195
}
197196

198197
array_unshift($path_parts, 'epp:epp');
198+
199199
return implode('/', $path_parts);
200200
}
201201

@@ -222,7 +222,7 @@ private function getStructure()
222222
} elseif (empty($this->command) && $parent_class === 'Command') {
223223
$this->command = strtolower($bare_class);
224224
} elseif ($parent_class === 'AbstractFrame') {
225-
$this->format = strtolower($bare_class);
225+
$this->format = strtolower($bare_class);
226226
}
227227
}
228228

@@ -245,6 +245,7 @@ private function className($class)
245245
if (($pos = strrpos($class, '\\')) === false) {
246246
return $class;
247247
}
248+
248249
return substr($class, $pos + 1);
249250
}
250251
}

0 commit comments

Comments
 (0)