aboutsummaryrefslogtreecommitdiff
path: root/app/class/Modeladmin.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2020-04-17 19:01:05 +0200
committervincent-peugnet <v.peugnet@free.fr>2020-04-17 19:01:05 +0200
commit802f5135b0979bab3bf30ae1733f9867e2caed7a (patch)
tree3575cb7dd353e7f1ce74b079aa1559b5d69054bf /app/class/Modeladmin.php
parent74e2b3fdd66bfbe99bae771fa3a0b6c427fc0f86 (diff)
downloadwcms-802f5135b0979bab3bf30ae1733f9867e2caed7a.tar.gz
wcms-802f5135b0979bab3bf30ae1733f9867e2caed7a.zip
apply psr12
Diffstat (limited to 'app/class/Modeladmin.php')
-rw-r--r--app/class/Modeladmin.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/app/class/Modeladmin.php b/app/class/Modeladmin.php
index 54c4f0c..478bc77 100644
--- a/app/class/Modeladmin.php
+++ b/app/class/Modeladmin.php
@@ -8,10 +8,10 @@ class Modeladmin extends Model
/**
* List all availalble pages databases
- *
- * @return array
+ *
+ * @return array
*/
- public function pagesdblist() : array
+ public function pagesdblist(): array
{
$dblist = glob(self::PAGES_DIR . '*', GLOB_ONLYDIR);
$dblist = array_map('basename', $dblist);
@@ -21,7 +21,7 @@ class Modeladmin extends Model
/**
* Duplicate actual page database using new name
- *
+ *
* @param string $name of the new database
*/
public function duplicate(string $name)
@@ -31,7 +31,7 @@ class Modeladmin extends Model
/**
* Copy database folder to a new folder if it doeas not already exsit
- *
+ *
* @param string $db name of source page database to copy
* @param string $name of the destination database
*/
@@ -39,10 +39,8 @@ class Modeladmin extends Model
{
$dbdir = self::PAGES_DIR . $db;
$newdbdir = self::PAGES_DIR . idclean($name);
- if(is_dir($dbdir) && !is_dir($newdbdir)) {
+ if (is_dir($dbdir) && !is_dir($newdbdir)) {
recurse_copy($dbdir, $newdbdir);
}
}
}
-
-?> \ No newline at end of file