Completed
Push — master ( 157f8e...ae8c4e )
by f
03:53
created
src/Spec.php 1 patch
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -105,10 +105,11 @@  discard block
 block discarded – undo
105 105
     }
106 106
 
107 107
     public function __get($prop) {
108
-        if (array_key_exists($prop, $this->_keys))
109
-            return $this->_keys[$prop];
110
-        else if (array_key_exists($prop, $this->_blocks))
111
-            return $this->_blocks[$prop];
108
+        if (array_key_exists($prop, $this->_keys)) {
109
+                    return $this->_keys[$prop];
110
+        } else if (array_key_exists($prop, $this->_blocks)) {
111
+                    return $this->_blocks[$prop];
112
+        }
112 113
     }
113 114
 
114 115
     public function setKey($prop, $value) {
@@ -119,8 +120,9 @@  discard block
 block discarded – undo
119 120
     public function __toString() {
120 121
         $spec = '';
121 122
         foreach ($this->_keys as $key => $value) {
122
-            if ($value === '')
123
-                continue;
123
+            if ($value === '') {
124
+                            continue;
125
+            }
124 126
             $spec .= sprintf('%s: %s'."\n", $key, $value);
125 127
         }
126 128
 
Please login to merge, or discard this patch.
src/Packager.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -52,10 +52,12 @@  discard block
 block discarded – undo
52 52
     }
53 53
 
54 54
     public function run() {
55
-        if (!is_dir($_SERVER['HOME'].'/rpmbuild/SOURCES'))
56
-            mkdir($_SERVER['HOME'].'/rpmbuild/SOURCES', 0777);
57
-        if (!is_dir($_SERVER['HOME'].'/rpmbuild/SPECS'))
58
-            mkdir($_SERVER['HOME'].'/rpmbuild/SPECS', 0777);
55
+        if (!is_dir($_SERVER['HOME'].'/rpmbuild/SOURCES')) {
56
+                    mkdir($_SERVER['HOME'].'/rpmbuild/SOURCES', 0777);
57
+        }
58
+        if (!is_dir($_SERVER['HOME'].'/rpmbuild/SPECS')) {
59
+                    mkdir($_SERVER['HOME'].'/rpmbuild/SPECS', 0777);
60
+        }
59 61
 
60 62
         if (file_exists($this->getOutputPath())) {
61 63
             $iterator = new DirectoryIterator($this->getOutputPath());
@@ -67,8 +69,9 @@  discard block
 block discarded – undo
67 69
             }
68 70
         }
69 71
 
70
-        if (!is_dir($this->getOutputPath()))
71
-            mkdir($this->getOutputPath(), 0777);
72
+        if (!is_dir($this->getOutputPath())) {
73
+                    mkdir($this->getOutputPath(), 0777);
74
+        }
72 75
 
73 76
         foreach ($this->mountPoints as $path => $dest) {
74 77
             $this->pathToPath($path, $this->getOutputPath().DIRECTORY_SEPARATOR.$dest);
@@ -148,7 +151,8 @@  discard block
 block discarded – undo
148 151
             mkdir($destFolder, 0777, true);
149 152
         }
150 153
         copy($source, $dest);
151
-        if (fileperms($source) != fileperms($dest))
152
-            chmod($dest, fileperms($source));
154
+        if (fileperms($source) != fileperms($dest)) {
155
+                    chmod($dest, fileperms($source));
156
+        }
153 157
     }
154 158
 }
155 159
\ No newline at end of file
Please login to merge, or discard this patch.