Passed
Push — master ( 58fd78...dc2798 )
by Morris
09:53 queued 10s
created
lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php 2 patches
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -31,53 +31,53 @@
 block discarded – undo
31 31
  * @package OC\Integritycheck\Iterator
32 32
  */
33 33
 class ExcludeFileByNameFilterIterator extends \RecursiveFilterIterator {
34
-	/**
35
-	 * Array of excluded file names. Those are not scanned by the integrity checker.
36
-	 * This is used to exclude files which administrators could upload by mistakes
37
-	 * such as .DS_Store files.
38
-	 *
39
-	 * @var array
40
-	 */
41
-	private $excludedFilenames = [
42
-		'.DS_Store', // Mac OS X
43
-		'Thumbs.db', // Microsoft Windows
44
-		'.directory', // Dolphin (KDE)
45
-		'.webapp', // Gentoo/Funtoo & derivatives use a tool known as webapp-config to manage web-apps.
46
-	];
34
+    /**
35
+     * Array of excluded file names. Those are not scanned by the integrity checker.
36
+     * This is used to exclude files which administrators could upload by mistakes
37
+     * such as .DS_Store files.
38
+     *
39
+     * @var array
40
+     */
41
+    private $excludedFilenames = [
42
+        '.DS_Store', // Mac OS X
43
+        'Thumbs.db', // Microsoft Windows
44
+        '.directory', // Dolphin (KDE)
45
+        '.webapp', // Gentoo/Funtoo & derivatives use a tool known as webapp-config to manage web-apps.
46
+    ];
47 47
 
48
-	/**
49
-	 * Array of excluded file name parts. Those are not scanned by the integrity checker.
50
-	 * These strings are regular expressions and any file names
51
-	 * matching these expressions are ignored.
52
-	 *
53
-	 * @var array
54
-	 */
55
-	private $excludedFilenamePatterns = [
56
-		'/^\.webapp-nextcloud-(\d+\.){2}(\d+)(-r\d+)?$/', // Gentoo/Funtoo & derivatives use a tool known as webapp-config to manage wep-apps.
57
- 	];
48
+    /**
49
+     * Array of excluded file name parts. Those are not scanned by the integrity checker.
50
+     * These strings are regular expressions and any file names
51
+     * matching these expressions are ignored.
52
+     *
53
+     * @var array
54
+     */
55
+    private $excludedFilenamePatterns = [
56
+        '/^\.webapp-nextcloud-(\d+\.){2}(\d+)(-r\d+)?$/', // Gentoo/Funtoo & derivatives use a tool known as webapp-config to manage wep-apps.
57
+        ];
58 58
 
59
-	/**
60
-	 * @return bool
61
-	 */
62
-	public function accept() {
63
-		/** @var \SplFileInfo $current */
64
-		$current = $this->current();
59
+    /**
60
+     * @return bool
61
+     */
62
+    public function accept() {
63
+        /** @var \SplFileInfo $current */
64
+        $current = $this->current();
65 65
 
66
-		if ($current->isDir()) {
67
-			return true;
68
-		}
66
+        if ($current->isDir()) {
67
+            return true;
68
+        }
69 69
 
70
-		$currentFileName = $current->getFilename();
71
-		if (in_array($currentFileName, $this->excludedFilenames, true)){
72
-			return false;
73
-		}
70
+        $currentFileName = $current->getFilename();
71
+        if (in_array($currentFileName, $this->excludedFilenames, true)){
72
+            return false;
73
+        }
74 74
 
75
-		foreach ($this->excludedFilenamePatterns as $pattern){
76
-			if (preg_match($pattern, $currentFileName) > 0){
77
-				return false;
78
-			}
79
-		}
75
+        foreach ($this->excludedFilenamePatterns as $pattern){
76
+            if (preg_match($pattern, $currentFileName) > 0){
77
+                return false;
78
+            }
79
+        }
80 80
 
81
-		return true;
82
-	}
81
+        return true;
82
+    }
83 83
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,12 +68,12 @@
 block discarded – undo
68 68
 		}
69 69
 
70 70
 		$currentFileName = $current->getFilename();
71
-		if (in_array($currentFileName, $this->excludedFilenames, true)){
71
+		if (in_array($currentFileName, $this->excludedFilenames, true)) {
72 72
 			return false;
73 73
 		}
74 74
 
75
-		foreach ($this->excludedFilenamePatterns as $pattern){
76
-			if (preg_match($pattern, $currentFileName) > 0){
75
+		foreach ($this->excludedFilenamePatterns as $pattern) {
76
+			if (preg_match($pattern, $currentFileName) > 0) {
77 77
 				return false;
78 78
 			}
79 79
 		}
Please login to merge, or discard this patch.