@@ -96,12 +96,10 @@ |
||
| 96 | 96 | |
| 97 | 97 | if (preg_match('#'.$sType.'#', $aParams[$sName])) { |
| 98 | 98 | |
| 99 | - if ($aParams[$sName]) { $sRoute = str_replace('[/:'.$sName.']', '/'.$aParams[$sName], $sRoute); } |
|
| 100 | - else { $sRoute = str_replace('[/:'.$sName.']', '', $sRoute); } |
|
| 99 | + if ($aParams[$sName]) { $sRoute = str_replace('[/:'.$sName.']', '/'.$aParams[$sName], $sRoute); } else { $sRoute = str_replace('[/:'.$sName.']', '', $sRoute); } |
|
| 101 | 100 | $sRoute = str_replace('[:'.$sName.']', $aParams[$sName], $sRoute); |
| 102 | 101 | continue; |
| 103 | - } |
|
| 104 | - else if (isset($oRoute->defaults_constraints) |
|
| 102 | + } else if (isset($oRoute->defaults_constraints) |
|
| 105 | 103 | && isset($oRoute->defaults_constraints->{$sName}) |
| 106 | 104 | && preg_match('#'.$sType.'#', $oRoute->defaults_constraints->{$sName})) { |
| 107 | 105 | |
@@ -60,8 +60,7 @@ |
||
| 60 | 60 | echo "\n\n"; |
| 61 | 61 | echo " > Check realized on ".$options['a']; |
| 62 | 62 | echo "\n\n"; |
| 63 | - } |
|
| 64 | - else { |
|
| 63 | + } else { |
|
| 65 | 64 | echo "\n\n"; |
| 66 | 65 | echo Bash::setBackground(" ", 'red'); |
| 67 | 66 | echo Bash::setBackground(" [WARNING] A web server is not used ", 'red'); |
@@ -50,8 +50,7 @@ discard block |
||
| 50 | 50 | /** |
| 51 | 51 | * option -p [portail] |
| 52 | 52 | */ |
| 53 | - if (isset($aOptions['p'])) { $sPortal = $aOptions['p']; } |
|
| 54 | - else { $sPortal = 'Batch'; } |
|
| 53 | + if (isset($aOptions['p'])) { $sPortal = $aOptions['p']; } else { $sPortal = 'Batch'; } |
|
| 55 | 54 | |
| 56 | 55 | if (!preg_match('/^[a-zA-Z0-9]+$/', $sPortal)) { |
| 57 | 56 | |
@@ -67,16 +66,14 @@ discard block |
||
| 67 | 66 | |
| 68 | 67 | echo 'The batch can`t create public folders for '.$sPortal.'! Please check the rights.'; |
| 69 | 68 | throw new \Exception('The batch can`t create public folders for '.$sPortal.'! Please check the rights.'); |
| 70 | - } |
|
| 71 | - else { |
|
| 69 | + } else { |
|
| 72 | 70 | |
| 73 | 71 | if (!file_exists($sPrivatePath.'Controller')) { |
| 74 | 72 | |
| 75 | 73 | mkdir($sPublicPath . 'css', 0777, true); |
| 76 | 74 | mkdir($sPublicPath . 'js', 0777, true); |
| 77 | 75 | mkdir($sPublicPath . 'img', 0777, true); |
| 78 | - } |
|
| 79 | - else { |
|
| 76 | + } else { |
|
| 80 | 77 | |
| 81 | 78 | echo 'The Project (public part) ' . $sPrivatePath . " exists\n"; |
| 82 | 79 | } |
@@ -86,8 +83,7 @@ discard block |
||
| 86 | 83 | |
| 87 | 84 | echo 'The batch can`t create private folders for '.$sPortal.'! Please check the rights.'; |
| 88 | 85 | throw new \Exception('The batch can`t create private folders for '.$sPortal.'! Please check the rights.'); |
| 89 | - } |
|
| 90 | - else { |
|
| 86 | + } else { |
|
| 91 | 87 | |
| 92 | 88 | if (!file_exists($sPrivatePath.'Controller')) { |
| 93 | 89 | |
@@ -97,8 +93,7 @@ discard block |
||
| 97 | 93 | mkdir($sPrivatePath . 'View', 0777, true); |
| 98 | 94 | mkdir($sPrivatePath . 'conf', 0777, true); |
| 99 | 95 | mkdir($sPrivatePath . 'common', 0777, true); |
| 100 | - } |
|
| 101 | - else { |
|
| 96 | + } else { |
|
| 102 | 97 | |
| 103 | 98 | echo 'The Project (private part) ' . $sPrivatePath . " exists\n"; |
| 104 | 99 | } |
@@ -48,8 +48,7 @@ |
||
| 48 | 48 | |
| 49 | 49 | require $sFileClassName; |
| 50 | 50 | } |
| 51 | - } |
|
| 52 | - else { |
|
| 51 | + } else { |
|
| 53 | 52 | |
| 54 | 53 | if (strstr($sFileName, 'Venus\\') && file_exists(preg_replace('#^(src/[a-zA-Z0-9_]+/)#', '$1app/', str_replace(['\\', '/'], '/', str_replace('conf', '', __DIR__).str_replace('Venus\\', '', $sFileName))))) { |
| 55 | 54 | |
@@ -60,8 +60,7 @@ |
||
| 60 | 60 | $this->setName($sName); |
| 61 | 61 | $this->setValue($sValue); |
| 62 | 62 | |
| 63 | - if ($sLabel !== null) { $this->setLabel($sLabel); } |
|
| 64 | - else { $this->setLabel($sName); } |
|
| 63 | + if ($sLabel !== null) { $this->setLabel($sLabel); } else { $this->setLabel($sName); } |
|
| 65 | 64 | } |
| 66 | 65 | |
| 67 | 66 | /** |
@@ -51,8 +51,7 @@ |
||
| 51 | 51 | |
| 52 | 52 | $sCmd = self::TYPESCRIPT_WINDOWS." ".$sFile." --outDir ".__DIR__.'../../'.CACHE_DIR.$sFolder.'/'; |
| 53 | 53 | $sContent = shell_exec($sCmd); |
| 54 | - } |
|
| 55 | - else { |
|
| 54 | + } else { |
|
| 56 | 55 | |
| 57 | 56 | $sCmd = "tsc ".$sFile." --outDir ".__DIR__.'../../'.CACHE_DIR.$sFolder.'/'; |
| 58 | 57 | $sContent = shell_exec($sCmd); |
@@ -50,8 +50,7 @@ |
||
| 50 | 50 | $sKey = preg_replace("/^\\0(.*)\\0/", "", $sKey); |
| 51 | 51 | $aNew[$sKey] = self::object_to_array($mValues); |
| 52 | 52 | } |
| 53 | - } |
|
| 54 | - else { |
|
| 53 | + } else { |
|
| 55 | 54 | |
| 56 | 55 | $aNew = $mObject; |
| 57 | 56 | } |
@@ -50,8 +50,7 @@ |
||
| 50 | 50 | $sKey = preg_replace("/^\\0(.*)\\0/", "", $sKey); |
| 51 | 51 | $aNew[$sKey] = self::object_to_array($mValues); |
| 52 | 52 | } |
| 53 | - } |
|
| 54 | - else { |
|
| 53 | + } else { |
|
| 55 | 54 | |
| 56 | 55 | $aNew = $mObject; |
| 57 | 56 | } |
@@ -19,8 +19,7 @@ |
||
| 19 | 19 | { |
| 20 | 20 | if (isset($_COOKIE[$name]) && $_COOKIE[$name] != '') { |
| 21 | 21 | return $_COOKIE[$name]; |
| 22 | - } |
|
| 23 | - else if ($default !== null) { |
|
| 22 | + } else if ($default !== null) { |
|
| 24 | 23 | return $default; |
| 25 | 24 | } |
| 26 | 25 | } |