Completed
Push — master ( 0d7cad...d31d9d )
by Jörg
02:34
created
Classes/Domrobot.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
-     * Created by PhpStorm.
4
-     * User: joerg
5
-     * Date: 14.02.16
6
-     * Time: 20:31
7
-     * copied and modified from https://github.com/inwx/php-client
8
-     */
3
+ * Created by PhpStorm.
4
+ * User: joerg
5
+ * Date: 14.02.16
6
+ * Time: 20:31
7
+ * copied and modified from https://github.com/inwx/php-client
8
+ */
9 9
 namespace Bingemer\InwxBundle\Classes;
10 10
 
11 11
 /**
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function __construct($address, $locale = 'en', $cache_dir, $username, $password, $sharedSecret = null)
38 38
     {
39
-        $this->address = (substr($address, -1) != "/") ? $address . "/" : $address;
39
+        $this->address = (substr($address, -1) != "/") ? $address."/" : $address;
40 40
         $this->_cachedir = $cache_dir;
41 41
         $this->_cookiefile = tempnam($this->_cachedir, 'INWX');
42 42
         $this->setLanguage($locale);
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     public function createRecord($name, $ip, $domain = 'somedomainnameyouwishtoupgrade.de', $type = 'A', $ttl = 3600)
54 54
     {
55 55
         if (strpos($name, $domain) === false) {
56
-            $name = $name . "." . $domain;
56
+            $name = $name.".".$domain;
57 57
         }
58 58
         try {
59 59
             $result = $this->call('nameserver', 'createRecord', array(
@@ -146,12 +146,12 @@  discard block
 block discarded – undo
146 146
             $params['clTRID'] = $this->clTRID;
147 147
         }
148 148
 
149
-        $request = xmlrpc_encode_request(strtolower($object . "." . $method), $params, array("encoding" => "UTF-8", "escaping" => "markup", "verbosity" => "no_white_space"));
149
+        $request = xmlrpc_encode_request(strtolower($object.".".$method), $params, array("encoding" => "UTF-8", "escaping" => "markup", "verbosity" => "no_white_space"));
150 150
         $header = array();
151 151
         $header[] = "Content-Type: text/xml";
152 152
         $header[] = "Connection: keep-alive";
153 153
         $header[] = "Keep-Alive: 300";
154
-        $header[] = "X-FORWARDED-FOR: " . @$_SERVER['HTTP_X_FORWARDED_FOR'];
154
+        $header[] = "X-FORWARDED-FOR: ".@$_SERVER['HTTP_X_FORWARDED_FOR'];
155 155
         $ch = curl_init();
156 156
         curl_setopt($ch, CURLOPT_URL, $this->address);
157 157
         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
@@ -162,12 +162,12 @@  discard block
 block discarded – undo
162 162
         curl_setopt($ch, CURLOPT_COOKIEJAR, $this->_cookiefile);
163 163
         curl_setopt($ch, CURLOPT_POST, true);
164 164
         curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
165
-        curl_setopt($ch, CURLOPT_USERAGENT, "DomRobot/{$this->_ver} (PHP " . phpversion() . ")");
165
+        curl_setopt($ch, CURLOPT_USERAGENT, "DomRobot/{$this->_ver} (PHP ".phpversion().")");
166 166
         $response = curl_exec($ch);
167 167
         curl_close($ch);
168 168
         if ($this->debug) {
169
-            echo "Request:\n" . $request . "\n";
170
-            echo "Response:\n" . $response . "\n";
169
+            echo "Request:\n".$request."\n";
170
+            echo "Response:\n".$response."\n";
171 171
         }
172 172
         return xmlrpc_decode($response, 'UTF-8');
173 173
     }
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
         $secretKey = $this->_base32Decode($secret);
185 185
         // Pack time into binary string
186
-        $time = chr(0) . chr(0) . chr(0) . chr(0) . pack('N*', $_timeSlice);
186
+        $time = chr(0).chr(0).chr(0).chr(0).pack('N*', $_timeSlice);
187 187
         // Hash it with users secret key
188 188
         $hm = hash_hmac('SHA1', $time, $secretKey, true);
189 189
         // Use last nipple of result as index/offset
Please login to merge, or discard this patch.
DependencyInjection/BingemerInwxExtension.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
-     * Created by PhpStorm.
4
-     * User: joerg
5
-     * Date: 14.02.16
6
-     * Time: 19:38
7
-     */
3
+ * Created by PhpStorm.
4
+ * User: joerg
5
+ * Date: 14.02.16
6
+ * Time: 19:38
7
+ */
8 8
 namespace Bingemer\InwxBundle\DependencyInjection;
9 9
 
10 10
 use Symfony\Component\HttpKernel\DependencyInjection\Extension;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     {
19 19
         $loader = new YamlFileLoader(
20 20
             $container,
21
-            new FileLocator(__DIR__ . '/../Resources/config')
21
+            new FileLocator(__DIR__.'/../Resources/config')
22 22
         );
23 23
         $loader->load('services.yml');
24 24
     }
Please login to merge, or discard this patch.