From 3192243fb4cf662caf010f728e65b7bdf445f039 Mon Sep 17 00:00:00 2001 From: myvesta <38690722+myvesta@users.noreply.github.com> Date: Sun, 26 Mar 2023 15:01:52 +0200 Subject: [PATCH] tabs fix --- func/bash-to-php-interpreter.php | 22 +++++++++++----------- func/main.php | 22 +++++++++++----------- func/string.php | 20 ++++++++++---------- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/func/bash-to-php-interpreter.php b/func/bash-to-php-interpreter.php index 6c1c2fa0..9c67ab55 100644 --- a/func/bash-to-php-interpreter.php +++ b/func/bash-to-php-interpreter.php @@ -10,25 +10,25 @@ if ($counter<2) myvesta_throw_error(2, 'Function is missing'); $func=$argv[1]; if (!function_exists($func)) { - $func="myvesta_".$argv[1]; - if (!function_exists($func)) myvesta_throw_error(2, 'Function does not exists'); + $func="myvesta_".$argv[1]; + if (!function_exists($func)) myvesta_throw_error(2, 'Function does not exists'); } $params=array(); for ($i=2; $i<$counter; $i++) { - $argv[$i]=myvesta_fix_backslashes($argv[$i]); - $params[]=$argv[$i]; + $argv[$i]=myvesta_fix_backslashes($argv[$i]); + $params[]=$argv[$i]; } $r=call_user_func_array($func, $params); if (is_bool($r)) { - if ($r) { - exit(0); - } else { - exit(MYVESTA_ERROR_GENERAL); - } + if ($r) { + exit(0); + } else { + exit(MYVESTA_ERROR_GENERAL); + } } else { - echo $r; - exit(0); + echo $r; + exit(0); } diff --git a/func/main.php b/func/main.php index d09a6bd8..1a932fa7 100644 --- a/func/main.php +++ b/func/main.php @@ -18,10 +18,10 @@ function myvesta_throw_error($code, $message) { } function myvesta_fix_backslashes($s) { - $s=str_replace("\\n", "\n", $s); - $s=str_replace("\\r", "\r", $s); - $s=str_replace("\\t", "\t", $s); - return $s; + $s=str_replace("\\n", "\n", $s); + $s=str_replace("\\r", "\r", $s); + $s=str_replace("\\t", "\t", $s); + return $s; } function myvesta_check_args ($requried_arguments, $arguments) { @@ -45,11 +45,11 @@ function myvesta_check_args ($requried_arguments, $arguments) { function myvesta_fix_args() { global $argv; - $i=0; + $i=0; foreach ($argv as $argument) { - if ($i==0) {$i++; continue;} + if ($i==0) {$i++; continue;} $argv[$i]=myvesta_fix_backslashes($argv[$i]); - $i++; + $i++; } } @@ -60,8 +60,8 @@ function myvesta_exit($code) { } function myvesta_test_func () { - $args=func_get_args(); - echo "You said: "; - print_r ($args); - echo "\n"; + $args=func_get_args(); + echo "You said: "; + print_r ($args); + echo "\n"; } diff --git a/func/string.php b/func/string.php index 0fa284cf..3882c069 100644 --- a/func/string.php +++ b/func/string.php @@ -11,49 +11,49 @@ function myvesta_replace_in_file($file, $find, $replace) { $buf=str_replace($find, $replace, $buf); $r=file_put_contents($file, $buf); - if ($r===false) return false; + if ($r===false) return false; return true; } function myvesta_get_between_in_file($file, $left_substring, $right_substring, $start=0, $return_left_substring=0, $return_right_substring=0, $left_substring_necessary=1, $right_substring_necessary=1) { if (!file_exists($file)) return myvesta_throw_error (MYVESTA_ERROR_FILE_DOES_NOT_EXISTS, "File '$file' not found"); $text=file_get_contents($file); - return myvesta_str_get_between ($text, $left_substring, $right_substring, $start, $return_left_substring, $return_right_substring, $left_substring_necessary, $right_substring_necessary); + return myvesta_str_get_between ($text, $left_substring, $right_substring, $start, $return_left_substring, $return_right_substring, $left_substring_necessary, $right_substring_necessary); } function myvesta_replace_in_file_once_between_including_borders($file, $left, $right, $replace_with) { if (!file_exists($file)) return myvesta_throw_error (MYVESTA_ERROR_FILE_DOES_NOT_EXISTS, "File '$file' not found"); $text=file_get_contents($file); - $buf=myvesta_str_replace_once_between_including_borders($text, $left, $right, $replace_with); + $buf=myvesta_str_replace_once_between_including_borders($text, $left, $right, $replace_with); $r=file_put_contents($file, $buf); - if ($r===false) return false; + if ($r===false) return false; return true; } function myvesta_strip_once_in_file_between_including_borders($file, $left, $right) { if (!file_exists($file)) return myvesta_throw_error (MYVESTA_ERROR_FILE_DOES_NOT_EXISTS, "File '$file' not found"); $text=file_get_contents($file); - $buf=myvesta_str_strip_once_between_including_borders($text, $left, $right); + $buf=myvesta_str_strip_once_between_including_borders($text, $left, $right); $r=file_put_contents($file, $buf); - if ($r===false) return false; + if ($r===false) return false; return true; } function myvesta_replace_in_file_between_including_borders($file, $left, $right, $replace_with) { if (!file_exists($file)) return myvesta_throw_error (MYVESTA_ERROR_FILE_DOES_NOT_EXISTS, "File '$file' not found"); $text=file_get_contents($file); - $buf=myvesta_str_replace_between_including_borders($text, $left, $right, $replace_with); + $buf=myvesta_str_replace_between_including_borders($text, $left, $right, $replace_with); $r=file_put_contents($file, $buf); - if ($r===false) return false; + if ($r===false) return false; return true; } function myvesta_strip_in_file_between_including_borders($file, $left, $right) { if (!file_exists($file)) return myvesta_throw_error (MYVESTA_ERROR_FILE_DOES_NOT_EXISTS, "File '$file' not found"); $text=file_get_contents($file); - $buf=myvesta_str_strip_between_including_borders($text, $left, $right); + $buf=myvesta_str_strip_between_including_borders($text, $left, $right); $r=file_put_contents($file, $buf); - if ($r===false) return false; + if ($r===false) return false; return true; }