@@ -81,9 +81,9 @@ function directory_map(string $sourceDir, int $directoryDepth = 0, bool $hidden
8181 * Recursively copies the files and directories of the origin directory
8282 * into the target directory, i.e. "mirror" its contents.
8383 *
84- * @param string $originDir
85- * @param string $targetDir
86- * @param bool $overwrite Whether individual files overwrite on collision
84+ * @param string $originDir
85+ * @param string $targetDir
86+ * @param boolean $overwrite Whether individual files overwrite on collision
8787 *
8888 * @return void
8989 *
@@ -103,7 +103,9 @@ function directory_mirror(string $originDir, string $targetDir, bool $overwrite
103103
104104 $ dirLen = strlen ($ originDir );
105105
106- /** @var SplFileInfo $file */
106+ /**
107+ * @var SplFileInfo $file
108+ */
107109 foreach (new RecursiveIteratorIterator (
108110 new RecursiveDirectoryIterator ($ originDir , FilesystemIterator::SKIP_DOTS ),
109111 RecursiveIteratorIterator::SELF_FIRST
@@ -210,12 +212,12 @@ function delete_files(string $path, bool $delDir = false, bool $htdocs = false,
210212 $ isDir = $ object ->isDir ();
211213 if ($ isDir && $ delDir )
212214 {
213- @ rmdir ($ object ->getPathname ());
215+ rmdir ($ object ->getPathname ());
214216 continue ;
215217 }
216218 if (! $ isDir )
217219 {
218- @ unlink ($ object ->getPathname ());
220+ unlink ($ object ->getPathname ());
219221 }
220222 }
221223 }
@@ -315,7 +317,7 @@ function get_dir_file_info(string $sourceDir, bool $topLevelOnly = true, bool $r
315317
316318 try
317319 {
318- $ fp = @ opendir ($ sourceDir ); {
320+ $ fp = opendir ($ sourceDir ); {
319321 // reset the array and make sure $source_dir has a trailing slash on the initial call
320322 if ($ recursion === false )
321323 {
@@ -507,7 +509,7 @@ function octal_permissions(int $perms): string
507509 * @param string $file1
508510 * @param string $file2
509511 *
510- * @return bool Same or not
512+ * @return boolean Same or not
511513 */
512514 function same_file (string $ file1 , string $ file2 ): bool
513515 {
0 commit comments