@@ -134,7 +134,7 @@ |
||
134 | 134 | } |
135 | 135 | if(is_dir($source.'/'.$file)) { |
136 | 136 | $this->addRecursive($path.'/'.$file, $source.'/'.$file); |
137 | - }else{ |
|
137 | + } else{ |
|
138 | 138 | $this->addFile($path.'/'.$file, $source.'/'.$file); |
139 | 139 | } |
140 | 140 | } |
@@ -271,8 +271,9 @@ |
||
271 | 271 | } |
272 | 272 | foreach ($dirs as $dir) { |
273 | 273 | foreach ($exts as $ext) { |
274 | - if ($check_fn("$dir/$name" . $ext)) |
|
275 | - return true; |
|
274 | + if ($check_fn("$dir/$name" . $ext)) { |
|
275 | + return true; |
|
276 | + } |
|
276 | 277 | } |
277 | 278 | } |
278 | 279 | return false; |
@@ -116,8 +116,7 @@ discard block |
||
116 | 116 | $length = '4'; |
117 | 117 | if ($column->getType() == 'SmallInt') { |
118 | 118 | $length = '2'; |
119 | - } |
|
120 | - elseif ($column->getType() == 'BigInt') { |
|
119 | + } elseif ($column->getType() == 'BigInt') { |
|
121 | 120 | $length = '8'; |
122 | 121 | } |
123 | 122 | $xml->addChild('length', $length); |
@@ -165,8 +164,7 @@ discard block |
||
165 | 164 | $xml->addChild('name', $index->getName()); |
166 | 165 | if ($index->isPrimary()) { |
167 | 166 | $xml->addChild('primary', 'true'); |
168 | - } |
|
169 | - elseif ($index->isUnique()) { |
|
167 | + } elseif ($index->isUnique()) { |
|
170 | 168 | $xml->addChild('unique', 'true'); |
171 | 169 | } |
172 | 170 | foreach($index->getColumns() as $column) { |
@@ -75,8 +75,7 @@ |
||
75 | 75 | $whence = SEEK_SET; |
76 | 76 | $offset = $this->stream_tell() + $offset; |
77 | 77 | $this->limit += $oldOffset - $offset; |
78 | - } |
|
79 | - else if ($whence === SEEK_SET) { |
|
78 | + } else if ($whence === SEEK_SET) { |
|
80 | 79 | $this->limit += $this->stream_tell() - $offset; |
81 | 80 | } else { |
82 | 81 | $this->limit -= $offset; |
@@ -50,7 +50,9 @@ discard block |
||
50 | 50 | public function stream_open($path, $mode, $options, &$opened_path) { |
51 | 51 | switch ($mode[0]) { |
52 | 52 | case 'r': |
53 | - if (!isset(self::$data[$path])) return false; |
|
53 | + if (!isset(self::$data[$path])) { |
|
54 | + return false; |
|
55 | + } |
|
54 | 56 | $this->path = $path; |
55 | 57 | $this->writable = isset($mode[1]) && $mode[1] == '+'; |
56 | 58 | break; |
@@ -60,18 +62,24 @@ discard block |
||
60 | 62 | $this->writable = true; |
61 | 63 | break; |
62 | 64 | case 'a': |
63 | - if (!isset(self::$data[$path])) self::$data[$path] = ''; |
|
65 | + if (!isset(self::$data[$path])) { |
|
66 | + self::$data[$path] = ''; |
|
67 | + } |
|
64 | 68 | $this->path = $path; |
65 | 69 | $this->writable = true; |
66 | 70 | $this->pointer = strlen(self::$data[$path]); |
67 | 71 | break; |
68 | 72 | case 'x': |
69 | - if (isset(self::$data[$path])) return false; |
|
73 | + if (isset(self::$data[$path])) { |
|
74 | + return false; |
|
75 | + } |
|
70 | 76 | $this->path = $path; |
71 | 77 | $this->writable = true; |
72 | 78 | break; |
73 | 79 | case 'c': |
74 | - if (!isset(self::$data[$path])) self::$data[$path] = ''; |
|
80 | + if (!isset(self::$data[$path])) { |
|
81 | + self::$data[$path] = ''; |
|
82 | + } |
|
75 | 83 | $this->path = $path; |
76 | 84 | $this->writable = true; |
77 | 85 | break; |
@@ -123,7 +131,9 @@ discard block |
||
123 | 131 | } |
124 | 132 | |
125 | 133 | public function stream_write($data) { |
126 | - if (!$this->writable) return 0; |
|
134 | + if (!$this->writable) { |
|
135 | + return 0; |
|
136 | + } |
|
127 | 137 | $size = strlen($data); |
128 | 138 | if ($this->stream_eof()) { |
129 | 139 | self::$data[$this->path] .= $data; |
@@ -90,8 +90,11 @@ |
||
90 | 90 | if (isset($params['host']) && isset($params['user']) && isset($params['password'])) { |
91 | 91 | $host = $params['host']; |
92 | 92 | //remove leading http[s], will be generated in createBaseUri() |
93 | - if (substr($host, 0, 8) == "https://") $host = substr($host, 8); |
|
94 | - else if (substr($host, 0, 7) == "http://") $host = substr($host, 7); |
|
93 | + if (substr($host, 0, 8) == "https://") { |
|
94 | + $host = substr($host, 8); |
|
95 | + } else if (substr($host, 0, 7) == "http://") { |
|
96 | + $host = substr($host, 7); |
|
97 | + } |
|
95 | 98 | $this->host = $host; |
96 | 99 | $this->user = $params['user']; |
97 | 100 | $this->password = $params['password']; |
@@ -53,8 +53,7 @@ |
||
53 | 53 | if (isset($arguments['legacy']) && $arguments['legacy']) { |
54 | 54 | // legacy home id (<= 5.0.12) |
55 | 55 | $this->id = 'local::' . $datadir . '/'; |
56 | - } |
|
57 | - else { |
|
56 | + } else { |
|
58 | 57 | $this->id = 'home::' . $this->user->getUID(); |
59 | 58 | } |
60 | 59 |
@@ -289,7 +289,9 @@ |
||
289 | 289 | $dh = $this->opendir($dir); |
290 | 290 | if (is_resource($dh)) { |
291 | 291 | while (($item = readdir($dh)) !== false) { |
292 | - if (\OC\Files\Filesystem::isIgnoredDir($item)) continue; |
|
292 | + if (\OC\Files\Filesystem::isIgnoredDir($item)) { |
|
293 | + continue; |
|
294 | + } |
|
293 | 295 | if (strstr(strtolower($item), strtolower($query)) !== false) { |
294 | 296 | $files[] = $dir . '/' . $item; |
295 | 297 | } |
@@ -317,8 +317,9 @@ |
||
317 | 317 | $files = array(); |
318 | 318 | $physicalDir = $this->getSourcePath($dir); |
319 | 319 | foreach (scandir($physicalDir) as $item) { |
320 | - if (\OC\Files\Filesystem::isIgnoredDir($item)) |
|
321 | - continue; |
|
320 | + if (\OC\Files\Filesystem::isIgnoredDir($item)) { |
|
321 | + continue; |
|
322 | + } |
|
322 | 323 | $physicalItem = $physicalDir . '/' . $item; |
323 | 324 | |
324 | 325 | if (strstr(strtolower($item), strtolower($query)) !== false) { |