]> git.joonet.de Git - adminer.git/commitdiff
Coding style: Check newline at {}
authorJakub Vrana <jakub@vrana.cz>
Wed, 5 Mar 2025 09:01:26 +0000 (10:01 +0100)
committerJakub Vrana <jakub@vrana.cz>
Wed, 5 Mar 2025 12:10:40 +0000 (13:10 +0100)
adminer/check.inc.php
adminer/create.inc.php
adminer/event.inc.php
adminer/foreign.inc.php
adminer/include/editing.inc.php
adminer/procedure.inc.php
adminer/trigger.inc.php
adminer/user.inc.php
adminer/view.inc.php
phpcs.xml

index a7df1ea4a6259d15f852774917310deaf3e7f6ee..305748d1639579afbec0ea1848e6f9dfed7b8e60 100644 (file)
@@ -42,6 +42,8 @@ echo doc_link(array(
 ?>
 <p><?php textarea("clause", $row["clause"]); ?>
 <p><input type="submit" value="<?php echo lang('Save'); ?>">
-<?php if ($name != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $name)); ?><?php } ?>
+<?php if ($name != "") { ?>
+<input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $name)); ?>
+<?php } ?>
 <input type="hidden" name="token" value="<?php echo $token; ?>">
 </form>
index abdf83889c10ea8943717997339186ba3b5ba68b..a4c109073d48ca0857ccb031cd8879e0b5129bdd 100644 (file)
@@ -211,7 +211,9 @@ foreach ($engines as $engine) {
 <input type="submit" value="<?php echo lang('Save'); ?>">
 <?php } ?>
 
-<?php if ($TABLE != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $TABLE)); ?><?php } ?>
+<?php if ($TABLE != "") { ?>
+<input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $TABLE)); ?>
+<?php } ?>
 <?php
 if (support("partitioning")) {
        $partition_table = preg_match('~RANGE|LIST~', $row["partition_by"]);
index 083d18dc72f99fe5931c002af091092519793115..592b189d2a5522d512dcc081f7200f1465631872 100644 (file)
@@ -47,6 +47,8 @@ if (!$row && $EVENT != "") {
 <p><?php textarea("EVENT_DEFINITION", $row["EVENT_DEFINITION"]); ?>
 <p>
 <input type="submit" value="<?php echo lang('Save'); ?>">
-<?php if ($EVENT != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $EVENT)); ?><?php } ?>
+<?php if ($EVENT != "") { ?>
+<input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $EVENT)); ?>
+<?php } ?>
 <input type="hidden" name="token" value="<?php echo $token; ?>">
 </form>
index 7da2d551cdeaf69adc8ee884cb420b36fb6a8356..6f271668e50dd652439123e492d73b4b70ef9a0e 100644 (file)
@@ -108,6 +108,8 @@ foreach ($row["source"] as $key => $val) {
 <p>
 <input type="submit" value="<?php echo lang('Save'); ?>">
 <noscript><p><input type="submit" name="add" value="<?php echo lang('Add column'); ?>"></noscript>
-<?php if ($name != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $name)); ?><?php } ?>
+<?php if ($name != "") { ?>
+<input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $name)); ?>
+<?php } ?>
 <input type="hidden" name="token" value="<?php echo $token; ?>">
 </form>
index b23394ef2b3d289a38c72360eefca2fcdfc837ad..99676fa6ce22211a0b2abdd4e3cf966f36ef8b81 100644 (file)
@@ -339,7 +339,7 @@ function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = arra
        $comment_class = (($_POST ? $_POST["comments"] : adminer_setting("comments")) ? "" : " class='hidden'");
        ?>
 <thead><tr>
-<?php if ($type == "PROCEDURE") { ?><td><?php } ?>
+<?php echo ($type == "PROCEDURE" ? "<td>" : ""); ?>
 <th id="label-name"><?php echo ($type == "TABLE" ? lang('Column name') : lang('Parameter name')); ?>
 <td id="label-type"><?php echo lang('Type'); ?><textarea id="enum-edit" rows="4" cols="12" wrap="off" style="display: none;"></textarea><?php echo script("qs('#enum-edit').onblur = editingLengthBlur;"); ?>
 <td id="label-length"><?php echo lang('Length'); ?>
