Test Setup Failed
Push — master ( 46ef65...ecf71f )
by Sam
05:21
created
bin/PhpDnsInstaller.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
 
38 38
         // create default config
39 39
         file_put_contents('/etc/phpdns.json', json_encode(getcwd()));
40
-    } catch (\Symfony\Component\Filesystem\Exception\IOException $e){
41
-        die("An error occurred during installation\n".$e->getMessage());
40
+    } catch (\Symfony\Component\Filesystem\Exception\IOException $e) {
41
+        die("An error occurred during installation\n" . $e->getMessage());
42 42
     }
43 43
 
44 44
 } else {
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
54 54
     try {
55 55
         echo "Creating required directories and config files...\n";
56 56
 
57
-        $filesystem->mkdir(getcwd().'\\zones');
58
-        $filesystem->mkdir(getcwd().'\\logs');
57
+        $filesystem->mkdir(getcwd() . '\\zones');
58
+        $filesystem->mkdir(getcwd() . '\\logs');
59 59
 
60 60
         // create default config
61
-        file_put_contents(getcwd().'\\phpdns.json', json_encode(getcwd()));
62
-    } catch (\Symfony\Component\Filesystem\Exception\IOException $e){
63
-        die("An error occurred during installation\n".$e->getMessage());
61
+        file_put_contents(getcwd() . '\\phpdns.json', json_encode(getcwd()));
62
+    } catch (\Symfony\Component\Filesystem\Exception\IOException $e) {
63
+        die("An error occurred during installation\n" . $e->getMessage());
64 64
     }
65 65
 }
66 66
\ No newline at end of file
Please login to merge, or discard this patch.
src/Resolver/JsonFileSystemResolver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $this->filesystemManager = $filesystemManager;
51 51
         $this->defaultTtl = $defaultTtl;
52 52
 
53
-        $zones = glob($filesystemManager->zonePath().'/*.json');
53
+        $zones = glob($filesystemManager->zonePath() . '/*.json');
54 54
         foreach ($zones as $file) {
55 55
             $zone = json_decode(file_get_contents($file), true);
56 56
             $resourceRecords = $this->isLegacyFormat($zone) ? $this->processLegacyZone($zone) : $this->processZone($zone);
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      */
96 96
     protected function processZone(array $zone): array
97 97
     {
98
-        $parent = rtrim($zone['domain'], '.').'.';
98
+        $parent = rtrim($zone['domain'], '.') . '.';
99 99
         $defaultTtl = $zone['default-ttl'];
100 100
         $rrs = $zone['resource-records'];
101 101
         $resourceRecords = [];
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      */
125 125
     protected function isLegacyFormat(array $zone): bool
126 126
     {
127
-        $keys = array_map(function ($value) {
127
+        $keys = array_map(function($value) {
128 128
             return strtolower($value);
129 129
         }, array_keys($zone));
130 130
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     {
143 143
         $resourceRecords = [];
144 144
         foreach ($zones as $domain => $types) {
145
-            $domain = rtrim($domain, '.').'.';
145
+            $domain = rtrim($domain, '.') . '.';
146 146
             foreach ($types as $type => $data) {
147 147
                 $data = (array) $data;
148 148
                 $type = RecordTypeEnum::getTypeFromName($type);
Please login to merge, or discard this patch.
src/Console/Commands/VersionCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,6 +28,6 @@
 block discarded – undo
28 28
 
29 29
     protected function execute(InputInterface $input, OutputInterface $output)
30 30
     {
31
-        $output->writeln('PowerDnsServer version '.Server::VERSION);
31
+        $output->writeln('PowerDnsServer version ' . Server::VERSION);
32 32
     }
33 33
 }
Please login to merge, or discard this patch.
src/Filesystem/FilesystemManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
     public function zonePath()
82 82
     {
83
-        return $this->zonePath ?: $this->basePath.DIRECTORY_SEPARATOR.'zones';
83
+        return $this->zonePath ?: $this->basePath . DIRECTORY_SEPARATOR . 'zones';
84 84
     }
85 85
 
86 86
     /**
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      */
93 93
     public function getZone(string $zone)
94 94
     {
95
-        $zoneFile = $this->basePath().DIRECTORY_SEPARATOR.$zone.'.json';
95
+        $zoneFile = $this->basePath() . DIRECTORY_SEPARATOR . $zone . '.json';
96 96
 
97 97
         return new JsonFileSystemResolver($zoneFile);
98 98
     }
Please login to merge, or discard this patch.