@@ -368,7 +368,10 @@ function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = arra
                ?>
 <tr<?php echo ($display ? "" : " style='display: none;'"); ?>>
 <?php echo ($type == "PROCEDURE" ? "<td>" . html_select("fields[$i][inout]", explode("|", $inout), $field["inout"]) : ""); ?>
-<th><?php if ($display) { ?><input name="fields[<?php echo $i; ?>][field]" value="<?php echo h($field["field"]); ?>" data-maxlength="64" autocapitalize="off" aria-labelledby="label-name"><?php } ?>
+<th>
+<?php if ($display) { ?>
+<input name="fields[<?php echo $i; ?>][field]" value="<?php echo h($field["field"]); ?>" data-maxlength="64" autocapitalize="off" aria-labelledby="label-name">
+<?php } ?>
 <input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo h($orig); ?>"><?php edit_type("fields[$i]", $field, $collations, $foreign_keys); ?>
 <?php
                if ($type == "TABLE") {
index 1fc84ef5512cd379c1ce132ef3a983205275fd4e..265bd6d25f629d5137c62510ef5d378b6cd5e792 100644 (file)
@@ -53,6 +53,8 @@ if (isset($_GET["function"])) {
 <p><?php textarea("definition", $row["definition"]); ?>
 <p>
 <input type="submit" value="<?php echo lang('Save'); ?>">
-<?php if ($PROCEDURE != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $PROCEDURE)); ?><?php } ?>
+<?php if ($PROCEDURE != "") { ?>
+<input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $PROCEDURE)); ?>
+<?php } ?>
 <input type="hidden" name="token" value="<?php echo $token; ?>">
 </form>
index 9140a82172267e9673eadc6c3355b66943325baf..125a4d1f268b24d3cd1946db5cc340c4e5b0c023 100644 (file)
@@ -44,6 +44,8 @@ page_header(($name != "" ? lang('Alter trigger') . ": " . h($name) : lang('Creat
 <p><?php textarea("Statement", $row["Statement"]); ?>
 <p>
 <input type="submit" value="<?php echo lang('Save'); ?>">
-<?php if ($name != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $name)); ?><?php } ?>
+<?php if ($name != "") { ?>
+<input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $name)); ?>
+<?php } ?>
 <input type="hidden" name="token" value="<?php echo $token; ?>">
 </form>
index 2a7a53a592cc459e27cbb3742b41ef18d1f37caf..b43cdabf4e3c619f9773e87019cad33abe6128d8 100644 (file)
@@ -184,6 +184,8 @@ echo "</table>\n";
 ?>
 <p>
 <input type="submit" value="<?php echo lang('Save'); ?>">
-<?php if (isset($_GET["host"])) { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', "$USER@$_GET[host]")); ?><?php } ?>
+<?php if (isset($_GET["host"])) { ?>
+<input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', "$USER@$_GET[host]")); ?>
+<?php } ?>
 <input type="hidden" name="token" value="<?php echo $token; ?>">
 </form>
index 6bbaf4ab6917ecfabd8d9daa90ce345162ed21e0..1e8445d4b281cf85e94325bb3bd481b2ae0d6f1f 100644 (file)
@@ -53,6 +53,8 @@ page_header(($TABLE != "" ? lang('Alter view') : lang('Create view')), $error, a
 <p><?php textarea("select", $row["select"]); ?>
 <p>
 <input type="submit" value="<?php echo lang('Save'); ?>">
-<?php if ($TABLE != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $TABLE)); ?><?php } ?>
+<?php if ($TABLE != "") { ?>
+<input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $TABLE)); ?>
+<?php } ?>
 <input type="hidden" name="token" value="<?php echo $token; ?>">
 </form>
index e59547b6d858e7360cf34dfaa8b4c7f4ca8934bb..af386e3f22e385c395b20e234c255441bd07d62a 100644 (file)
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -40,8 +40,6 @@
                <!-- TODO: Ignore only in <?php if () { ?><?php } ?> -->
                <exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect"/>
                <exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact"/>
-               <exclude name="Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace"/>
-               <exclude name="Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore"/>
        </rule>
 
        <rule ref="Generic.Classes.OpeningBraceSameLine"/>