diff options
author | Felipe Figueroa <amenadiel@gmail.com> | 2021-03-25 13:00:58 +0300 |
---|---|---|
committer | Felipe Figueroa <amenadiel@gmail.com> | 2021-03-25 13:00:58 +0300 |
commit | ab85b1b8eff0e21f09d7fef3f624c0c89d739193 (patch) | |
tree | be4cc542976980b513740b9ca729b65f9b51cdf2 | |
parent | 6ecd16dd63bde1148f1e3d07fd0af7aa5eda4e13 (diff) |
typehint iteratoraggregate for printTablefeature/bugfixes_from_wrong_bisect
188 files changed, 3933 insertions, 2494 deletions
diff --git a/.eslintrc.js b/.eslintrc.js index 75d5b1d8..4e10e32a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,280 +1,91 @@ module.exports = { - parser: "babel-eslint", - - extends: "plugin:prettier/recommended", - plugins: ["prettier"], + parser: '@typescript-eslint/parser', + parserOptions: { + ecmaVersion: 2020, + sourceType: 'module', + }, + extends: [ + 'plugin:@typescript-eslint/recommended', + 'prettier/@typescript-eslint', + 'plugin:prettier/recommended' + ], env: { + node: true, es6: true, - browser: true + serviceworker: true, + browser: true, }, globals: { - stateObj: true, workbox: false, document: true, window: true, - CodeMirror: true, jQuery: true, $: true, + stateObj:true - hljs: true }, - parserOptions: { - ecmaVersion: 2017, - ecmaFeatures: { - arrowFunctions: true, - binaryLiterals: true, - blockBindings: true, - classes: true, - defaultParams: true, - destructuring: true, - forOf: true, - generators: true, - modules: true, - objectLiteralComputedProperties: true, - objectLiteralDuplicateProperties: true, - objectLiteralShorthandMethods: true, - objectLiteralShorthandProperties: true, - octalLiterals: true, - regexUFlag: true, - regexYFlag: true, - spread: true, - superInFunctions: true, - templateStrings: true, - unicodeCodePointEscapes: true, - globalReturn: true, - jsx: true - } - }, - - rules: { - "prettier/prettier": "error", - - // - //Possible Errors - // - // The following rules point out areas where you might have made mistakes. - // - "comma-dangle": 0, // disallow or enforce trailing commas - "no-cond-assign": 2, // disallow assignment in conditional expressions - "no-console": 0, // disallow use of console (off by default in the node environment) - "no-constant-condition": 2, // disallow use of constant expressions in conditions - "no-control-regex": 2, // disallow control characters in regular expressions - "no-debugger": 2, // disallow use of debugger - "no-dupe-args": 2, // disallow duplicate arguments in functions - "no-dupe-keys": 2, // disallow duplicate keys when creating object literals - "no-duplicate-case": 2, // disallow a duplicate case label. - "no-empty": 2, // disallow empty statements - "no-ex-assign": 2, // disallow assigning to the exception in a catch block - "no-extra-boolean-cast": 2, // disallow double-negation boolean casts in a boolean context - "no-extra-parens": 0, // disallow unnecessary parentheses (off by default) - "no-extra-semi": 2, // disallow unnecessary semicolons - "no-func-assign": 2, // disallow overwriting functions written as function declarations - "no-inner-declarations": 2, // disallow function or variable declarations in nested blocks - "no-invalid-regexp": 2, // disallow invalid regular expression strings in the RegExp constructor - "no-irregular-whitespace": 2, // disallow irregular whitespace outside of strings and comments - "no-negated-in-lhs": 2, // disallow negation of the left operand of an in expression - "no-obj-calls": 2, // disallow the use of object properties of the global object (Math and JSON) as functions - "no-regex-spaces": 2, // disallow multiple spaces in a regular expression literal - "no-sparse-arrays": 2, // disallow sparse arrays - "no-unreachable": 2, // disallow unreachable statements after a return, throw, continue, or break statement - "use-isnan": 2, // disallow comparisons with the value NaN - "valid-jsdoc": 0, // Ensure JSDoc comments are valid (off by default) - "valid-typeof": 2, // Ensure that the results of typeof are compared against a valid string - // - // Best Practices - // - // These are rules designed to prevent you from making mistakes. - // They either prescribe a better way of doing something or help you avoid footguns. - // - "block-scoped-var": 0, // treat var statements as if they were block scoped (off by default). 0: deep destructuring is not compatible https://github.com/eslint/eslint/issues/1863 - complexity: 0, // specify the maximum cyclomatic complexity allowed in a program (off by default) - "consistent-return": 0, // require return statements to either always or never specify values - curly: 2, // specify curly brace conventions for all control statements - "default-case": 2, // require default case in switch statements (off by default) - "dot-notation": 2, // encourages use of dot notation whenever possible - eqeqeq: 2, // require the use of === and !== - "guard-for-in": 2, // make sure for-in loops have an if statement (off by default) - "no-alert": 0, // disallow the use of alert, confirm, and prompt - "no-caller": 2, // disallow use of arguments.caller or arguments.callee - "no-div-regex": 2, // disallow division operators explicitly at beginning of regular expression (off by default) - "no-else-return": 0, // disallow else after a return in an if (off by default) - "no-eq-null": 2, // disallow comparisons to null without a type-checking operator (off by default) - "no-eval": 2, // disallow use of eval() - "no-extend-native": 2, // disallow adding to native types - "no-extra-bind": 2, // disallow unnecessary function binding - "no-fallthrough": 2, // disallow fallthrough of case statements - "no-floating-decimal": 2, // disallow the use of leading or trailing decimal points in numeric literals (off by default) - "no-implied-eval": 2, // disallow use of eval()-like methods - "no-iterator": 2, // disallow usage of __iterator__ property - "no-labels": 2, // disallow use of labeled statements - "no-lone-blocks": 2, // disallow unnecessary nested blocks - "no-loop-func": 2, // disallow creation of functions within loops - "no-multi-spaces": 2, // disallow use of multiple spaces - "no-multi-str": 2, // disallow use of multiline strings - "no-native-reassign": 2, // disallow reassignments of native objects - "no-new": 2, // disallow use of new operator when not part of the assignment or comparison - "no-new-func": 2, // disallow use of new operator for Function object - "no-new-wrappers": 2, // disallows creating new instances of String,Number, and Boolean - "no-octal": 2, // disallow use of octal literals - "no-octal-escape": 2, // disallow use of octal escape sequences in string literals, such as var foo = "Copyright \251"; - "no-param-reassign": 0, // disallow reassignment of function parameters (off by default) - "no-process-env": 0, // disallow use of process.env (off by default) - "no-proto": 2, // disallow usage of __proto__ property - "no-redeclare": 2, // disallow declaring the same variable more then once - "no-return-assign": 2, // disallow use of assignment in return statement - "no-script-url": 2, // disallow use of javascript: urls. - "no-self-compare": 2, // disallow comparisons where both sides are exactly the same (off by default) - "no-sequences": 2, // disallow use of comma operator - "no-throw-literal": 2, // restrict what can be thrown as an exception (off by default) - "no-unused-expressions": 0, // disallow usage of expressions in statement position - "no-void": 2, // disallow use of void operator (off by default) - "no-warning-comments": [ + rules: { + //"security/detect-non-literal-require": 0, + 'prettier/prettier': 'error', + 'prefer-const': 0, + // Typescript rules + '@typescript-eslint/no-var-requires': 0, + '@typescript-eslint/camelcase': 0, + '@typescript-eslint/ban-ts-ignore': 0, + '@typescript-eslint/no-unused-vars': 0, + '@typescript-eslint/no-explicit-any': 0, + '@typescript-eslint/ban-ts-comment': 0, + '@typescript-eslint/explicit-function-return-type': 0, + '@typescript-eslint/no-this-alias': 0, + '@typescript-eslint/no-shadow': 1, + '@typescript-eslint/triple-slash-reference': [ 0, { - terms: ["todo", "fixme"], - location: "start" - } - ], // disallow usage of configurable warning terms in comments": 2, // e.g. TODO or FIXME (off by default) - "no-with": 2, // disallow use of the with statement - radix: 2, // require use of the second argument for parseInt() (off by default) - "vars-on-top": 0, // requires to declare all vars on top of their containing scope (off by default) - "wrap-iife": 2, // require immediate function invocation to be wrapped in parentheses (off by default) - yoda: 2, // require or disallow Yoda conditions + path: 'always', + types: 'prefer-import', + lib: 'prefer-import', + }, + ], + // @typescript-eslint/explicit-function-return-type": 0, - // - // Strict Mode - // - // These rules relate to using strict mode. - // - strict: 0, // controls location of Use Strict Directives. 0: required by `babel-eslint` - // - // Variables - // - // These rules have to do with variable declarations. - // - "no-catch-shadow": 2, // disallow the catch clause parameter name being the same as a variable in the outer scope (off by default in the node environment) - "no-delete-var": 2, // disallow deletion of variables - "no-label-var": 2, // disallow labels that share a name with a variable - "no-shadow": 2, // disallow declaration of variables already declared in the outer scope - "no-shadow-restricted-names": 2, // disallow shadowing of names such as arguments - "no-undef": 2, // disallow use of undeclared variables unless mentioned in a /*global */ block - "no-undef-init": 2, // disallow use of undefined when initializing variables - "no-undefined": 0, // disallow use of undefined variable (off by default) - "no-unused-vars": 0, // disallow declaration of variables that are not used in the code - "no-use-before-define": 2, // disallow use of variables before they are defined + // eslint-disable @typescript-eslint/no-unused-vars + // eslint-disable @typescript-eslint/explicit-function-return-type // - //Stylistic Issues - // - // These rules are purely matters of style and are quite subjective. - // - indent: [0, "tab"], // this option sets a specific tab width for your code (off by default) - "brace-style": 1, // enforce one true brace style (off by default) - camelcase: 0, // require camel case names - "comma-spacing": [ - 1, - { - before: false, - after: true - } - ], // enforce spacing before and after comma - "comma-style": [1, "last"], // enforce one true comma style (off by default) - "consistent-this": [1, "_this"], // enforces consistent naming when capturing the current execution context (off by default) - "eol-last": 1, // enforce newline at the end of file, with no multiple empty lines - "func-names": 0, // require function expressions to have a name (off by default) - "func-style": 0, // enforces use of function declarations or expressions (off by default) - "key-spacing": [ - 1, - { - beforeColon: false, - afterColon: true - } - ], // enforces spacing between keys and values in object literal properties - "max-nested-callbacks": [1, 4], // specify the maximum depth callbacks can be nested (off by default) - "new-cap": [ - 1, - { - newIsCap: true, - capIsNew: false - } - ], // require a capital letter for constructors - "new-parens": 1, // disallow the omission of parentheses when invoking a constructor with no arguments - "newline-after-var": 0, // allow/disallow an empty newline after var statement (off by default) - "no-array-constructor": 1, // disallow use of the Array constructor - "no-inline-comments": 0, // disallow comments inline after code (off by default) - "no-lonely-if": 1, // disallow if as the only statement in an else block (off by default) - "no-mixed-spaces-and-tabs": 1, // disallow mixed spaces and tabs for indentation - "no-multiple-empty-lines": [ - 1, - { - max: 2 - } - ], // disallow multiple empty lines (off by default) - "no-nested-ternary": 1, // disallow nested ternary expressions (off by default) - "no-new-object": 1, // disallow use of the Object constructor - "no-spaced-func": 1, // disallow space between function identifier and application - "no-ternary": 0, // disallow the use of ternary operators (off by default) - "no-trailing-spaces": 1, // disallow trailing whitespace at the end of lines - "no-underscore-dangle": 0, // disallow dangling underscores in identifiers - //"one-var": ["warn", { "initialized": "never" }], // allow just one var statement per function (off by default) - "operator-assignment": [0, "never"], // require assignment operator shorthand where possible or prohibit it entirely (off by default) - "padded-blocks": [0, "always"], // enforce padding within blocks (off by default) - "quote-props": [0, "as-needed"], // require quotes around object literal property names (off by default) - quotes: [0, "single"], // specify whether double or single quotes should be used - semi: [1, "always"], // require or disallow use of semicolons instead of ASI - "semi-spacing": [ - 1, - { - before: false, - after: true - } - ], // enforce spacing before and after semicolons - "sort-vars": 0, // sort variables within the same declaration block (off by default) - - "space-before-blocks": [1, "always"], // require or disallow space before blocks (off by default) - "space-before-function-paren": [ - 0, - { - anonymous: "always", - named: "never" - } - ], // require or disallow space before function opening parenthesis (off by default) - - //"space-infix-ops": [1], // require spaces around operators - //"space-return-throw-case": [1, "always"], // require a space after return, throw, and case - "space-unary-ops": [ - 1, - { - words: true, - nonwords: false - } - ], // Require or disallow spaces before/after unary operators (words on by default, nonwords off by default) - "wrap-regex": 0, // require regex literals to be wrapped in parentheses (off by default) - - // - // ECMAScript 6 + //Possible Errors // - // These rules are only relevant to ES6 environments and are off by default. + // The following rules point out areas where you might have made mistakes. // - "no-var": 0, // require let or const instead of var (off by default) - "generator-star-spacing": [2, "before"], // enforce the spacing around the * in generator functions (off by default) + 'comma-dangle': 0, // disallow or enforce trailing commas + 'no-cond-assign': 2, // disallow assignment in conditional expressions + 'no-console': 0, // disallow use of console (off by default in the node environment) + 'no-constant-condition': 2, // disallow use of constant expressions in conditions + 'no-control-regex': 2, // disallow control characters in regular expressions + 'no-debugger': 2, // disallow use of debugger + 'no-dupe-args': 2, // disallow duplicate arguments in functions + 'no-dupe-keys': 2, // disallow duplicate keys when creating object literals + 'no-duplicate-case': 2, // disallow a duplicate case label. + 'no-empty': 2, // disallow empty statements - // - // Legacy - // - // The following rules are included for compatibility with JSHint and JSLint. - // While the names of the rules may not match up with the JSHint/JSLint counterpart, - // the functionality is the same. - // - "max-depth": [2, 3], // specify the maximum depth that blocks can be nested (off by default) - "max-len": [1, 150, 2], // specify the maximum length of a line in your program (off by default) - "max-params": [1, 10], // limits the number of parameters that can be used in the function declaration. (off by default) - "max-statements": 0, // specify the maximum number of statement allowed in a function (off by default) - "no-bitwise": 1, // disallow use of bitwise operators (off by default) - "no-plusplus": 0 // disallow use of unary operators, ++ and -- (off by default) - } + 'no-ex-assign': 2, // disallow assigning to the exception in a catch block + 'no-extra-boolean-cast': 2, // disallow double-negation boolean casts in a boolean context + 'no-extra-parens': 0, // disallow unnecessary parentheses (off by default) + 'no-extra-semi': 2, // disallow unnecessary semicolons + 'no-func-assign': 2, // disallow overwriting functions written as function declarations + 'no-inner-declarations': 2, // disallow function or variable declarations in nested blocks + 'no-invalid-regexp': 2, // disallow invalid regular expression strings in the RegExp constructor + 'no-irregular-whitespace': 2, // disallow irregular whitespace outside of strings and comments + 'no-negated-in-lhs': 2, // disallow negation of the left operand of an in expression + 'no-obj-calls': 2, // disallow the use of object properties of the global object (Math and JSON) as functions + 'no-regex-spaces': 2, // disallow multiple spaces in a regular expression literal + 'no-sparse-arrays': 2, // disallow sparse arrays + 'no-unreachable': 2, // disallow unreachable statements after a return, throw, continue, or break statement + 'use-isnan': 2, // disallow comparisons with the value NaN + 'valid-jsdoc': 0, // Ensure JSDoc comments are valid (off by default) + 'valid-typeof': 2, // Ensure that the results of typeof are compared against a valid string + }, }; diff --git a/Renderer.php b/Renderer.php index 126baa85..ab87d2c9 100644 --- a/Renderer.php +++ b/Renderer.php @@ -33,8 +33,6 @@ class Renderer extends AbstractRenderer /** * This method will be called when the engine has finished the source analysis * phase. - * - * @param \PHPMD\Report $report */ public function renderReport(Report $report): void { diff --git a/assets/js/footer_scripts.js b/assets/js/footer_scripts.js index 5002dc87..b987b55b 100644 --- a/assets/js/footer_scripts.js +++ b/assets/js/footer_scripts.js @@ -1,3 +1,4 @@ +/** globals stateObj */ function historyApiBack() { window.history && window.history.back(); } @@ -32,6 +33,7 @@ $.ready window.parent.location.origin + (stateObj.subfolder || ''); if (stateObj.serverSide) { + // @ts-ignore let dttData = [...new URLSearchParams($('#sqlform').serialize())].reduce( (accum, [key, value]) => { accum[key] = value; @@ -68,16 +70,10 @@ $.ready window.setTimeout(function () { window.parent.location.replace(`${stateObj.basePath}/servers`); }, 3000); - return { jqFn: {}, hljsFn: {} }; + } - if (window.jsTree) { - return { jqFn: jQuery.fn || {}, hljsFn: globalThis.hljs || {} }; - } - if ( - shouldSkipRedirection() || - window.parent.frames.length === 0 || - stateObj.redirect_to === stateObj.parenturl - ) { + + if ( stateObj.method === 'GET' && stateObj.redirect_to !== stateObj.parenturl @@ -90,12 +86,8 @@ $.ready stateObj.redirect_to ); } - return { jqFn: jQuery.fn || {}, hljsFn: globalThis.hljs || {} }; - } else { - //console.log({ stateObj }); - window.parent.location.replace(redirect_to); - } - return { jqFn: {}, hljsFn: {} }; + return { jqFn: jQuery.fn, hljsFn: globalThis.hljs }; + }) .then(({ jqFn, hljsFn }) => { if (jqFn.select2) { @@ -118,7 +110,7 @@ $.ready ); } - return; + return stateObj; }) .catch((err) => { console.error(err); diff --git a/assets/js/toplinks_behavior.js b/assets/js/toplinks_behavior.js index 596f23eb..4ef4c568 100644 --- a/assets/js/toplinks_behavior.js +++ b/assets/js/toplinks_behavior.js @@ -1,4 +1,7 @@ +/// <reference lib="dom" /> + function shouldSkipRedirection() { + return ( window.inPopUp || parent.frames.length || @@ -8,21 +11,12 @@ function shouldSkipRedirection() { ); } -function addBehaviorToTopLinks(amIDetailFrame) { - const parentHandle = - amIDetailFrame && window.parent.document.querySelector('#detail'), - toplink_logout = - amIDetailFrame && - (parentHandle.contentDocument || document).querySelector( - '#toplink_logout' - ); - - parentHandle && - [ - ...(parentHandle.contentDocument || document).querySelectorAll( - '.toplink .toplink_popup' - ), - ].forEach((element) => { +$.ready.then(() => { + + + document.querySelectorAll( + '.toplinks .toplink_popup' + ).forEach((element) => { element.addEventListener('click', (e) => { window.name = 'detail'; window @@ -34,8 +28,9 @@ function addBehaviorToTopLinks(amIDetailFrame) { .focus(); }); }); - toplink_logout && - toplink_logout.addEventListener('click', (e) => { + document.querySelector( + '#toplink_logout' + ).addEventListener('click', (e) => { e.preventDefault(); if (confirm(stateObj.strconfdropcred)) { window.location.href = e.target.getAttribute('rel'); @@ -43,11 +38,6 @@ function addBehaviorToTopLinks(amIDetailFrame) { }); return; -} - -$.ready.then(() => { - let amIDetailFrame = document.body.classList.contains('detailbody'); - if (shouldSkipRedirection()) { - return addBehaviorToTopLinks(true || amIDetailFrame); - } + + }); diff --git a/assets/sw.js b/assets/sw.js index 70d2c93a..55f213a0 100644 --- a/assets/sw.js +++ b/assets/sw.js @@ -5,7 +5,7 @@ const { registerRoute } = workbox.routing; const { CacheFirst, StaleWhileRevalidate } = workbox.strategies; const { ExpirationPlugin } = workbox.expiration; -self.__precacheManifest = [].concat([{"revision":"7f7f3b73b863ab0db2800b0cc9d87f22","url":"images/themes/bootstrap/Favicon.ico"},{"revision":"8dbc90cfbfd4d9a2f5a3e7c5924771ee","url":"images/themes/bootstrap/Introduction.png"},{"revision":"6987da08785938281c0cef64a08e3263","url":"images/themes/bootstrap/logo.png"},{"revision":"6987da08785938281c0cef64a08e3263","url":"images/themes/bootstrap/title.png"},{"revision":"0836efcda7efd8f7143e6bc944fb2ae1","url":"images/themes/cappuccino/inputbckg.png"},{"revision":"4c6ad5374b9518299739fb8f6c0f0dcf","url":"images/themes/cappuccino/Lminus.png"},{"revision":"0e918eec776f591e565f252bbb3935d1","url":"images/themes/cappuccino/Lplus.png"},{"revision":"35fec4ef79e5c77f884c28db9d646ff8","url":"images/themes/cappuccino/openListe.png"},{"revision":"256583a0062c189786a788f550e4833e","url":"images/themes/cappuccino/title.png"},{"revision":"fd64d87ca98273a08a689508c15e21d0","url":"images/themes/cappuccino/Tminus.png"},{"revision":"6be509ad6d0bdf6f5f4bb0112a28a9c4","url":"images/themes/cappuccino/Tplus.png"},{"revision":"5783c8524fa7f4daff4f1ef7bcb4bfb9","url":"images/themes/default/AddArguments.png"},{"revision":"a82687f9d571988c5a50cd1c4c85e245","url":"images/themes/default/Admin.png"},{"revision":"ff0166451279bef06132ca55d2b13bb3","url":"images/themes/default/Aggregate.png"},{"revision":"480dca5e5fa1bef15990e13f7299ac9a","url":"images/themes/default/Aggregates.png"},{"revision":"c8e3e86ffd0a4d7370e08388352fcc53","url":"images/themes/default/AllUsers.png"},{"revision":"ce257e663eb495ba4d90fc55feb361ff","url":"images/themes/default/AvailableReplicationSet.png"},{"revision":"5ec68e4a7bd37d101bdd202890bfb606","url":"images/themes/default/AvailableSubscription.png"},{"revision":"362dd1ab7684968a9051fb2ffd145a06","url":"images/themes/default/Backup.png"},{"revision":"ff372eacef6cd22aa9a962b1fab6b927","url":"images/themes/default/blank.png"},{"revision":"2b52864370d5111e7a68d3347f0047f4","url":"images/themes/default/Cast.png"},{"revision":"5597d48b8d4b6d0e30762500ced49539","url":"images/themes/default/Casts.png"},{"revision":"12878c160ad2030c33fbe74b9ef4980c","url":"images/themes/default/CheckConstraint.png"},{"revision":"8ffa29a8aadf2e8a78a58f246ecb8f3a","url":"images/themes/default/Cluster.png"},{"revision":"e9a7cd147304fa43da5121aca3aa96bd","url":"images/themes/default/Column.png"},{"revision":"135c695556735ca7bfbec339300d475a","url":"images/themes/default/Columns.png"},{"revision":"a08d098a40f117173b627f279d3e5c84","url":"images/themes/default/Constraints.png"},{"revision":"0f5b34e3477bc7dec9d214c75624618e","url":"images/themes/default/Conversion.png"},{"revision":"34b35cebcc208e56a590de389650c31c","url":"images/themes/default/Conversions.png"},{"revision":"c8f58a82f94ad33c92c4434195211986","url":"images/themes/default/Copy.png"},{"revision":"37d5edb86c49b49e04dc1f31ea61d944","url":"images/themes/default/CorruptedDatabase.png"},{"revision":"13cb3db5b00eb488ea488c11f7ef6c7b","url":"images/themes/default/Cut.png"},{"revision":"f5db4650c1155434dd3395449145e185","url":"images/themes/default/Database.png"},{"revision":"f78fd91345a5f9e6135740c39f94c281","url":"images/themes/default/Databases.png"},{"revision":"01e09c5e6a4dff39c69c69c30e3c2df0","url":"images/themes/default/Definition.png"},{"revision":"909467ce82f287d29b32a3bde5001a98","url":"images/themes/default/Delete.png"},{"revision":"0c7afdc74e664afc728350efdc4f8e54","url":"images/themes/default/DisabledJob.png"},{"revision":"871a020d4cce6841704c1e6465b5ac11","url":"images/themes/default/DisconnectedDatabase.png"},{"revision":"0b2aecfe0a2fefbaa9d153e06a12ce4a","url":"images/themes/default/DisconnectedServer.png"},{"revision":"0573dfc5e4d10eb7d2708dc9be361e1d","url":"images/themes/default/Domain.png"},{"revision":"5bc7b098fd0c94841c7bb39a8d32c3dd","url":"images/themes/default/Domains.png"},{"revision":"075f3f50ae58bea29ea9853ec69f8822","url":"images/themes/default/EnableArgument.png"},{"revision":"cd1bcdc76c1ac1c8d228b3748ed4b469","url":"images/themes/default/Erase.png"},{"revision":"21388b26da2079d313b9df99324550ac","url":"images/themes/default/Execute.png"},{"revision":"0e75ce0c09fce81f44bb6f71faf15fd8","url":"images/themes/default/ExecuteSave.png"},{"revision":"e0e9aa509cbdd8ef731b35fa9a39aa84","url":"images/themes/default/Explain.png"},{"revision":"20d4e370edd5f9da50f168bedc708fe2","url":"images/themes/default/Export.png"},{"revision":"7f7f3b73b863ab0db2800b0cc9d87f22","url":"images/themes/default/Favicon.ico"},{"revision":"6fa649f2cffe185328b703b4a5f69475","url":"images/themes/default/Filter.png"},{"revision":"928e06e119cc3a048912672d40d06abc","url":"images/themes/default/ForeignKey.png"},{"revision":"c13ce81b5e4a3187ce37a55a387cbd8e","url":"images/themes/default/Fts.png"},{"revision":"78a5c183c4ec2f68fa2c124f11df71ad","url":"images/themes/default/FtsCfg.png"},{"revision":"72795d6e7ba1eaa63f4353d075eb551c","url":"images/themes/default/FtsDict.png"},{"revision":"512bc774fedde4b56563c935ea5b6a2d","url":"images/themes/default/FtsParser.png"},{"revision":"d1db8bbd46db17458812fd60ae458b4e","url":"images/themes/default/Function.png"},{"revision":"6c19e68bf4aff2345c62355ae814cd07","url":"images/themes/default/Functions.png"},{"revision":"aee27759d60d8b19aea299c1af78c902","url":"images/themes/default/GurusHint.png"},{"revision":"e599e96f305c61cb374326d49834c990","url":"images/themes/default/Help.png"},{"revision":"dc9c5432bcca789f6e8adcac5fbecb4a","url":"images/themes/default/Histories.png"},{"revision":"bb6651298f7feca614348a277417b679","url":"images/themes/default/History.png"},{"revision":"7fef7f3891268fbd886d3776d4bb18d2","url":"images/themes/default/I.png"},{"revision":"591ac6f7a26a67ae9485c9ea5f53bfbe","url":"images/themes/default/Import.png"},{"revision":"50d5f45d81511368d878756d6c26f47d","url":"images/themes/default/Index.png"},{"revision":"68100f02b944c3e5814ad9ad679c0169","url":"images/themes/default/Indexes.png"},{"revision":"8dbc90cfbfd4d9a2f5a3e7c5924771ee","url":"images/themes/default/Introduction.png"},{"revision":"0b6670ea8590f013806ad04e139a4d9e","url":"images/themes/default/Job.png"},{"revision":"7c5f31d0ac216e9f90c661e98dba2856","url":"images/themes/default/Jobs.png"},{"revision":"932e67636e6acbb814a2dded608bb652","url":"images/themes/default/Key.png"},{"revision":"e151369d672d2e2cc6f647be2f736e8f","url":"images/themes/default/L.png"},{"revision":"20938113d067cff7a6ff773f75e07491","url":"images/themes/default/Language.png"},{"revision":"ac48fd0fdc93ad3f1928cccb9c9e028e","url":"images/themes/default/Languages.png"},{"revision":"788ee2492ef829b80cfba68d56f14430","url":"images/themes/default/Listen.png"},{"revision":"c529a6fda4b2e2a375f7e5f51e577120","url":"images/themes/default/Listens.png"},{"revision":"d25bce2a91933a53b40ec210c7323372","url":"images/themes/default/Lminus.png"},{"revision":"af1d523a137ef9b2005411770f454b2e","url":"images/themes/default/Loading.gif"},{"revision":"1f099fbed522a3980847f07bcc4573ae","url":"images/themes/default/LowerArgument.png"},{"revision":"b42f13fbc6d7701cd1bb7d827c3113ca","url":"images/themes/default/Lplus.png"},{"revision":"a6cdad27aed2812de33ff2d45e00385b","url":"images/themes/default/MViews.png"},{"revision":"1c8e6ef452ff7a9770047b469c85a05c","url":"images/themes/default/Node.png"},{"revision":"e3f4f6d43a689035a2208662e933f5ea","url":"images/themes/default/Nodes.png"},{"revision":"8534caffcf3d558648a0662245e2fc3d","url":"images/themes/default/ObjectNotFound.png"},{"revision":"adc078de3c9e353b75640c2e180d20e6","url":"images/themes/default/OfferedReplicationSet.png"},{"revision":"768fc20465c6354398625c4ed5c85cb4","url":"images/themes/default/OfferedSubscription.png"},{"revision":"92bb01a30f897095adb2f98c0036b9e9","url":"images/themes/default/Open.png"},{"revision":"fb73b5a1f6499159043e5b20dc3285db","url":"images/themes/default/Operator.png"},{"revision":"a9b82cc57bf520190315ddbc833e64c7","url":"images/themes/default/OperatorClass.png"},{"revision":"b94fc3a6153d8fb2e261ec454d69a252","url":"images/themes/default/OperatorClasses.png"},{"revision":"c5cb1662b9cbf877de8cb08d0c8bc4cb","url":"images/themes/default/Operators.png"},{"revision":"db9d9333b530c266bab387ae076a5ada","url":"images/themes/default/Paste.png"},{"revision":"f888ffe2c6ab9c59d45ee07ae6199f4a","url":"images/themes/default/Path.png"},{"revision":"737c12988806ad60b5a5aec244920709","url":"images/themes/default/Paths.png"},{"revision":"d0744174f9db9929b5be155c9f603e01","url":"images/themes/default/PrimaryKey.png"},{"revision":"1f27241c0f520a279d3665028024b45e","url":"images/themes/default/Privileges.png"},{"revision":"bf5538bb0bd23ed8c209997766dac284","url":"images/themes/default/Processes.png"},{"revision":"9bfdb2725bc9facafe90474d2c364c8f","url":"images/themes/default/Property.png"},{"revision":"e7f18a3dea3acd7e3333cd8f95e3fcce","url":"images/themes/default/RaiseArgument.png"},{"revision":"acd2ad85dbbd2bf5b71c0062b167b139","url":"images/themes/default/Record.png"},{"revision":"878ff904362c9b59e2d6f6ac93ecc4b8","url":"images/themes/default/Records.png"},{"revision":"a169b03df76e87e44c45757f6a168e61","url":"images/themes/default/Redo.png"},{"revision":"cf51d096cc572377189c2bc884936b78","url":"images/themes/default/Refresh.png"},{"revision":"8d804ee75dfd7b8f3ac98b218a847d54","url":"images/themes/default/RemoveArgument.png"},{"revision":"cdd35ed8aa98e9b0d356effb0d74548b","url":"images/themes/default/Replication.png"},{"revision":"7d5e0bff7082704171013afd322821d4","url":"images/themes/default/ReplicationSets.png"},{"revision":"94b8007abc4354fd4cdbdbcd6087bea7","url":"images/themes/default/Restore.png"},{"revision":"f1c25bb9e2a4eb52d9c6ea52545ede2d","url":"images/themes/default/Roles.png"},{"revision":"565c4b37066f23c5a08d428f2592ee7b","url":"images/themes/default/Rule.png"},{"revision":"18fed3c727afc31e40941828697047ad","url":"images/themes/default/Rules.png"},{"revision":"b5a94436bc66832e0498de05bd72b23e","url":"images/themes/default/Save.png"},{"revision":"e2af41bef5d952cb6887723bc3e5921c","url":"images/themes/default/Schedule.png"},{"revision":"2b7a924ed6a9074d4102a547772750bc","url":"images/themes/default/Schedules.png"},{"revision":"18b2e143c60c9ef3813032bb45310e67","url":"images/themes/default/Schema.png"},{"revision":"b9fe50541e03c0b6e503b4ac1e65ddf1","url":"images/themes/default/Schemas.png"},{"revision":"9cf1fe46d6b8fd3ba257d46a3d05965d","url":"images/themes/default/Search.png"},{"revision":"4bfa8c4668036788458732d85630f931","url":"images/themes/default/Sequence.png"},{"revision":"c4bb32230118c69cf6bab8617ef62b16","url":"images/themes/default/Sequences.png"},{"revision":"bf4a2c360541176e03505124830cddac","url":"images/themes/default/Server.png"},{"revision":"07681bcc17ebc43645d6c1796f5df219","url":"images/themes/default/Servers.png"},{"revision":"df73ed3b7b0a31d266d97f97d5ac5c5a","url":"images/themes/default/SqlEditor.png"},{"revision":"b6d59a3d2b8ad767c54305bc91a8243a","url":"images/themes/default/Statistics.png"},{"revision":"892be7a355b19ffdb0ce39483cd4b6c1","url":"images/themes/default/Step.png"},{"revision":"5f28c19fac73bc0e869caed580a28457","url":"images/themes/default/Steps.png"},{"revision":"ef7050f86e5ace6f4c026057beca7b91","url":"images/themes/default/Stop.png"},{"revision":"065f6490b63a46edee2162a6a76a9131","url":"images/themes/default/Subscriptions.png"},{"revision":"fe196453a6e822e7ebbd23692b35fd5e","url":"images/themes/default/T.png"},{"revision":"edd7db39026ec7c3d78284a319198b8d","url":"images/themes/default/Table.png"},{"revision":"84533f1145926e2d71aafaa4ca1eb1ac","url":"images/themes/default/Tables.png"},{"revision":"4014487f76df092d3f57b6a90a6c96a0","url":"images/themes/default/Tablespace.png"},{"revision":"7d2334e497eee6e5719b25dfa39cfe66","url":"images/themes/default/Tablespaces.png"},{"revision":"6987da08785938281c0cef64a08e3263","url":"images/themes/default/title_blue.png"},{"revision":"27762f17ee6301aac5bb3521d34e142b","url":"images/themes/default/title.png"},{"revision":"eb42ed7ec1597a0a9976fb4198a7ee71","url":"images/themes/default/Tminus.png"},{"revision":"fcfd867d96fa1908bd165c97f4099e74","url":"images/themes/default/Tplus.png"},{"revision":"f827a98b8f30eefac6f9ab47d6ca1f16","url":"images/themes/default/Trigger.png"},{"revision":"9337acb5c8b57422cd0aab291aa706bb","url":"images/themes/default/TriggerFunction.png"},{"revision":"5dc7b60313a7a4f3598050afbddad7d2","url":"images/themes/default/TriggerFunctions.png"},{"revision":"6644a0ddffc0487230295acd19de296c","url":"images/themes/default/Triggers.png"},{"revision":"952a9dae51878f6869b24527bca77b49","url":"images/themes/default/Type.png"},{"revision":"0f1e8651d2422952d224d1657442cc42","url":"images/themes/default/Types.png"},{"revision":"a60bb9589277159b06882458fc54e1a9","url":"images/themes/default/Undo.png"},{"revision":"96ce5e94257ba8115ffb5956e3ed3296","url":"images/themes/default/UniqueConstraint.png"},{"revision":"746e073e551917a29630184eace87c8e","url":"images/themes/default/User.png"},{"revision":"735113096adc5e5a8299a6f6f09c721d","url":"images/themes/default/UserGroup.png"},{"revision":"76c595fe16835a3bf582d0278828fc49","url":"images/themes/default/UserGroups.png"},{"revision":"6dda662436c3178b2a51c306edc1cc89","url":"images/themes/default/Users.png"},{"revision":"c5b6e5d13e4d159cf5893a0abb7cb9df","url":"images/themes/default/Variables.png"},{"revision":"2479afdac6324e368251f9d436a86db0","url":"images/themes/default/View.png"},{"revision":"a8a50a05e97c59f0b6cbd8b123b0a4bd","url":"images/themes/default/Views.png"},{"revision":"6987da08785938281c0cef64a08e3263","url":"images/themes/instaGIS/logo.png"},{"revision":"6a131cd0296e2b877a1adec2e629224e","url":"images/vsizegrip.png"},{"revision":"97f9ebda1b8fb0e35ac35ffce8a5a960","url":"themes/bootstrap/global.css"},{"revision":"6987da08785938281c0cef64a08e3263","url":"themes/bootstrap/title.png"},{"revision":"faeff89daa358a9f481f42e32b77cfc3","url":"themes/cappuccino/global.css"},{"revision":"c49fd9c93fd688a1445a17aa316b09bb","url":"themes/default/global.css"},{"revision":"5c8250610f010714322c923278eccef8","url":"themes/global.css"},{"revision":"c5984fcad101f4b5507718d47780c026","url":"themes/gotar/global.css"},{"revision":"f2798285cd723a94866088997228accc","url":"vendor/codemirror/addon/comment/comment.js"},{"revision":"0374616c52803e22bace5dfabbc0e42f","url":"vendor/codemirror/addon/comment/continuecomment.js"},{"revision":"c89dce10b44d2882a024e7befc2b63f5","url":"vendor/codemirror/addon/dialog/dialog.css"},{"revision":"904554fefae1a2beb0eaad467018af7a","url":"vendor/codemirror/addon/dialog/dialog.js"},{"revision":"a8525e557b32a9ff330db311f444058b","url":"vendor/codemirror/addon/display/autorefresh.js"},{"revision":"1a278e72b51528270f8ce9ec991929a1","url":"vendor/codemirror/addon/display/fullscreen.css"},{"revision":"744a9a476b90075936f58ebb8b35ac85","url":"vendor/codemirror/addon/display/fullscreen.js"},{"revision":"45aa4eb1759d95e5169397df11a0cd79","url":"vendor/codemirror/addon/display/panel.js"},{"revision":"0e8705231c3e7d910611e5cfcfc9145f","url":"vendor/codemirror/addon/display/placeholder.js"},{"revision":"38aaf61e611edfe39883f46f89b0b91b","url":"vendor/codemirror/addon/display/rulers.js"},{"revision":"7138da5915e3a819ea35126930b43402","url":"vendor/codemirror/addon/edit/closebrackets.js"},{"revision":"eb8606363338598e8f3099392a7fa2ce","url":"vendor/codemirror/addon/edit/closetag.js"},{"revision":"cc1c2b9fd1184a4e8b845e4fb09707e1","url":"vendor/codemirror/addon/edit/continuelist.js"},{"revision":"5a44e9d0ad6abe1afd67c48b70d1cbd2","url":"vendor/codemirror/addon/edit/matchbrackets.js"},{"revision":"d0c67185e94d3a096299b680c0fca7d6","url":"vendor/codemirror/addon/edit/matchtags.js"},{"revision":"81d50700cee8c27e0e311de3650851bc","url":"vendor/codemirror/addon/edit/trailingspace.js"},{"revision":"c4850e56d89da48a8625e13ed9a076db","url":"vendor/codemirror/addon/fold/brace-fold.js"},{"revision":"9b289797886789d2ce7f40e3f7408c9e","url":"vendor/codemirror/addon/fold/comment-fold.js"},{"revision":"67922ad2e2c384c5455bfcacdec393d8","url":"vendor/codemirror/addon/fold/foldcode.js"},{"revision":"38bb68770b6f7ebaa7adea770a68e0b1","url":"vendor/codemirror/addon/fold/foldgutter.css"},{"revision":"2e6a4ca9c0f057daaecbc330d8f96bc0","url":"vendor/codemirror/addon/fold/foldgutter.js"},{"revision":"5017f49481f30946bd4229a6d05d5fcc","url":"vendor/codemirror/addon/fold/indent-fold.js"},{"revision":"6e3228db96bbadbb93c79922ecd88ce0","url":"vendor/codemirror/addon/fold/markdown-fold.js"},{"revision":"b88e73a8e7bdc8b032adfd5047dfe2c5","url":"vendor/codemirror/addon/fold/xml-fold.js"},{"revision":"736f4c0aa67db12cf39097f3d1790c8b","url":"vendor/codemirror/addon/hint/anyword-hint.js"},{"revision":"4958c441a7cdf2d39fa6c8bd4b340168","url":"vendor/codemirror/addon/hint/css-hint.js"},{"revision":"51364bfc06c261a20b9ced6606db9580","url":"vendor/codemirror/addon/hint/html-hint.js"},{"revision":"fe11e9d0e373480aa61af6ae86c04dc1","url":"vendor/codemirror/addon/hint/javascript-hint.js"},{"revision":"49647712414ff96d5846de9736b5dbd3","url":"vendor/codemirror/addon/hint/show-hint.css"},{"revision":"2fa9552bd0d701cac634055d17bb130a","url":"vendor/codemirror/addon/hint/show-hint.js"},{"revision":"f66526ad34eaaeee2dca6282961808a8","url":"vendor/codemirror/addon/hint/sql-hint.js"},{"revision":"65cf0f4e6ce510f4a189a0b87d943b8c","url":"vendor/codemirror/addon/hint/xml-hint.js"},{"revision":"140f1a44841627e860cafd955e89f4e7","url":"vendor/codemirror/addon/lint/coffeescript-lint.js"},{"revision":"6a6166008cb94a6d62e05dc2cab7fc16","url":"vendor/codemirror/addon/lint/css-lint.js"},{"revision":"4ce658b4b1c2cacb8a2685effa0ed4eb","url":"vendor/codemirror/addon/lint/html-lint.js"},{"revision":"3db1c5d6629bde3e0a4a694c5cd94065","url":"vendor/codemirror/addon/lint/javascript-lint.js"},{"revision":"dcfd194ca63e175996aaea2b3a58b598","url":"vendor/codemirror/addon/lint/json-lint.js"},{"revision":"80cbf240f7114fb23e506da29cced118","url":"vendor/codemirror/addon/lint/lint.css"},{"revision":"16098bd4d5e62f123cbc4482622e1360","url":"vendor/codemirror/addon/lint/lint.js"},{"revision":"eabad9dfc99d98d6995c37fce194c28c","url":"vendor/codemirror/addon/lint/yaml-lint.js"},{"revision":"d4009e57cbbb2c969147cf233671ba42","url":"vendor/codemirror/addon/merge/merge.css"},{"revision":"001c710b643ececdbaf65328bb3419fc","url":"vendor/codemirror/addon/merge/merge.js"},{"revision":"f8291cb1ca96e29af58def213012655a","url":"vendor/codemirror/addon/mode/loadmode.js"},{"revision":"37963861dd6e41a530a6f84c2b17bdf7","url":"vendor/codemirror/addon/mode/multiplex_test.js"},{"revision":"b132b004f352bf044cd80a9f55731147","url":"vendor/codemirror/addon/mode/multiplex.js"},{"revision":"4f8e4dcaeb7c237cbe4f1f69972cdc8a","url":"vendor/codemirror/addon/mode/overlay.js"},{"revision":"eed15e8b955aaee880af0c819b38fa25","url":"vendor/codemirror/addon/mode/simple.js"},{"revision":"c8fb49ed714798e04bc3d0289b19efa4","url":"vendor/codemirror/addon/runmode/colorize.js"},{"revision":"aa4a42bca69b6f096a18cd51203afe6e","url":"vendor/codemirror/addon/runmode/runmode-standalone.js"},{"revision":"2c0ddde09a9f1f8f5dc9d4f67f03d2f2","url":"vendor/codemirror/addon/runmode/runmode.js"},{"revision":"f3c8c9b85bbeecf3c873e52d3783f39b","url":"vendor/codemirror/addon/runmode/runmode.node.js"},{"revision":"87198e00de438bb7f9afe2e55b6cb4a3","url":"vendor/codemirror/addon/scroll/annotatescrollbar.js"},{"revision":"92a24e9251be0dc620c11cb61919293f","url":"vendor/codemirror/addon/scroll/scrollpastend.js"},{"revision":"0352ba51fd6a422fe6cc44925e33ad88","url":"vendor/codemirror/addon/scroll/simplescrollbars.css"},{"revision":"13948e6ef35e3c3d2c65de096af58721","url":"vendor/codemirror/addon/scroll/simplescrollbars.js"},{"revision":"cf5f2c65e9c8e26841923b5e1a6bf611","url":"vendor/codemirror/addon/search/jump-to-line.js"},{"revision":"ace658d3aaf9d8ae9895ff97dd9eb5ca","url":"vendor/codemirror/addon/search/match-highlighter.js"},{"revision":"00ea2770c568a848190bcf52e4241276","url":"vendor/codemirror/addon/search/matchesonscrollbar.css"},{"revision":"b7dfa5fd6a57e306bf7ce99542819883","url":"vendor/codemirror/addon/search/matchesonscrollbar.js"},{"revision":"1e2c6bec0a25d4e7dea128f048b08931","url":"vendor/codemirror/addon/search/search.js"},{"revision":"fa73eef9cf913ee2d766c8501a582a0c","url":"vendor/codemirror/addon/search/searchcursor.js"},{"revision":"30fc5d6c1847dc207bd0e38c0e97e789","url":"vendor/codemirror/addon/selection/active-line.js"},{"revision":"c0240b66ae29bda93e80be5e60c9ed8d","url":"vendor/codemirror/addon/selection/mark-selection.js"},{"revision":"ae80c5e4d54f8ccb07c6373e66f523a4","url":"vendor/codemirror/addon/selection/selection-pointer.js"},{"revision":"4d57ced774b5f3fa9f00dfa398e74819","url":"vendor/codemirror/addon/tern/tern.css"},{"revision":"f6c76d9ec32faccbb8cf23b7a2f6f917","url":"vendor/codemirror/addon/tern/tern.js"},{"revision":"6866b3b6f236f5ae8b89e15b5cf167e1","url":"vendor/codemirror/addon/tern/worker.js"},{"revision":"359a2bb5a43f724a09f2adbbfe40dd86","url":"vendor/codemirror/addon/wrap/hardwrap.js"},{"revision":"fc217d502b05f65616356459c0ec1d62","url":"vendor/codemirror/lib/codemirror.css"},{"revision":"82b9491f7e4ecd8ce57812ee3f99014f","url":"vendor/codemirror/lib/codemirror.js"},{"revision":"3eb5b33a2d2022c4de839b1980511f54","url":"vendor/codemirror/mode/meta.js"},{"revision":"91f74a33b9232251058426d1e16e9dce","url":"vendor/codemirror/mode/sql/index.html"},{"revision":"d21c7a0e713132429cf903be42310a89","url":"vendor/codemirror/mode/sql/sql.js"},{"revision":"80026250946cff8a6fc0da995aa02566","url":"vendor/datatables/datatables.min.css"},{"revision":"c1e3d63eab27d1aa7beb191d32340bba","url":"vendor/datatables/datatables.min.js"},{"revision":"d7dc10c78f23615d328581aebcd805eb","url":"vendor/datatables/images/sort_asc_disabled.png"},{"revision":"9326ad44ae4bebdedd141e7a53c2a730","url":"vendor/datatables/images/sort_asc.png"},{"revision":"9a6486086d09bb38cf66a57cc559ade3","url":"vendor/datatables/images/sort_both.png"},{"revision":"bda51e15154a18257b4f955a222fd66f","url":"vendor/datatables/images/sort_desc_disabled.png"},{"revision":"1fc418e33fd5a687290258b23fac4e98","url":"vendor/datatables/images/sort_desc.png"},{"revision":"d7dc10c78f23615d328581aebcd805eb","url":"vendor/images/datatables/sort_asc_disabled.png"},{"revision":"9326ad44ae4bebdedd141e7a53c2a730","url":"vendor/images/datatables/sort_asc.png"},{"revision":"9a6486086d09bb38cf66a57cc559ade3","url":"vendor/images/datatables/sort_both.png"},{"revision":"bda51e15154a18257b4f955a222fd66f","url":"vendor/images/datatables/sort_desc_disabled.png"},{"revision":"1fc418e33fd5a687290258b23fac4e98","url":"vendor/images/datatables/sort_desc.png"},{"revision":"1ec88e235979893e9efc355f22a23441","url":"vendor/jquery-resizable.js"},{"revision":"f83a8b8886694eaef4505dd80af7a430","url":"vendor/jquery/images/ui-icons_444444_256x240.png"},{"revision":"220afd743d9e9643852e31a135a9f3ae","url":"vendor/jquery/jquery-3.4.1.min.js"},{"revision":"81188e0c65a0a25d5ebfa7356bf81884","url":"vendor/jquery/jquery-ui.min.css"},{"revision":"8cbf62fc02083afe12a90787cb8f9e3c","url":"vendor/jquery/jquery-ui.min.js"},{"revision":"66cefd86e219c19be9a32b4a9f6f70b2","url":"vendor/jstree/jstree.js"},{"revision":"dc4a6494cf51022fa4a8541d13837166","url":"vendor/jstree/jstree.min.js"},{"revision":"eebaf260766f5e0e773f53d3ea4f3e4d","url":"vendor/jstree/themes/default-dark/32px.png"},{"revision":"51286e68b083696edaf4f9fc577e2a2d","url":"vendor/jstree/themes/default-dark/40px.png"},{"revision":"6791bf1b92e95d10c8445ac010c429df","url":"vendor/jstree/themes/default-dark/style.css"},{"revision":"0236b108a8deddca3b0fae061147a0a6","url":"vendor/jstree/themes/default-dark/style.min.css"},{"revision":"62be6ed2b189444b472b8000dc187240","url":"vendor/jstree/themes/default-dark/throbber.gif"},{"revision":"db49c8de4f267eede40a9a8843efcdec","url":"vendor/jstree/themes/default/32px.png"},{"revision":"1f075735090412ed7eb8077d819b19c6","url":"vendor/jstree/themes/default/40px.png"},{"revision":"0cf1fc2eadda48373db31569a791ae29","url":"vendor/jstree/themes/default/style.css"},{"revision":"8f65ba57d02eadb0c75d0623190d1ee8","url":"vendor/jstree/themes/default/style.min.css"},{"revision":"9ed4669f524bec38319be63a2ee4ba26","url":"vendor/jstree/themes/default/throbber.gif"},{"revision":"230b82ca8561d9b4111ba8102cae2bb6","url":"vendor/jstree/themes/phppgadmin/32px.png"},{"revision":"1f075735090412ed7eb8077d819b19c6","url":"vendor/jstree/themes/phppgadmin/40px.png"},{"revision":"f5a9ca92f2b904247c7b83ce4b054481","url":"vendor/jstree/themes/phppgadmin/style.css"},{"revision":"8f65ba57d02eadb0c75d0623190d1ee8","url":"vendor/jstree/themes/phppgadmin/style.min.css"},{"revision":"9ed4669f524bec38319be63a2ee4ba26","url":"vendor/jstree/themes/phppgadmin/throbber.gif"},{"revision":"887b34f2cf309344f3e0b96aaab2b15d","url":"vendor/select2/css/select2.css"},{"revision":"d44571114a90b9226cd654d3c7d9442c","url":"vendor/select2/css/select2.min.css"},{"revision":"a8bb27ec698c86bde72c8a6f13a8e9b4","url":"vendor/select2/js/i18n/ar.js"},{"revision":"498dc667b34eb0fddc31c4e92330d1aa","url":"vendor/select2/js/i18n/az.js"},{"revision":"89cba4df3c8694fcb33098dd1646cac1","url":"vendor/select2/js/i18n/bg.js"},{"revision":"2eaad4eb1950a0d542812c58d30c93dd","url":"vendor/select2/js/i18n/ca.js"},{"revision":"a68bcd293adcd6d9ac0b8527c9b39189","url":"vendor/select2/js/i18n/cs.js"},{"revision":"cbf897a0ae53b0cffbbe3f50d8b1b136","url":"vendor/select2/js/i18n/da.js"},{"revision":"366d0aacb55f4929cc50bb977abec674","url":"vendor/select2/js/i18n/de.js"},{"revision":"5629ce65500f96c62414a27c6eaed62c","url":"vendor/select2/js/i18n/el.js"},{"revision":"05649b26c08630d2b703bc1e9ef93c7b","url":"vendor/select2/js/i18n/en.js"},{"revision":"dc9dbf9d65df3f69e6b6d650c97bd967","url":"vendor/select2/js/i18n/es.js"},{"revision":"c3953fb90b6bb9669697f5f12e802a66","url":"vendor/select2/js/i18n/et.js"},{"revision":"11b925456433eaab07e35b8dca7046f5","url":"vendor/select2/js/i18n/eu.js"},{"revision":"98e52839b583e1ca66f4360a4f43f9b0","url":"vendor/select2/js/i18n/fa.js"},{"revision":"659847deefdcfd7e4f8f2ed924d360f4","url":"vendor/select2/js/i18n/fi.js"},{"revision":"b06a3340de45535358a0bc33fa2b9739","url":"vendor/select2/js/i18n/fr.js"},{"revision":"78a87f7c0a519118fbe4f583ff2a3b3f","url":"vendor/select2/js/i18n/gl.js"},{"revision":"222d90ee0344ee8beeb5fb1835c93c76","url":"vendor/select2/js/i18n/he.js"},{"revision":"116a90b7111b953cd092e30a034d6913","url":"vendor/select2/js/i18n/hi.js"},{"revision":"e1d2c70b4df50d98d2c35856804d38be","url":"vendor/select2/js/i18n/hr.js"},{"revision":"db45641f10b2412801d5872e40ef7c2f","url":"vendor/select2/js/i18n/hu.js"},{"revision":"6ee6c9c64b945bb8a0f42d247ee0d868","url":"vendor/select2/js/i18n/id.js"},{"revision":"808c7d47acb59537728bc74fdeb0ad0d","url":"vendor/select2/js/i18n/is.js"},{"revision":"bae1661dbb77c15384655faffc10a3fa","url":"vendor/select2/js/i18n/it.js"},{"revision":"19cf1ce8a03de84ea668e8fec99a8c80","url":"vendor/select2/js/i18n/ja.js"},{"revision":"6074a9c5575cfaa8b3c1dccdb3133dde","url":"vendor/select2/js/i18n/km.js"},{"revision":"74b17541834ff1bb8c5651d321bd2281","url":"vendor/select2/js/i18n/ko.js"},{"revision":"a0783b1bd1594b7c584564cc68b6c6e5","url":"vendor/select2/js/i18n/lt.js"},{"revision":"07fe2a580d17cba308a972fdabbcaea0","url":"vendor/select2/js/i18n/lv.js"},{"revision":"4986d7fc3ff3ed9a5f8af646f5ca587b","url":"vendor/select2/js/i18n/mk.js"},{"revision":"23e7b436957996a10f451bc8d688764d","url":"vendor/select2/js/i18n/ms.js"},{"revision":"137e184004aaec03977a4caf1cca30f4","url":"vendor/select2/js/i18n/nb.js"},{"revision":"c363ace8aa0501526c17a61ab2fb854f","url":"vendor/select2/js/i18n/nl.js"},{"revision":"76465b54a6b0eb6b2204143a0827d0ca","url":"vendor/select2/js/i18n/pl.js"},{"revision":"9efbbac4fda8d23225df16dddecb2718","url":"vendor/select2/js/i18n/pt-BR.js"},{"revision":"5d6ccc53b347b155e1af6afb1bc5fe94","url":"vendor/select2/js/i18n/pt.js"},{"revision":"1ddc2b9980dcdd1008761149e0349a8b","url":"vendor/select2/js/i18n/ro.js"},{"revision":"d83609abf2e0ba927b9ec472bf47e180","url":"vendor/select2/js/i18n/ru.js"},{"revision":"a0f1a818d09228a87ae105d09fdee80c","url":"vendor/select2/js/i18n/sk.js"},{"revision":"2f3047aad49eedd75dd5dacc092a7e02","url":"vendor/select2/js/i18n/sr-Cyrl.js"},{"revision":"157bc6eb978e9a35985bc655d09ac258","url":"vendor/select2/js/i18n/sr.js"},{"revision":"2b21bb3f61100fd656b41d16e25e2f80","url":"vendor/select2/js/i18n/sv.js"},{"revision":"2a4ece4c4355b7efd9e9591a53b3edc1","url":"vendor/select2/js/i18n/th.js"},{"revision":"c1925d8817db211164145dc47b18d333","url":"vendor/select2/js/i18n/tr.js"},{"revision":"3d56f311192daf9ce44246c52777789f","url":"vendor/select2/js/i18n/uk.js"},{"revision":"3520aa7bdea8234161b2c18f631417a0","url":"vendor/select2/js/i18n/vi.js"},{"revision":"419002d3c6c10ec9618ce6275c1057d1","url":"vendor/select2/js/i18n/zh-CN.js"},{"revision":"c021537edf2c555f149509150ff986e3","url":"vendor/select2/js/i18n/zh-TW.js"},{"revision":"a95323cb476000ee17d7a252786df963","url":"vendor/select2/js/select2.full.js"},{"revision":"da607360bcc65284a197ada3d68d5439","url":"vendor/select2/js/select2.full.min.js"},{"revision":"b8f26dd6733ccc6263cb273e8f821dab","url":"vendor/select2/js/select2.js"},{"revision":"e87ca4c3554f7b9e693605ce12d3a234","url":"vendor/select2/js/select2.min.js"}] || []); +self.__precacheManifest = [].concat([{"revision":"7f7f3b73b863ab0db2800b0cc9d87f22","url":"images/themes/bootstrap/Favicon.ico"},{"revision":"8dbc90cfbfd4d9a2f5a3e7c5924771ee","url":"images/themes/bootstrap/Introduction.png"},{"revision":"6987da08785938281c0cef64a08e3263","url":"images/themes/bootstrap/logo.png"},{"revision":"6987da08785938281c0cef64a08e3263","url":"images/themes/bootstrap/title.png"},{"revision":"0836efcda7efd8f7143e6bc944fb2ae1","url":"images/themes/cappuccino/inputbckg.png"},{"revision":"4c6ad5374b9518299739fb8f6c0f0dcf","url":"images/themes/cappuccino/Lminus.png"},{"revision":"0e918eec776f591e565f252bbb3935d1","url":"images/themes/cappuccino/Lplus.png"},{"revision":"35fec4ef79e5c77f884c28db9d646ff8","url":"images/themes/cappuccino/openListe.png"},{"revision":"256583a0062c189786a788f550e4833e","url":"images/themes/cappuccino/title.png"},{"revision":"fd64d87ca98273a08a689508c15e21d0","url":"images/themes/cappuccino/Tminus.png"},{"revision":"6be509ad6d0bdf6f5f4bb0112a28a9c4","url":"images/themes/cappuccino/Tplus.png"},{"revision":"5783c8524fa7f4daff4f1ef7bcb4bfb9","url":"images/themes/default/AddArguments.png"},{"revision":"a82687f9d571988c5a50cd1c4c85e245","url":"images/themes/default/Admin.png"},{"revision":"ff0166451279bef06132ca55d2b13bb3","url":"images/themes/default/Aggregate.png"},{"revision":"480dca5e5fa1bef15990e13f7299ac9a","url":"images/themes/default/Aggregates.png"},{"revision":"c8e3e86ffd0a4d7370e08388352fcc53","url":"images/themes/default/AllUsers.png"},{"revision":"ce257e663eb495ba4d90fc55feb361ff","url":"images/themes/default/AvailableReplicationSet.png"},{"revision":"5ec68e4a7bd37d101bdd202890bfb606","url":"images/themes/default/AvailableSubscription.png"},{"revision":"362dd1ab7684968a9051fb2ffd145a06","url":"images/themes/default/Backup.png"},{"revision":"ff372eacef6cd22aa9a962b1fab6b927","url":"images/themes/default/blank.png"},{"revision":"2b52864370d5111e7a68d3347f0047f4","url":"images/themes/default/Cast.png"},{"revision":"5597d48b8d4b6d0e30762500ced49539","url":"images/themes/default/Casts.png"},{"revision":"12878c160ad2030c33fbe74b9ef4980c","url":"images/themes/default/CheckConstraint.png"},{"revision":"8ffa29a8aadf2e8a78a58f246ecb8f3a","url":"images/themes/default/Cluster.png"},{"revision":"e9a7cd147304fa43da5121aca3aa96bd","url":"images/themes/default/Column.png"},{"revision":"135c695556735ca7bfbec339300d475a","url":"images/themes/default/Columns.png"},{"revision":"a08d098a40f117173b627f279d3e5c84","url":"images/themes/default/Constraints.png"},{"revision":"0f5b34e3477bc7dec9d214c75624618e","url":"images/themes/default/Conversion.png"},{"revision":"34b35cebcc208e56a590de389650c31c","url":"images/themes/default/Conversions.png"},{"revision":"c8f58a82f94ad33c92c4434195211986","url":"images/themes/default/Copy.png"},{"revision":"37d5edb86c49b49e04dc1f31ea61d944","url":"images/themes/default/CorruptedDatabase.png"},{"revision":"13cb3db5b00eb488ea488c11f7ef6c7b","url":"images/themes/default/Cut.png"},{"revision":"f5db4650c1155434dd3395449145e185","url":"images/themes/default/Database.png"},{"revision":"f78fd91345a5f9e6135740c39f94c281","url":"images/themes/default/Databases.png"},{"revision":"01e09c5e6a4dff39c69c69c30e3c2df0","url":"images/themes/default/Definition.png"},{"revision":"909467ce82f287d29b32a3bde5001a98","url":"images/themes/default/Delete.png"},{"revision":"0c7afdc74e664afc728350efdc4f8e54","url":"images/themes/default/DisabledJob.png"},{"revision":"871a020d4cce6841704c1e6465b5ac11","url":"images/themes/default/DisconnectedDatabase.png"},{"revision":"0b2aecfe0a2fefbaa9d153e06a12ce4a","url":"images/themes/default/DisconnectedServer.png"},{"revision":"0573dfc5e4d10eb7d2708dc9be361e1d","url":"images/themes/default/Domain.png"},{"revision":"5bc7b098fd0c94841c7bb39a8d32c3dd","url":"images/themes/default/Domains.png"},{"revision":"075f3f50ae58bea29ea9853ec69f8822","url":"images/themes/default/EnableArgument.png"},{"revision":"cd1bcdc76c1ac1c8d228b3748ed4b469","url":"images/themes/default/Erase.png"},{"revision":"21388b26da2079d313b9df99324550ac","url":"images/themes/default/Execute.png"},{"revision":"0e75ce0c09fce81f44bb6f71faf15fd8","url":"images/themes/default/ExecuteSave.png"},{"revision":"e0e9aa509cbdd8ef731b35fa9a39aa84","url":"images/themes/default/Explain.png"},{"revision":"20d4e370edd5f9da50f168bedc708fe2","url":"images/themes/default/Export.png"},{"revision":"7f7f3b73b863ab0db2800b0cc9d87f22","url":"images/themes/default/Favicon.ico"},{"revision":"6fa649f2cffe185328b703b4a5f69475","url":"images/themes/default/Filter.png"},{"revision":"928e06e119cc3a048912672d40d06abc","url":"images/themes/default/ForeignKey.png"},{"revision":"c13ce81b5e4a3187ce37a55a387cbd8e","url":"images/themes/default/Fts.png"},{"revision":"78a5c183c4ec2f68fa2c124f11df71ad","url":"images/themes/default/FtsCfg.png"},{"revision":"72795d6e7ba1eaa63f4353d075eb551c","url":"images/themes/default/FtsDict.png"},{"revision":"512bc774fedde4b56563c935ea5b6a2d","url":"images/themes/default/FtsParser.png"},{"revision":"d1db8bbd46db17458812fd60ae458b4e","url":"images/themes/default/Function.png"},{"revision":"6c19e68bf4aff2345c62355ae814cd07","url":"images/themes/default/Functions.png"},{"revision":"aee27759d60d8b19aea299c1af78c902","url":"images/themes/default/GurusHint.png"},{"revision":"e599e96f305c61cb374326d49834c990","url":"images/themes/default/Help.png"},{"revision":"dc9c5432bcca789f6e8adcac5fbecb4a","url":"images/themes/default/Histories.png"},{"revision":"bb6651298f7feca614348a277417b679","url":"images/themes/default/History.png"},{"revision":"7fef7f3891268fbd886d3776d4bb18d2","url":"images/themes/default/I.png"},{"revision":"591ac6f7a26a67ae9485c9ea5f53bfbe","url":"images/themes/default/Import.png"},{"revision":"50d5f45d81511368d878756d6c26f47d","url":"images/themes/default/Index.png"},{"revision":"68100f02b944c3e5814ad9ad679c0169","url":"images/themes/default/Indexes.png"},{"revision":"8dbc90cfbfd4d9a2f5a3e7c5924771ee","url":"images/themes/default/Introduction.png"},{"revision":"0b6670ea8590f013806ad04e139a4d9e","url":"images/themes/default/Job.png"},{"revision":"7c5f31d0ac216e9f90c661e98dba2856","url":"images/themes/default/Jobs.png"},{"revision":"932e67636e6acbb814a2dded608bb652","url":"images/themes/default/Key.png"},{"revision":"e151369d672d2e2cc6f647be2f736e8f","url":"images/themes/default/L.png"},{"revision":"20938113d067cff7a6ff773f75e07491","url":"images/themes/default/Language.png"},{"revision":"ac48fd0fdc93ad3f1928cccb9c9e028e","url":"images/themes/default/Languages.png"},{"revision":"788ee2492ef829b80cfba68d56f14430","url":"images/themes/default/Listen.png"},{"revision":"c529a6fda4b2e2a375f7e5f51e577120","url":"images/themes/default/Listens.png"},{"revision":"d25bce2a91933a53b40ec210c7323372","url":"images/themes/default/Lminus.png"},{"revision":"af1d523a137ef9b2005411770f454b2e","url":"images/themes/default/Loading.gif"},{"revision":"1f099fbed522a3980847f07bcc4573ae","url":"images/themes/default/LowerArgument.png"},{"revision":"b42f13fbc6d7701cd1bb7d827c3113ca","url":"images/themes/default/Lplus.png"},{"revision":"a6cdad27aed2812de33ff2d45e00385b","url":"images/themes/default/MViews.png"},{"revision":"1c8e6ef452ff7a9770047b469c85a05c","url":"images/themes/default/Node.png"},{"revision":"e3f4f6d43a689035a2208662e933f5ea","url":"images/themes/default/Nodes.png"},{"revision":"8534caffcf3d558648a0662245e2fc3d","url":"images/themes/default/ObjectNotFound.png"},{"revision":"adc078de3c9e353b75640c2e180d20e6","url":"images/themes/default/OfferedReplicationSet.png"},{"revision":"768fc20465c6354398625c4ed5c85cb4","url":"images/themes/default/OfferedSubscription.png"},{"revision":"92bb01a30f897095adb2f98c0036b9e9","url":"images/themes/default/Open.png"},{"revision":"fb73b5a1f6499159043e5b20dc3285db","url":"images/themes/default/Operator.png"},{"revision":"a9b82cc57bf520190315ddbc833e64c7","url":"images/themes/default/OperatorClass.png"},{"revision":"b94fc3a6153d8fb2e261ec454d69a252","url":"images/themes/default/OperatorClasses.png"},{"revision":"c5cb1662b9cbf877de8cb08d0c8bc4cb","url":"images/themes/default/Operators.png"},{"revision":"db9d9333b530c266bab387ae076a5ada","url":"images/themes/default/Paste.png"},{"revision":"f888ffe2c6ab9c59d45ee07ae6199f4a","url":"images/themes/default/Path.png"},{"revision":"737c12988806ad60b5a5aec244920709","url":"images/themes/default/Paths.png"},{"revision":"d0744174f9db9929b5be155c9f603e01","url":"images/themes/default/PrimaryKey.png"},{"revision":"1f27241c0f520a279d3665028024b45e","url":"images/themes/default/Privileges.png"},{"revision":"bf5538bb0bd23ed8c209997766dac284","url":"images/themes/default/Processes.png"},{"revision":"9bfdb2725bc9facafe90474d2c364c8f","url":"images/themes/default/Property.png"},{"revision":"e7f18a3dea3acd7e3333cd8f95e3fcce","url":"images/themes/default/RaiseArgument.png"},{"revision":"acd2ad85dbbd2bf5b71c0062b167b139","url":"images/themes/default/Record.png"},{"revision":"878ff904362c9b59e2d6f6ac93ecc4b8","url":"images/themes/default/Records.png"},{"revision":"a169b03df76e87e44c45757f6a168e61","url":"images/themes/default/Redo.png"},{"revision":"cf51d096cc572377189c2bc884936b78","url":"images/themes/default/Refresh.png"},{"revision":"8d804ee75dfd7b8f3ac98b218a847d54","url":"images/themes/default/RemoveArgument.png"},{"revision":"cdd35ed8aa98e9b0d356effb0d74548b","url":"images/themes/default/Replication.png"},{"revision":"7d5e0bff7082704171013afd322821d4","url":"images/themes/default/ReplicationSets.png"},{"revision":"94b8007abc4354fd4cdbdbcd6087bea7","url":"images/themes/default/Restore.png"},{"revision":"f1c25bb9e2a4eb52d9c6ea52545ede2d","url":"images/themes/default/Roles.png"},{"revision":"565c4b37066f23c5a08d428f2592ee7b","url":"images/themes/default/Rule.png"},{"revision":"18fed3c727afc31e40941828697047ad","url":"images/themes/default/Rules.png"},{"revision":"b5a94436bc66832e0498de05bd72b23e","url":"images/themes/default/Save.png"},{"revision":"e2af41bef5d952cb6887723bc3e5921c","url":"images/themes/default/Schedule.png"},{"revision":"2b7a924ed6a9074d4102a547772750bc","url":"images/themes/default/Schedules.png"},{"revision":"18b2e143c60c9ef3813032bb45310e67","url":"images/themes/default/Schema.png"},{"revision":"b9fe50541e03c0b6e503b4ac1e65ddf1","url":"images/themes/default/Schemas.png"},{"revision":"9cf1fe46d6b8fd3ba257d46a3d05965d","url":"images/themes/default/Search.png"},{"revision":"4bfa8c4668036788458732d85630f931","url":"images/themes/default/Sequence.png"},{"revision":"c4bb32230118c69cf6bab8617ef62b16","url":"images/themes/default/Sequences.png"},{"revision":"bf4a2c360541176e03505124830cddac","url":"images/themes/default/Server.png"},{"revision":"07681bcc17ebc43645d6c1796f5df219","url":"images/themes/default/Servers.png"},{"revision":"df73ed3b7b0a31d266d97f97d5ac5c5a","url":"images/themes/default/SqlEditor.png"},{"revision":"b6d59a3d2b8ad767c54305bc91a8243a","url":"images/themes/default/Statistics.png"},{"revision":"892be7a355b19ffdb0ce39483cd4b6c1","url":"images/themes/default/Step.png"},{"revision":"5f28c19fac73bc0e869caed580a28457","url":"images/themes/default/Steps.png"},{"revision":"ef7050f86e5ace6f4c026057beca7b91","url":"images/themes/default/Stop.png"},{"revision":"065f6490b63a46edee2162a6a76a9131","url":"images/themes/default/Subscriptions.png"},{"revision":"fe196453a6e822e7ebbd23692b35fd5e","url":"images/themes/default/T.png"},{"revision":"edd7db39026ec7c3d78284a319198b8d","url":"images/themes/default/Table.png"},{"revision":"84533f1145926e2d71aafaa4ca1eb1ac","url":"images/themes/default/Tables.png"},{"revision":"4014487f76df092d3f57b6a90a6c96a0","url":"images/themes/default/Tablespace.png"},{"revision":"7d2334e497eee6e5719b25dfa39cfe66","url":"images/themes/default/Tablespaces.png"},{"revision":"6987da08785938281c0cef64a08e3263","url":"images/themes/default/title_blue.png"},{"revision":"27762f17ee6301aac5bb3521d34e142b","url":"images/themes/default/title.png"},{"revision":"eb42ed7ec1597a0a9976fb4198a7ee71","url":"images/themes/default/Tminus.png"},{"revision":"fcfd867d96fa1908bd165c97f4099e74","url":"images/themes/default/Tplus.png"},{"revision":"f827a98b8f30eefac6f9ab47d6ca1f16","url":"images/themes/default/Trigger.png"},{"revision":"9337acb5c8b57422cd0aab291aa706bb","url":"images/themes/default/TriggerFunction.png"},{"revision":"5dc7b60313a7a4f3598050afbddad7d2","url":"images/themes/default/TriggerFunctions.png"},{"revision":"6644a0ddffc0487230295acd19de296c","url":"images/themes/default/Triggers.png"},{"revision":"952a9dae51878f6869b24527bca77b49","url":"images/themes/default/Type.png"},{"revision":"0f1e8651d2422952d224d1657442cc42","url":"images/themes/default/Types.png"},{"revision":"a60bb9589277159b06882458fc54e1a9","url":"images/themes/default/Undo.png"},{"revision":"96ce5e94257ba8115ffb5956e3ed3296","url":"images/themes/default/UniqueConstraint.png"},{"revision":"746e073e551917a29630184eace87c8e","url":"images/themes/default/User.png"},{"revision":"735113096adc5e5a8299a6f6f09c721d","url":"images/themes/default/UserGroup.png"},{"revision":"76c595fe16835a3bf582d0278828fc49","url":"images/themes/default/UserGroups.png"},{"revision":"6dda662436c3178b2a51c306edc1cc89","url":"images/themes/default/Users.png"},{"revision":"c5b6e5d13e4d159cf5893a0abb7cb9df","url":"images/themes/default/Variables.png"},{"revision":"2479afdac6324e368251f9d436a86db0","url":"images/themes/default/View.png"},{"revision":"a8a50a05e97c59f0b6cbd8b123b0a4bd","url":"images/themes/default/Views.png"},{"revision":"6987da08785938281c0cef64a08e3263","url":"images/themes/instaGIS/logo.png"},{"revision":"6a131cd0296e2b877a1adec2e629224e","url":"images/vsizegrip.png"},{"revision":"97f9ebda1b8fb0e35ac35ffce8a5a960","url":"themes/bootstrap/global.css"},{"revision":"6987da08785938281c0cef64a08e3263","url":"themes/bootstrap/title.png"},{"revision":"faeff89daa358a9f481f42e32b77cfc3","url":"themes/cappuccino/global.css"},{"revision":"c49fd9c93fd688a1445a17aa316b09bb","url":"themes/default/global.css"},{"revision":"acdfa4dd5c877786b02edb7d0cd6f1da","url":"themes/global.css"},{"revision":"c5984fcad101f4b5507718d47780c026","url":"themes/gotar/global.css"},{"revision":"f2798285cd723a94866088997228accc","url":"vendor/codemirror/addon/comment/comment.js"},{"revision":"0374616c52803e22bace5dfabbc0e42f","url":"vendor/codemirror/addon/comment/continuecomment.js"},{"revision":"c89dce10b44d2882a024e7befc2b63f5","url":"vendor/codemirror/addon/dialog/dialog.css"},{"revision":"904554fefae1a2beb0eaad467018af7a","url":"vendor/codemirror/addon/dialog/dialog.js"},{"revision":"a8525e557b32a9ff330db311f444058b","url":"vendor/codemirror/addon/display/autorefresh.js"},{"revision":"1a278e72b51528270f8ce9ec991929a1","url":"vendor/codemirror/addon/display/fullscreen.css"},{"revision":"744a9a476b90075936f58ebb8b35ac85","url":"vendor/codemirror/addon/display/fullscreen.js"},{"revision":"45aa4eb1759d95e5169397df11a0cd79","url":"vendor/codemirror/addon/display/panel.js"},{"revision":"0e8705231c3e7d910611e5cfcfc9145f","url":"vendor/codemirror/addon/display/placeholder.js"},{"revision":"38aaf61e611edfe39883f46f89b0b91b","url":"vendor/codemirror/addon/display/rulers.js"},{"revision":"7138da5915e3a819ea35126930b43402","url":"vendor/codemirror/addon/edit/closebrackets.js"},{"revision":"eb8606363338598e8f3099392a7fa2ce","url":"vendor/codemirror/addon/edit/closetag.js"},{"revision":"cc1c2b9fd1184a4e8b845e4fb09707e1","url":"vendor/codemirror/addon/edit/continuelist.js"},{"revision":"5a44e9d0ad6abe1afd67c48b70d1cbd2","url":"vendor/codemirror/addon/edit/matchbrackets.js"},{"revision":"d0c67185e94d3a096299b680c0fca7d6","url":"vendor/codemirror/addon/edit/matchtags.js"},{"revision":"81d50700cee8c27e0e311de3650851bc","url":"vendor/codemirror/addon/edit/trailingspace.js"},{"revision":"c4850e56d89da48a8625e13ed9a076db","url":"vendor/codemirror/addon/fold/brace-fold.js"},{"revision":"9b289797886789d2ce7f40e3f7408c9e","url":"vendor/codemirror/addon/fold/comment-fold.js"},{"revision":"67922ad2e2c384c5455bfcacdec393d8","url":"vendor/codemirror/addon/fold/foldcode.js"},{"revision":"38bb68770b6f7ebaa7adea770a68e0b1","url":"vendor/codemirror/addon/fold/foldgutter.css"},{"revision":"2e6a4ca9c0f057daaecbc330d8f96bc0","url":"vendor/codemirror/addon/fold/foldgutter.js"},{"revision":"5017f49481f30946bd4229a6d05d5fcc","url":"vendor/codemirror/addon/fold/indent-fold.js"},{"revision":"6e3228db96bbadbb93c79922ecd88ce0","url":"vendor/codemirror/addon/fold/markdown-fold.js"},{"revision":"b88e73a8e7bdc8b032adfd5047dfe2c5","url":"vendor/codemirror/addon/fold/xml-fold.js"},{"revision":"736f4c0aa67db12cf39097f3d1790c8b","url":"vendor/codemirror/addon/hint/anyword-hint.js"},{"revision":"4958c441a7cdf2d39fa6c8bd4b340168","url":"vendor/codemirror/addon/hint/css-hint.js"},{"revision":"51364bfc06c261a20b9ced6606db9580","url":"vendor/codemirror/addon/hint/html-hint.js"},{"revision":"fe11e9d0e373480aa61af6ae86c04dc1","url":"vendor/codemirror/addon/hint/javascript-hint.js"},{"revision":"49647712414ff96d5846de9736b5dbd3","url":"vendor/codemirror/addon/hint/show-hint.css"},{"revision":"2fa9552bd0d701cac634055d17bb130a","url":"vendor/codemirror/addon/hint/show-hint.js"},{"revision":"f66526ad34eaaeee2dca6282961808a8","url":"vendor/codemirror/addon/hint/sql-hint.js"},{"revision":"65cf0f4e6ce510f4a189a0b87d943b8c","url":"vendor/codemirror/addon/hint/xml-hint.js"},{"revision":"140f1a44841627e860cafd955e89f4e7","url":"vendor/codemirror/addon/lint/coffeescript-lint.js"},{"revision":"6a6166008cb94a6d62e05dc2cab7fc16","url":"vendor/codemirror/addon/lint/css-lint.js"},{"revision":"4ce658b4b1c2cacb8a2685effa0ed4eb","url":"vendor/codemirror/addon/lint/html-lint.js"},{"revision":"3db1c5d6629bde3e0a4a694c5cd94065","url":"vendor/codemirror/addon/lint/javascript-lint.js"},{"revision":"dcfd194ca63e175996aaea2b3a58b598","url":"vendor/codemirror/addon/lint/json-lint.js"},{"revision":"80cbf240f7114fb23e506da29cced118","url":"vendor/codemirror/addon/lint/lint.css"},{"revision":"16098bd4d5e62f123cbc4482622e1360","url":"vendor/codemirror/addon/lint/lint.js"},{"revision":"eabad9dfc99d98d6995c37fce194c28c","url":"vendor/codemirror/addon/lint/yaml-lint.js"},{"revision":"d4009e57cbbb2c969147cf233671ba42","url":"vendor/codemirror/addon/merge/merge.css"},{"revision":"001c710b643ececdbaf65328bb3419fc","url":"vendor/codemirror/addon/merge/merge.js"},{"revision":"f8291cb1ca96e29af58def213012655a","url":"vendor/codemirror/addon/mode/loadmode.js"},{"revision":"37963861dd6e41a530a6f84c2b17bdf7","url":"vendor/codemirror/addon/mode/multiplex_test.js"},{"revision":"b132b004f352bf044cd80a9f55731147","url":"vendor/codemirror/addon/mode/multiplex.js"},{"revision":"4f8e4dcaeb7c237cbe4f1f69972cdc8a","url":"vendor/codemirror/addon/mode/overlay.js"},{"revision":"eed15e8b955aaee880af0c819b38fa25","url":"vendor/codemirror/addon/mode/simple.js"},{"revision":"c8fb49ed714798e04bc3d0289b19efa4","url":"vendor/codemirror/addon/runmode/colorize.js"},{"revision":"aa4a42bca69b6f096a18cd51203afe6e","url":"vendor/codemirror/addon/runmode/runmode-standalone.js"},{"revision":"2c0ddde09a9f1f8f5dc9d4f67f03d2f2","url":"vendor/codemirror/addon/runmode/runmode.js"},{"revision":"f3c8c9b85bbeecf3c873e52d3783f39b","url":"vendor/codemirror/addon/runmode/runmode.node.js"},{"revision":"87198e00de438bb7f9afe2e55b6cb4a3","url":"vendor/codemirror/addon/scroll/annotatescrollbar.js"},{"revision":"92a24e9251be0dc620c11cb61919293f","url":"vendor/codemirror/addon/scroll/scrollpastend.js"},{"revision":"0352ba51fd6a422fe6cc44925e33ad88","url":"vendor/codemirror/addon/scroll/simplescrollbars.css"},{"revision":"13948e6ef35e3c3d2c65de096af58721","url":"vendor/codemirror/addon/scroll/simplescrollbars.js"},{"revision":"cf5f2c65e9c8e26841923b5e1a6bf611","url":"vendor/codemirror/addon/search/jump-to-line.js"},{"revision":"ace658d3aaf9d8ae9895ff97dd9eb5ca","url":"vendor/codemirror/addon/search/match-highlighter.js"},{"revision":"00ea2770c568a848190bcf52e4241276","url":"vendor/codemirror/addon/search/matchesonscrollbar.css"},{"revision":"b7dfa5fd6a57e306bf7ce99542819883","url":"vendor/codemirror/addon/search/matchesonscrollbar.js"},{"revision":"1e2c6bec0a25d4e7dea128f048b08931","url":"vendor/codemirror/addon/search/search.js"},{"revision":"fa73eef9cf913ee2d766c8501a582a0c","url":"vendor/codemirror/addon/search/searchcursor.js"},{"revision":"30fc5d6c1847dc207bd0e38c0e97e789","url":"vendor/codemirror/addon/selection/active-line.js"},{"revision":"c0240b66ae29bda93e80be5e60c9ed8d","url":"vendor/codemirror/addon/selection/mark-selection.js"},{"revision":"ae80c5e4d54f8ccb07c6373e66f523a4","url":"vendor/codemirror/addon/selection/selection-pointer.js"},{"revision":"4d57ced774b5f3fa9f00dfa398e74819","url":"vendor/codemirror/addon/tern/tern.css"},{"revision":"f6c76d9ec32faccbb8cf23b7a2f6f917","url":"vendor/codemirror/addon/tern/tern.js"},{"revision":"6866b3b6f236f5ae8b89e15b5cf167e1","url":"vendor/codemirror/addon/tern/worker.js"},{"revision":"359a2bb5a43f724a09f2adbbfe40dd86","url":"vendor/codemirror/addon/wrap/hardwrap.js"},{"revision":"fc217d502b05f65616356459c0ec1d62","url":"vendor/codemirror/lib/codemirror.css"},{"revision":"82b9491f7e4ecd8ce57812ee3f99014f","url":"vendor/codemirror/lib/codemirror.js"},{"revision":"3eb5b33a2d2022c4de839b1980511f54","url":"vendor/codemirror/mode/meta.js"},{"revision":"91f74a33b9232251058426d1e16e9dce","url":"vendor/codemirror/mode/sql/index.html"},{"revision":"d21c7a0e713132429cf903be42310a89","url":"vendor/codemirror/mode/sql/sql.js"},{"revision":"80026250946cff8a6fc0da995aa02566","url":"vendor/datatables/datatables.min.css"},{"revision":"c1e3d63eab27d1aa7beb191d32340bba","url":"vendor/datatables/datatables.min.js"},{"revision":"d7dc10c78f23615d328581aebcd805eb","url":"vendor/datatables/images/sort_asc_disabled.png"},{"revision":"9326ad44ae4bebdedd141e7a53c2a730","url":"vendor/datatables/images/sort_asc.png"},{"revision":"9a6486086d09bb38cf66a57cc559ade3","url":"vendor/datatables/images/sort_both.png"},{"revision":"bda51e15154a18257b4f955a222fd66f","url":"vendor/datatables/images/sort_desc_disabled.png"},{"revision":"1fc418e33fd5a687290258b23fac4e98","url":"vendor/datatables/images/sort_desc.png"},{"revision":"d7dc10c78f23615d328581aebcd805eb","url":"vendor/images/datatables/sort_asc_disabled.png"},{"revision":"9326ad44ae4bebdedd141e7a53c2a730","url":"vendor/images/datatables/sort_asc.png"},{"revision":"9a6486086d09bb38cf66a57cc559ade3","url":"vendor/images/datatables/sort_both.png"},{"revision":"bda51e15154a18257b4f955a222fd66f","url":"vendor/images/datatables/sort_desc_disabled.png"},{"revision":"1fc418e33fd5a687290258b23fac4e98","url":"vendor/images/datatables/sort_desc.png"},{"revision":"1ec88e235979893e9efc355f22a23441","url":"vendor/jquery-resizable.js"},{"revision":"f83a8b8886694eaef4505dd80af7a430","url":"vendor/jquery/images/ui-icons_444444_256x240.png"},{"revision":"220afd743d9e9643852e31a135a9f3ae","url":"vendor/jquery/jquery-3.4.1.min.js"},{"revision":"81188e0c65a0a25d5ebfa7356bf81884","url":"vendor/jquery/jquery-ui.min.css"},{"revision":"8cbf62fc02083afe12a90787cb8f9e3c","url":"vendor/jquery/jquery-ui.min.js"},{"revision":"66cefd86e219c19be9a32b4a9f6f70b2","url":"vendor/jstree/jstree.js"},{"revision":"dc4a6494cf51022fa4a8541d13837166","url":"vendor/jstree/jstree.min.js"},{"revision":"eebaf260766f5e0e773f53d3ea4f3e4d","url":"vendor/jstree/themes/default-dark/32px.png"},{"revision":"51286e68b083696edaf4f9fc577e2a2d","url":"vendor/jstree/themes/default-dark/40px.png"},{"revision":"6791bf1b92e95d10c8445ac010c429df","url":"vendor/jstree/themes/default-dark/style.css"},{"revision":"0236b108a8deddca3b0fae061147a0a6","url":"vendor/jstree/themes/default-dark/style.min.css"},{"revision":"62be6ed2b189444b472b8000dc187240","url":"vendor/jstree/themes/default-dark/throbber.gif"},{"revision":"db49c8de4f267eede40a9a8843efcdec","url":"vendor/jstree/themes/default/32px.png"},{"revision":"1f075735090412ed7eb8077d819b19c6","url":"vendor/jstree/themes/default/40px.png"},{"revision":"0cf1fc2eadda48373db31569a791ae29","url":"vendor/jstree/themes/default/style.css"},{"revision":"8f65ba57d02eadb0c75d0623190d1ee8","url":"vendor/jstree/themes/default/style.min.css"},{"revision":"9ed4669f524bec38319be63a2ee4ba26","url":"vendor/jstree/themes/default/throbber.gif"},{"revision":"230b82ca8561d9b4111ba8102cae2bb6","url":"vendor/jstree/themes/phppgadmin/32px.png"},{"revision":"1f075735090412ed7eb8077d819b19c6","url":"vendor/jstree/themes/phppgadmin/40px.png"},{"revision":"f5a9ca92f2b904247c7b83ce4b054481","url":"vendor/jstree/themes/phppgadmin/style.css"},{"revision":"8f65ba57d02eadb0c75d0623190d1ee8","url":"vendor/jstree/themes/phppgadmin/style.min.css"},{"revision":"9ed4669f524bec38319be63a2ee4ba26","url":"vendor/jstree/themes/phppgadmin/throbber.gif"},{"revision":"887b34f2cf309344f3e0b96aaab2b15d","url":"vendor/select2/css/select2.css"},{"revision":"d44571114a90b9226cd654d3c7d9442c","url":"vendor/select2/css/select2.min.css"},{"revision":"a8bb27ec698c86bde72c8a6f13a8e9b4","url":"vendor/select2/js/i18n/ar.js"},{"revision":"498dc667b34eb0fddc31c4e92330d1aa","url":"vendor/select2/js/i18n/az.js"},{"revision":"89cba4df3c8694fcb33098dd1646cac1","url":"vendor/select2/js/i18n/bg.js"},{"revision":"2eaad4eb1950a0d542812c58d30c93dd","url":"vendor/select2/js/i18n/ca.js"},{"revision":"a68bcd293adcd6d9ac0b8527c9b39189","url":"vendor/select2/js/i18n/cs.js"},{"revision":"cbf897a0ae53b0cffbbe3f50d8b1b136","url":"vendor/select2/js/i18n/da.js"},{"revision":"366d0aacb55f4929cc50bb977abec674","url":"vendor/select2/js/i18n/de.js"},{"revision":"5629ce65500f96c62414a27c6eaed62c","url":"vendor/select2/js/i18n/el.js"},{"revision":"05649b26c08630d2b703bc1e9ef93c7b","url":"vendor/select2/js/i18n/en.js"},{"revision":"dc9dbf9d65df3f69e6b6d650c97bd967","url":"vendor/select2/js/i18n/es.js"},{"revision":"c3953fb90b6bb9669697f5f12e802a66","url":"vendor/select2/js/i18n/et.js"},{"revision":"11b925456433eaab07e35b8dca7046f5","url":"vendor/select2/js/i18n/eu.js"},{"revision":"98e52839b583e1ca66f4360a4f43f9b0","url":"vendor/select2/js/i18n/fa.js"},{"revision":"659847deefdcfd7e4f8f2ed924d360f4","url":"vendor/select2/js/i18n/fi.js"},{"revision":"b06a3340de45535358a0bc33fa2b9739","url":"vendor/select2/js/i18n/fr.js"},{"revision":"78a87f7c0a519118fbe4f583ff2a3b3f","url":"vendor/select2/js/i18n/gl.js"},{"revision":"222d90ee0344ee8beeb5fb1835c93c76","url":"vendor/select2/js/i18n/he.js"},{"revision":"116a90b7111b953cd092e30a034d6913","url":"vendor/select2/js/i18n/hi.js"},{"revision":"e1d2c70b4df50d98d2c35856804d38be","url":"vendor/select2/js/i18n/hr.js"},{"revision":"db45641f10b2412801d5872e40ef7c2f","url":"vendor/select2/js/i18n/hu.js"},{"revision":"6ee6c9c64b945bb8a0f42d247ee0d868","url":"vendor/select2/js/i18n/id.js"},{"revision":"808c7d47acb59537728bc74fdeb0ad0d","url":"vendor/select2/js/i18n/is.js"},{"revision":"bae1661dbb77c15384655faffc10a3fa","url":"vendor/select2/js/i18n/it.js"},{"revision":"19cf1ce8a03de84ea668e8fec99a8c80","url":"vendor/select2/js/i18n/ja.js"},{"revision":"6074a9c5575cfaa8b3c1dccdb3133dde","url":"vendor/select2/js/i18n/km.js"},{"revision":"74b17541834ff1bb8c5651d321bd2281","url":"vendor/select2/js/i18n/ko.js"},{"revision":"a0783b1bd1594b7c584564cc68b6c6e5","url":"vendor/select2/js/i18n/lt.js"},{"revision":"07fe2a580d17cba308a972fdabbcaea0","url":"vendor/select2/js/i18n/lv.js"},{"revision":"4986d7fc3ff3ed9a5f8af646f5ca587b","url":"vendor/select2/js/i18n/mk.js"},{"revision":"23e7b436957996a10f451bc8d688764d","url":"vendor/select2/js/i18n/ms.js"},{"revision":"137e184004aaec03977a4caf1cca30f4","url":"vendor/select2/js/i18n/nb.js"},{"revision":"c363ace8aa0501526c17a61ab2fb854f","url":"vendor/select2/js/i18n/nl.js"},{"revision":"76465b54a6b0eb6b2204143a0827d0ca","url":"vendor/select2/js/i18n/pl.js"},{"revision":"9efbbac4fda8d23225df16dddecb2718","url":"vendor/select2/js/i18n/pt-BR.js"},{"revision":"5d6ccc53b347b155e1af6afb1bc5fe94","url":"vendor/select2/js/i18n/pt.js"},{"revision":"1ddc2b9980dcdd1008761149e0349a8b","url":"vendor/select2/js/i18n/ro.js"},{"revision":"d83609abf2e0ba927b9ec472bf47e180","url":"vendor/select2/js/i18n/ru.js"},{"revision":"a0f1a818d09228a87ae105d09fdee80c","url":"vendor/select2/js/i18n/sk.js"},{"revision":"2f3047aad49eedd75dd5dacc092a7e02","url":"vendor/select2/js/i18n/sr-Cyrl.js"},{"revision":"157bc6eb978e9a35985bc655d09ac258","url":"vendor/select2/js/i18n/sr.js"},{"revision":"2b21bb3f61100fd656b41d16e25e2f80","url":"vendor/select2/js/i18n/sv.js"},{"revision":"2a4ece4c4355b7efd9e9591a53b3edc1","url":"vendor/select2/js/i18n/th.js"},{"revision":"c1925d8817db211164145dc47b18d333","url":"vendor/select2/js/i18n/tr.js"},{"revision":"3d56f311192daf9ce44246c52777789f","url":"vendor/select2/js/i18n/uk.js"},{"revision":"3520aa7bdea8234161b2c18f631417a0","url":"vendor/select2/js/i18n/vi.js"},{"revision":"419002d3c6c10ec9618ce6275c1057d1","url":"vendor/select2/js/i18n/zh-CN.js"},{"revision":"c021537edf2c555f149509150ff986e3","url":"vendor/select2/js/i18n/zh-TW.js"},{"revision":"a95323cb476000ee17d7a252786df963","url":"vendor/select2/js/select2.full.js"},{"revision":"da607360bcc65284a197ada3d68d5439","url":"vendor/select2/js/select2.full.min.js"},{"revision":"b8f26dd6733ccc6263cb273e8f821dab","url":"vendor/select2/js/select2.js"},{"revision":"e87ca4c3554f7b9e693605ce12d3a234","url":"vendor/select2/js/select2.min.js"}] || []); registerRoute( ({ request, url }) => request.destination === 'image' || url.includes('assets/vendor'), diff --git a/assets/templates/intro_view.twig b/assets/templates/intro_view.twig deleted file mode 100644 index b9161db9..00000000 --- a/assets/templates/intro_view.twig +++ /dev/null @@ -1,23 +0,0 @@ -{% include 'header.twig' %} - -<body class="flexbox_body {{ lang.applangdir }}"> - - - <div class="flexbox_wrapper"> - <div id="masking_overlay"></div> - <div id="browser_container"> - <div class="browser_container"> - <div class="browser" name="browser" id="browser"> - {% include 'components/browser_body.twig' %} - - - </div> - </div> - </div> - - <iframe src="{{ subfolder }}{{ url }}" name="detail" id="detail" class="detail_container" frameborder="0"/> - </div> - {% include 'footer_iframe.twig' %} - - -</body> diff --git a/assets/themes/global.css b/assets/themes/global.css index e1fa56d6..0e8033f5 100644 --- a/assets/themes/global.css +++ b/assets/themes/global.css @@ -61,8 +61,16 @@ html body.detailbody { html body #detail.detail_container .max_height:not(.SqlEditController), html body.detailbody .max_height:not(.SqlEditController) { max-height: calc(100vh - 91px); + min-height: calc(100vh - 130px); max-width: calc(100vw - 275px); overflow: auto; + padding-bottom: 20px; +} +html body #detail.detail_container .max_height:not(.SqlEditController):after, +html body.detailbody .max_height:not(.SqlEditController):after { + content: ' '; + pointer-events: none; + padding: 40px; } html body #detail.detail_container div.tabs, html body.detailbody div.tabs { @@ -208,13 +216,17 @@ html body #detail.detail_container .topbar { width: 100%; top: 0; margin-left: -10px !important; + display: flex; } -html body #detail.detail_container .topbar .toplink { +html body #detail.detail_container .topbar .toplinks { width: 200px; margin-right: 15px; + flex: auto; + display: flex; + justify-content: flex-end; } -html body #detail.detail_container .topbar .toplink button, -html body #detail.detail_container .topbar .toplink .toplink_popup { +html body #detail.detail_container .topbar .toplinks button, +html body #detail.detail_container .topbar .toplinks .toplink_popup { font-size: 1.05em; border: 1px solid rgba(51, 102, 153, 0.5); border-radius: 4px; @@ -222,6 +234,7 @@ html body #detail.detail_container .topbar .toplink .toplink_popup { margin-right: 3px; font-weight: bold; color: #336699; + background-color: #eceff1; cursor: pointer; } html body #detail.detail_container .trail { diff --git a/assets/themes/global.less b/assets/themes/global.less index 743755c3..52615bdc 100644 --- a/assets/themes/global.less +++ b/assets/themes/global.less @@ -3,655 +3,659 @@ **/ html { - height: 100%; - margin: 0; - - body { - - .topbar_parent { - display: flex; - flex-direction: row; - - .logo { - width: 200px; - height: 100px; - flex: 250px 0; - background-position: 0; - } - - .trail_parent { - flex: 1 auto; - display: flex; - flex-direction: column; - - .topbar { - flex: 2 auto; - } - } - } - - &.sql_edit { - #sqlform { - #queryedition { - min-height: 80px; - - &>.CodeMirror { - min-height: 70px; - - .CodeMirror-scroll { - .CodeMirror-sizer { - margin-left: 40px !important; - - .cm-m-sql { - &.cm-keyword { - text-transform: uppercase; - } - } - } - - .CodeMirror-gutters { - .CodeMirror-linenumbers { - min-width: 30px !important; - } - - .CodeMirror-foldgutter { - width: 0.7em !important; - } - } - } - } - - #query { - min-height: 70px; - } - } - } - } - - #detail.detail_container, - &.detailbody { - flex: 1 auto; - - padding-top: 0; //margin-bottom: -90px; - margin-left: 10px !important; - padding-bottom: 20px; - - .max_height:not(.SqlEditController) { - max-height: calc(100vh - 91px); + height: 100%; + margin: 0; + + body { + .topbar_parent { + display: flex; + flex-direction: row; + + .logo { + width: 200px; + height: 100px; + flex: 250px 0; + background-position: 0; + } + + .trail_parent { + flex: 1 auto; + display: flex; + flex-direction: column; + + .topbar { + flex: 2 auto; + } + } + } + + &.sql_edit { + #sqlform { + #queryedition { + min-height: 80px; + + & > .CodeMirror { + min-height: 70px; + + .CodeMirror-scroll { + .CodeMirror-sizer { + margin-left: 40px !important; + + .cm-m-sql { + &.cm-keyword { + text-transform: uppercase; + } + } + } + + .CodeMirror-gutters { + .CodeMirror-linenumbers { + min-width: 30px !important; + } + + .CodeMirror-foldgutter { + width: 0.7em !important; + } + } + } + } + + #query { + min-height: 70px; + } + } + } + } + + #detail.detail_container, + &.detailbody { + flex: 1 auto; + + padding-top: 0; //margin-bottom: -90px; + margin-left: 10px !important; + padding-bottom: 20px; + + .max_height:not(.SqlEditController) { + max-height: calc(100vh - 91px); + min-height: calc(100vh - 130px); max-width: calc(100vw - 275px); - overflow:auto; - } - - div.tabs { - display: flex; - flex: 2 1 1500px; - flex-direction: row; - - right: 0; - - .tab { - flex: 1 1 auto; - flex-direction: column; - } - } - - &>table.tabs { - position: fixed; - top: 58px; - z-index: 50; - margin-left: -10px; - z-index: 50; - - tbody { - tr { - td { - white-space: nowrap; - } - } - } - } - - table { - //min-width: calc(100vw - 370px); - - &.searchpath &#data { - td { - white-space: nowrap; - - &.opbutton1, - &.opbutton2, - &.opbutton3 { - border: 0 none; - padding-left: 1px; - padding-right: 1px; - - a { - margin-left: 2px; - margin-right: 2px; - } - } - } - } - - &.will_be_datatable { - td { - white-space: nowrap; - - &.opbutton1, - &.opbutton2, - &.opbutton3 { - border: 0 none; - padding-left: 1px; - padding-right: 1px; - - a { - margin-left: 2px; - margin-right: 2px; - } - } - - &.comment { - white-space: normal; - } - } - } - - tr.data1 td.opbutton1 a, - tr.data2 td.opbutton2 a, - tr.data3 td.opbutton3 a { - -webkit-background-clip: border-box; - -webkit-background-origin: padding-box; - -webkit-background-size: auto; - -webkit-user-select: none; - background-attachment: scroll; - background-clip: border-box; - background-color: rgb(66, 139, 202); - background-image: none; - background-origin: padding-box; - background-size: auto; - border: 1px solid #999; - border-radius: 1.5px; - cursor: pointer; - display: inline-block; - font-size: 11px; - font-weight: normal; - height: 15px; - line-height: 15px; - margin-bottom: 0px; - padding-bottom: 1px; - padding-left: 5px; - padding-right: 5px; - padding-top: 1px; - text-align: center; - text-decoration: none; - vertical-align: middle; - white-space: nowrap; - color: #fff !important; - } - } - } - - #detail.detail_container { - - .clearfix { - height: 20px; - clear: both; - display: block; - width: 40px; - } - - table { - &.tabs { - position: relative; - margin-right: -10px; - } - } - - .fixed-top { - display: flex; - position: fixed; - top: 0; - left: 0; - right: 0; - } - - - .topbar { - - z-index: 100; - width: 100%; - top: 0; - margin-left: -10px !important; - - .toplink { - width: 200px; - margin-right: 15px; - - button, - .toplink_popup { - font-size: 1.05em; - border: 1px solid rgba(51, 102, 153, 0.5); - border-radius: 4px; - float: left; - margin-right: 3px; - font-weight: bold; - color: #336699; - cursor: pointer; - } - } - } - - .trail { - height: 24px; - z-index: 100; - width: 100%; - top: 27px; - margin-left: -10px !important; - .trail_table { - min-width: unset; - } - - .searchpath { - min-width: unset; - right: 0; - position: fixed; - top: 25px; - } - } - } - - .navlink { - li { - a { - -webkit-background-clip: border-box; - -webkit-background-origin: padding-box; - -webkit-background-size: auto; - -webkit-user-select: none; - background-attachment: scroll; - background-clip: border-box; - background-color: rgb(66, 139, 202); - background-image: none; - background-origin: padding-box; - background-size: auto; - border: 1px solid #999; - border-radius: 1.5px; - cursor: pointer; - display: inline-block; - font-size: 12px; - font-weight: normal; - height: 15px; - line-height: 15px; - margin-bottom: 0px; - padding-bottom: 1px; - padding-left: 5px; - padding-right: 5px; - padding-top: 1px; - text-align: center; - text-decoration: none; - vertical-align: middle; - white-space: nowrap; - color: #fff !important; - } - } - } - - &.sql_edit { - - //padding-top: 35px; - #flexbox_wrapper { - height: 100%; - margin-top: 25px; - } - - table.tabs { - top: 0; - } - } - - &.flexbox_body { - height: 100%; - margin: 0; - - .flexbox_wrapper { - height: 100%; - margin: 0; - - display: flex; - flex-direction: row; - - overflow: hidden; - - /* avoid browser level touch actions */ - xtouch-action: none; - - #browser_container { - flex: 0 0 auto; - /* only manually resize */ - //padding: 10px; - width: 250px; - min-height: 200px; - min-width: 150px; - white-space: nowrap; - // background: #838383; - color: white; - - .refreshTree { - position: absolute; - left: 200px; - z-index: 1000; - padding: 5px; - width: 40px; - } - } - - .splitter { - flex: 0 0 auto; - width: 8px; - - min-height: 200px; - cursor: col-resize; - } - - #detail_container { - flex: 1 1 auto; - /* resizable */ - padding: 10px; - width: 100%; - min-height: 200px; - min-width: 200px; - background: #eee; - } - } - - - &.rtl { - .flexbox_wrapper { - &>.detail_container { - float: right; - flex-grow: 1; - } - - &>#browser_container { - float: right; - - flex: 0 0 300px; - - &.ui-resizable { - flex: unset; - border-right: 0 none; - border-left: 8px solid #cfd8dc; - - .ui-resizable-handle.ui-resizable-w { - width: 8px; - left: -8px; - background: #84a0ad; - top: 45%; - height: 50px; - } - } - } - } - } - } - - /** Browser Tree using XLoadTree 2 **/ - &.browser { - height: 100%; - margin: 0px; - padding: 0px; - text-align: left; - - .refreshTree { - float: right; - text-align: right; - margin: 10px; - padding: 0 3px; - } - - .webfx-tree-row { - white-space: nowrap; - } - - .webfx-tree-children { - background-repeat: repeat-y; - background-position-y: 1px !important; - /* IE only */ - } - - .webfx-tree-row img { - vertical-align: middle; - } - - .webfx-tree-item-label { - margin-left: 0.5ex; - } - - .webfx-tree-icon { - margin-left: 1px; - } - - .webfx-tree-hide-root { - display: none; - } - } - - img { - border: none; - } - - p.message { - color: blue; - } - - p.comment { - font-style: italic; - } - - .left { - text-align: left; - } - - .pre { - white-space: pre; - } - - .arg_icon { - padding-right: 5pt; - padding-left: 5pt; - } - - - /** auto-complete on insert **/ - #fkbg { - display: none; - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 10; - } - - #fklist { - display: none; - position: absolute; - background: #fff; - border: 1px solid #000; - overflow: auto; - z-index: 15; - } - - #fklist table { - border-collapse: collapse; - border: 1px solid #aaa; - } - - #fklist th { - border: 1px solid #aaa; - } - - #fklist td, - #fklist th { - padding: 3px 10px; - border-right: 1px solid #aaa; - font-size: 12px; - } - - #fklist td a { - display: block; - color: #000; - } - - #fklist td a.fkval, - p.errmsg { - color: red; - } - - .ac_values { - width: 100%; - } - - /** bottom link back to top **/ - .bottom_link { - position: fixed; - bottom: 0; - right: 0; - margin: 0; - padding: 4px; - background: #eee; - border-top: 1px dotted #999; - border-left: 1px dotted #999; - font-size: smaller; - } - - /** FK browsing **/ - div#root { - position: absolute; - } - - div.fk { - margin-left: 20px; - } - - div#fkcontainer { - margin: 0; - position: relative; - width: 100%; - background: none; - border: 0px; - } - - div.fk_value { - display: inline-block; - } - - .highlight { - background-color: #ffff00; - } - - /** Syntax highlighting **/ - .comment { - color: #008080; - } - - .keyword { - color: #ff8000; - } - - .literal { - color: #808080; - } - - .bold { - font-weight: bold; - } - - .select2-container { - min-width: 250px; - } - - form.sqlform { - float: left; - width: 100%; - - .sqledit_bottom_inputs { - padding: 1%; - width: 98%; - float: left; - - p { - label { - float: left; - - #paginate { - position: relative; - top: 2px; - } - } - } - } - } - - .searchpath { - padding: 5px; - clear: both; - min-width: unset; - float: left; - } - - .CodeMirror { - border: 1px solid #aaa; - padding: 3px; - font-size: 1.1em; - line-height: 1.5em; - } - } + overflow: auto; + padding-bottom: 20px; + &:after { + content:' '; + pointer-events:none; + padding:40px; + } + + } + + div.tabs { + display: flex; + flex: 2 1 1500px; + flex-direction: row; + + right: 0; + + .tab { + flex: 1 1 auto; + flex-direction: column; + } + } + + & > table.tabs { + position: fixed; + top: 58px; + z-index: 50; + margin-left: -10px; + z-index: 50; + + tbody { + tr { + td { + white-space: nowrap; + } + } + } + } + + table { + //min-width: calc(100vw - 370px); + + &.searchpath &#data { + td { + white-space: nowrap; + + &.opbutton1, + &.opbutton2, + &.opbutton3 { + border: 0 none; + padding-left: 1px; + padding-right: 1px; + + a { + margin-left: 2px; + margin-right: 2px; + } + } + } + } + + &.will_be_datatable { + td { + white-space: nowrap; + + &.opbutton1, + &.opbutton2, + &.opbutton3 { + border: 0 none; + padding-left: 1px; + padding-right: 1px; + + a { + margin-left: 2px; + margin-right: 2px; + } + } + + &.comment { + white-space: normal; + } + } + } + + tr.data1 td.opbutton1 a, + tr.data2 td.opbutton2 a, + tr.data3 td.opbutton3 a { + -webkit-background-clip: border-box; + -webkit-background-origin: padding-box; + -webkit-background-size: auto; + -webkit-user-select: none; + background-attachment: scroll; + background-clip: border-box; + background-color: rgb(66, 139, 202); + background-image: none; + background-origin: padding-box; + background-size: auto; + border: 1px solid #999; + border-radius: 1.5px; + cursor: pointer; + display: inline-block; + font-size: 11px; + font-weight: normal; + height: 15px; + line-height: 15px; + margin-bottom: 0px; + padding-bottom: 1px; + padding-left: 5px; + padding-right: 5px; + padding-top: 1px; + text-align: center; + text-decoration: none; + vertical-align: middle; + white-space: nowrap; + color: #fff !important; + } + } + } + + #detail.detail_container { + .clearfix { + height: 20px; + clear: both; + display: block; + width: 40px; + } + + table { + &.tabs { + position: relative; + margin-right: -10px; + } + } + + .fixed-top { + display: flex; + position: fixed; + top: 0; + left: 0; + right: 0; + } + + .topbar { + z-index: 100; + width: 100%; + top: 0; + margin-left: -10px !important; +display:flex; + .toplinks { + width: 200px; + margin-right: 15px; + flex: auto; + display: flex; + justify-content: flex-end; + button, + .toplink_popup { + font-size: 1.05em; + border: 1px solid rgba(51, 102, 153, 0.5); + border-radius: 4px; + float: left; + margin-right: 3px; + font-weight: bold; + color: #336699; + background-color:#eceff1; + cursor: pointer; + } + } + } + + .trail { + height: 24px; + z-index: 100; + width: 100%; + top: 27px; + margin-left: -10px !important; + .trail_table { + min-width: unset; + } + + .searchpath { + min-width: unset; + right: 0; + position: fixed; + top: 25px; + } + } + } + + .navlink { + li { + a { + -webkit-background-clip: border-box; + -webkit-background-origin: padding-box; + -webkit-background-size: auto; + -webkit-user-select: none; + background-attachment: scroll; + background-clip: border-box; + background-color: rgb(66, 139, 202); + background-image: none; + background-origin: padding-box; + background-size: auto; + border: 1px solid #999; + border-radius: 1.5px; + cursor: pointer; + display: inline-block; + font-size: 12px; + font-weight: normal; + height: 15px; + line-height: 15px; + margin-bottom: 0px; + padding-bottom: 1px; + padding-left: 5px; + padding-right: 5px; + padding-top: 1px; + text-align: center; + text-decoration: none; + vertical-align: middle; + white-space: nowrap; + color: #fff !important; + } + } + } + + &.sql_edit { + //padding-top: 35px; + #flexbox_wrapper { + height: 100%; + margin-top: 25px; + } + + table.tabs { + top: 0; + } + } + + &.flexbox_body { + height: 100%; + margin: 0; + + .flexbox_wrapper { + height: 100%; + margin: 0; + + display: flex; + flex-direction: row; + + overflow: hidden; + + /* avoid browser level touch actions */ + xtouch-action: none; + + #browser_container { + flex: 0 0 auto; + /* only manually resize */ + //padding: 10px; + width: 250px; + min-height: 200px; + min-width: 150px; + white-space: nowrap; + // background: #838383; + color: white; + + .refreshTree { + position: absolute; + left: 200px; + z-index: 1000; + padding: 5px; + width: 40px; + } + } + + .splitter { + flex: 0 0 auto; + width: 8px; + + min-height: 200px; + cursor: col-resize; + } + + #detail_container { + flex: 1 1 auto; + /* resizable */ + padding: 10px; + width: 100%; + min-height: 200px; + min-width: 200px; + background: #eee; + } + } + + &.rtl { + .flexbox_wrapper { + & > .detail_container { + float: right; + flex-grow: 1; + } + + & > #browser_container { + float: right; + + flex: 0 0 300px; + + &.ui-resizable { + flex: unset; + border-right: 0 none; + border-left: 8px solid #cfd8dc; + + .ui-resizable-handle.ui-resizable-w { + width: 8px; + left: -8px; + background: #84a0ad; + top: 45%; + height: 50px; + } + } + } + } + } + } + + /** Browser Tree using XLoadTree 2 **/ + &.browser { + height: 100%; + margin: 0px; + padding: 0px; + text-align: left; + + .refreshTree { + float: right; + text-align: right; + margin: 10px; + padding: 0 3px; + } + + .webfx-tree-row { + white-space: nowrap; + } + + .webfx-tree-children { + background-repeat: repeat-y; + background-position-y: 1px !important; + /* IE only */ + } + + .webfx-tree-row img { + vertical-align: middle; + } + + .webfx-tree-item-label { + margin-left: 0.5ex; + } + + .webfx-tree-icon { + margin-left: 1px; + } + + .webfx-tree-hide-root { + display: none; + } + } + + img { + border: none; + } + + p.message { + color: blue; + } + + p.comment { + font-style: italic; + } + + .left { + text-align: left; + } + + .pre { + white-space: pre; + } + + .arg_icon { + padding-right: 5pt; + padding-left: 5pt; + } + + /** auto-complete on insert **/ + #fkbg { + display: none; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 10; + } + + #fklist { + display: none; + position: absolute; + background: #fff; + border: 1px solid #000; + overflow: auto; + z-index: 15; + } + + #fklist table { + border-collapse: collapse; + border: 1px solid #aaa; + } + + #fklist th { + border: 1px solid #aaa; + } + + #fklist td, + #fklist th { + padding: 3px 10px; + border-right: 1px solid #aaa; + font-size: 12px; + } + + #fklist td a { + display: block; + color: #000; + } + + #fklist td a.fkval, + p.errmsg { + color: red; + } + + .ac_values { + width: 100%; + } + + /** bottom link back to top **/ + .bottom_link { + position: fixed; + bottom: 0; + right: 0; + margin: 0; + padding: 4px; + background: #eee; + border-top: 1px dotted #999; + border-left: 1px dotted #999; + font-size: smaller; + } + + /** FK browsing **/ + div#root { + position: absolute; + } + + div.fk { + margin-left: 20px; + } + + div#fkcontainer { + margin: 0; + position: relative; + width: 100%; + background: none; + border: 0px; + } + + div.fk_value { + display: inline-block; + } + + .highlight { + background-color: #ffff00; + } + + /** Syntax highlighting **/ + .comment { + color: #008080; + } + + .keyword { + color: #ff8000; + } + + .literal { + color: #808080; + } + + .bold { + font-weight: bold; + } + + .select2-container { + min-width: 250px; + } + + form.sqlform { + float: left; + width: 100%; + + .sqledit_bottom_inputs { + padding: 1%; + width: 98%; + float: left; + + p { + label { + float: left; + + #paginate { + position: relative; + top: 2px; + } + } + } + } + } + + .searchpath { + padding: 5px; + clear: both; + min-width: unset; + float: left; + } + + .CodeMirror { + border: 1px solid #aaa; + padding: 3px; + font-size: 1.1em; + line-height: 1.5em; + } + } } @media print { - @page { - size: 215.9mm 279.4mm; - margin: 5mm 5mm 5mm 5mm; - orphans: 100; - widows: 0; - } - - html, - body { - height: 100%; - width: 100%; - } - - #browser_container { - display: none; - } - - body { - margin: 0; //zoom: 0.9; - background: white; - background-color: #ffffff; - - .flexbox_wrapper>.detail_container { - height: 100%; - width: 100%; - margin: 0px; - padding: 0px; - text-align: left; - float: left; - flex: 1 1; - border: 4px red; - } - - .topbar { - display: none; - } - - .trail { - display: none; - } - - h2 { - display: none; - } - } -}
\ No newline at end of file + @page { + size: 215.9mm 279.4mm; + margin: 5mm 5mm 5mm 5mm; + orphans: 100; + widows: 0; + } + + html, + body { + height: 100%; + width: 100%; + } + + #browser_container { + display: none; + } + + body { + margin: 0; //zoom: 0.9; + background: white; + background-color: #ffffff; + + .flexbox_wrapper > .detail_container { + height: 100%; + width: 100%; + margin: 0px; + padding: 0px; + text-align: left; + float: left; + flex: 1 1; + border: 4px red; + } + + .topbar { + display: none; + } + + .trail { + display: none; + } + + h2 { + display: none; + } + } +} diff --git a/assets/types/globals.d.ts b/assets/types/globals.d.ts new file mode 100644 index 00000000..e74232c2 --- /dev/null +++ b/assets/types/globals.d.ts @@ -0,0 +1,39 @@ +/* eslint-disable no-undef */ +/// <reference types="jquery" /> + +/// <reference types="jstree" /> +/// <reference types="codemirror" /> +interface Window { + jQuery: typeof jQuery; + $: typeof jQuery; + inPopUp: boolean; + stateObj: Record<string, unknown>; +} +// Generated by https://quicktype.io + +interface StateObj { + serverSide: boolean; + dir: string; + in_test: string; + reload: string; + method: string; + subfolder: string; + path: string; + query_string: string; + strconfdropcred: string; + origin: string; + url: string; + dttFields: null; + href: string; + guessedSubfolder: string; + pathname: string; + dttArgs: DataTables.Settings; + basePath: string; + realurl: string; + redirect_to: string; + parenturl: string; + dataTable: DataTables.Api; +} + + +declare var stateObj: StateObj; diff --git a/composer.json b/composer.json index 03205de0..5fd18ea6 100644 --- a/composer.json +++ b/composer.json @@ -20,6 +20,7 @@ "ext-pgsql": "*", "ext-xml": "*", "adodb/adodb-php": "^5.20", + "illuminate/support": "^8.34", "slim/flash": "^0.4.0", "slim/slim": "^3.6", "slim/twig-view": "~2.5.1", @@ -61,9 +62,8 @@ }, "files": [ "src/lib.inc.php", - "vendor/adodb/adodb-php/drivers/adodb-postgres9.inc.php", - "vendor/adodb/adodb-php/drivers/adodb-pdo.inc.php", - "vendor/adodb/adodb-php/drivers/adodb-pdo_pgsql.inc.php" + "vendor/illuminate/support/helpers.php", + "vendor/adodb/adodb-php/drivers/adodb-postgres9.inc.php" ] }, "autoload-dev": { diff --git a/composer.lock b/composer.lock index d1cffbf4..61548d5d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6e02c8707ebddfbb84409255720e26ca", + "content-hash": "df0b12937254bbe1eb88daf2eee1db56", "packages": [ { "name": "adodb/adodb-php", @@ -65,6 +65,410 @@ "time": "2021-02-27T11:38:53+00:00" }, { + "name": "doctrine/inflector", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/9cf661f4eb38f7c881cac67c75ea9b00bf97b210", + "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^7.0", + "phpstan/phpstan": "^0.11", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-strict-rules": "^0.11", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", + "keywords": [ + "inflection", + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" + ], + "support": { + "issues": "https://github.com/doctrine/inflector/issues", + "source": "https://github.com/doctrine/inflector/tree/2.0.x" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", + "type": "tidelift" + } + ], + "time": "2020-05-29T15:13:26+00:00" + }, + { + "name": "illuminate/collections", + "version": "v8.34.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/collections.git", + "reference": "e18d6e4cf03dd597bc3ecd86fefc2023d0c7a5e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/collections/zipball/e18d6e4cf03dd597bc3ecd86fefc2023d0c7a5e8", + "reference": "e18d6e4cf03dd597bc3ecd86fefc2023d0c7a5e8", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "php": "^7.3|^8.0" + }, + "suggest": { + "symfony/var-dumper": "Required to use the dump method (^5.1.4)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + }, + "files": [ + "helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Collections package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2021-03-19T00:05:33+00:00" + }, + { + "name": "illuminate/contracts", + "version": "v8.34.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/contracts.git", + "reference": "121cea1d8b8772bc7fee99c71ecf0f57c1d77b3b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/121cea1d8b8772bc7fee99c71ecf0f57c1d77b3b", + "reference": "121cea1d8b8772bc7fee99c71ecf0f57c1d77b3b", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0", + "psr/container": "^1.0", + "psr/simple-cache": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Contracts\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Contracts package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2021-03-12T14:45:30+00:00" + }, + { + "name": "illuminate/macroable", + "version": "v8.34.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/macroable.git", + "reference": "300aa13c086f25116b5f3cde3ca54ff5c822fb05" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/macroable/zipball/300aa13c086f25116b5f3cde3ca54ff5c822fb05", + "reference": "300aa13c086f25116b5f3cde3ca54ff5c822fb05", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Macroable package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2020-10-27T15:20:30+00:00" + }, + { + "name": "illuminate/support", + "version": "v8.34.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/support.git", + "reference": "b7b27e758b68aad44558c62e7374328835895386" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/support/zipball/b7b27e758b68aad44558c62e7374328835895386", + "reference": "b7b27e758b68aad44558c62e7374328835895386", + "shasum": "" + }, + "require": { + "doctrine/inflector": "^1.4|^2.0", + "ext-json": "*", + "ext-mbstring": "*", + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "nesbot/carbon": "^2.31", + "php": "^7.3|^8.0", + "voku/portable-ascii": "^1.4.8" + }, + "conflict": { + "tightenco/collect": "<5.5.33" + }, + "suggest": { + "illuminate/filesystem": "Required to use the composer class (^8.0).", + "league/commonmark": "Required to use Str::markdown() and Stringable::markdown() (^1.3).", + "ramsey/uuid": "Required to use Str::uuid() (^4.0).", + "symfony/process": "Required to use the composer class (^5.1.4).", + "symfony/var-dumper": "Required to use the dd function (^5.1.4).", + "vlucas/phpdotenv": "Required to use the Env class and env helper (^5.2)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + }, + "files": [ + "helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Support package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2021-03-21T13:37:37+00:00" + }, + { + "name": "nesbot/carbon", + "version": "2.46.0", + "source": { + "type": "git", + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "2fd2c4a77d58a4e95234c8a61c5df1f157a91bf4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/2fd2c4a77d58a4e95234c8a61c5df1f157a91bf4", + "reference": "2fd2c4a77d58a4e95234c8a61c5df1f157a91bf4", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.1.8 || ^8.0", + "symfony/polyfill-mbstring": "^1.0", + "symfony/translation": "^3.4 || ^4.0 || ^5.0" + }, + "require-dev": { + "doctrine/orm": "^2.7", + "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", + "kylekatarnls/multi-tester": "^2.0", + "phpmd/phpmd": "^2.9", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.54", + "phpunit/phpunit": "^7.5.20 || ^8.5.14", + "squizlabs/php_codesniffer": "^3.4" + }, + "bin": [ + "bin/carbon" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev", + "dev-3.x": "3.x-dev" + }, + "laravel": { + "providers": [ + "Carbon\\Laravel\\ServiceProvider" + ] + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "http://nesbot.com" + }, + { + "name": "kylekatarnls", + "homepage": "http://github.com/kylekatarnls" + } + ], + "description": "An API extension for DateTime that supports 281 different languages.", + "homepage": "http://carbon.nesbot.com", + "keywords": [ + "date", + "datetime", + "time" + ], + "support": { + "issues": "https://github.com/briannesbitt/Carbon/issues", + "source": "https://github.com/briannesbitt/Carbon" + }, + "funding": [ + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" + } + ], + "time": "2021-02-24T17:30:44+00:00" + }, + { "name": "nikic/fast-route", "version": "v1.3.0", "source": { @@ -269,6 +673,57 @@ "time": "2016-08-06T14:39:51+00:00" }, { + "name": "psr/simple-cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/master" + }, + "time": "2017-10-23T01:57:42+00:00" + }, + { "name": "slim/flash", "version": "0.4.0", "source": { @@ -759,6 +1214,260 @@ "time": "2021-01-07T16:49:33+00:00" }, { + "name": "symfony/polyfill-php80", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/translation", + "version": "v5.2.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "0947ab1e3aabd22a6bef393874b2555d2bb976da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/0947ab1e3aabd22a6bef393874b2555d2bb976da", + "reference": "0947ab1e3aabd22a6bef393874b2555d2bb976da", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.15", + "symfony/translation-contracts": "^2.3" + }, + "conflict": { + "symfony/config": "<4.4", + "symfony/dependency-injection": "<5.0", + "symfony/http-kernel": "<5.0", + "symfony/twig-bundle": "<5.0", + "symfony/yaml": "<4.4" + }, + "provide": { + "symfony/translation-implementation": "2.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^4.4|^5.0", + "symfony/console": "^4.4|^5.0", + "symfony/dependency-injection": "^5.0", + "symfony/finder": "^4.4|^5.0", + "symfony/http-kernel": "^5.0", + "symfony/intl": "^4.4|^5.0", + "symfony/service-contracts": "^1.1.2|^2", + "symfony/yaml": "^4.4|^5.0" + }, + "suggest": { + "psr/log-implementation": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to internationalize your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/translation/tree/v5.2.5" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-06T07:59:01+00:00" + }, + { + "name": "symfony/translation-contracts", + "version": "v2.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation-contracts.git", + "reference": "e2eaa60b558f26a4b0354e1bbb25636efaaad105" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/e2eaa60b558f26a4b0354e1bbb25636efaaad105", + "reference": "e2eaa60b558f26a4b0354e1bbb25636efaaad105", + "shasum": "" + }, + "require": { + "php": ">=7.2.5" + }, + "suggest": { + "symfony/translation-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Translation\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to translation", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/translation-contracts/tree/v2.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-09-28T13:05:58+00:00" + }, + { "name": "symfony/yaml", "version": "v5.2.5", "source": { @@ -908,6 +1617,80 @@ } ], "time": "2021-02-08T09:54:36+00:00" + }, + { + "name": "voku/portable-ascii", + "version": "1.5.6", + "source": { + "type": "git", + "url": "https://github.com/voku/portable-ascii.git", + "reference": "80953678b19901e5165c56752d087fc11526017c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/80953678b19901e5165c56752d087fc11526017c", + "reference": "80953678b19901e5165c56752d087fc11526017c", + "shasum": "" + }, + "require": { + "php": ">=7.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~6.0 || ~7.0 || ~9.0" + }, + "suggest": { + "ext-intl": "Use Intl for transliterator_transliterate() support" + }, + "type": "library", + "autoload": { + "psr-4": { + "voku\\": "src/voku/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Lars Moelleken", + "homepage": "http://www.moelleken.org/" + } + ], + "description": "Portable ASCII library - performance optimized (ascii) string functions for php.", + "homepage": "https://github.com/voku/portable-ascii", + "keywords": [ + "ascii", + "clean", + "php" + ], + "support": { + "issues": "https://github.com/voku/portable-ascii/issues", + "source": "https://github.com/voku/portable-ascii/tree/1.5.6" + }, + "funding": [ + { + "url": "https://www.paypal.me/moelleken", + "type": "custom" + }, + { + "url": "https://github.com/voku", + "type": "github" + }, + { + "url": "https://opencollective.com/portable-ascii", + "type": "open_collective" + }, + { + "url": "https://www.patreon.com/voku", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii", + "type": "tidelift" + } + ], + "time": "2020-11-12T00:07:28+00:00" } ], "packages-dev": [ @@ -1992,16 +2775,16 @@ }, { "name": "filp/whoops", - "version": "2.9.2", + "version": "2.11.0", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "df7933820090489623ce0be5e85c7e693638e536" + "reference": "f6e14679f948d8a5cfb866fa7065a30c66bd64d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/df7933820090489623ce0be5e85c7e693638e536", - "reference": "df7933820090489623ce0be5e85c7e693638e536", + "url": "https://api.github.com/repos/filp/whoops/zipball/f6e14679f948d8a5cfb866fa7065a30c66bd64d3", + "reference": "f6e14679f948d8a5cfb866fa7065a30c66bd64d3", "shasum": "" }, "require": { @@ -2051,7 +2834,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.9.2" + "source": "https://github.com/filp/whoops/tree/2.11.0" }, "funding": [ { @@ -2059,20 +2842,20 @@ "type": "github" } ], - "time": "2021-01-24T12:00:00+00:00" + "time": "2021-03-19T12:00:00+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.18.3", + "version": "v2.18.4", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "ab99202fccff2a9f97592fbe1b5c76dd06df3513" + "reference": "06f764e3cb6d60822d8f5135205f9d32b5508a31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/ab99202fccff2a9f97592fbe1b5c76dd06df3513", - "reference": "ab99202fccff2a9f97592fbe1b5c76dd06df3513", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/06f764e3cb6d60822d8f5135205f9d32b5508a31", + "reference": "06f764e3cb6d60822d8f5135205f9d32b5508a31", "shasum": "" }, "require": { @@ -2155,7 +2938,7 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", - "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.18.3" + "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.18.4" }, "funding": [ { @@ -2163,7 +2946,7 @@ "type": "github" } ], - "time": "2021-03-10T19:39:05+00:00" + "time": "2021-03-20T14:52:33+00:00" }, { "name": "justinrainbow/json-schema", @@ -2734,16 +3517,16 @@ }, { "name": "pestphp/pest", - "version": "v1.0.3", + "version": "v1.0.4", "source": { "type": "git", "url": "https://github.com/pestphp/pest.git", - "reference": "b6c2812a9150bcc71fec729a4e71ffb3a7d07db3" + "reference": "79173134220fb161480648f947069f2326a80ab7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest/zipball/b6c2812a9150bcc71fec729a4e71ffb3a7d07db3", - "reference": "b6c2812a9150bcc71fec729a4e71ffb3a7d07db3", + "url": "https://api.github.com/repos/pestphp/pest/zipball/79173134220fb161480648f947069f2326a80ab7", + "reference": "79173134220fb161480648f947069f2326a80ab7", "shasum": "" }, "require": { @@ -2753,7 +3536,7 @@ "pestphp/pest-plugin-expectations": "^1.0", "pestphp/pest-plugin-init": "^1.0", "php": "^7.3 || ^8.0", - "phpunit/phpunit": ">= 9.3.7 <= 9.5.2" + "phpunit/phpunit": ">= 9.3.7 <= 9.5.3" }, "require-dev": { "illuminate/console": "^8.32.1", @@ -2811,7 +3594,7 @@ ], "support": { "issues": "https://github.com/pestphp/pest/issues", - "source": "https://github.com/pestphp/pest/tree/v1.0.3" + "source": "https://github.com/pestphp/pest/tree/v1.0.4" }, "funding": [ { @@ -2839,7 +3622,7 @@ "type": "patreon" } ], - "time": "2021-03-13T11:14:27+00:00" + "time": "2021-03-17T13:44:14+00:00" }, { "name": "pestphp/pest-plugin", @@ -3602,16 +4385,16 @@ }, { "name": "phpspec/prophecy", - "version": "1.12.2", + "version": "1.13.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "245710e971a030f42e08f4912863805570f23d39" + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/245710e971a030f42e08f4912863805570f23d39", - "reference": "245710e971a030f42e08f4912863805570f23d39", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", "shasum": "" }, "require": { @@ -3663,22 +4446,22 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.12.2" + "source": "https://github.com/phpspec/prophecy/tree/1.13.0" }, - "time": "2020-12-19T10:15:11+00:00" + "time": "2021-03-17T13:42:18+00:00" }, { "name": "phpstan/phpstan", - "version": "0.12.81", + "version": "0.12.82", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "0dd5b0ebeff568f7000022ea5f04aa86ad3124b8" + "reference": "3920f0fb0aff39263d3a4cb0bca120a67a1a6a11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/0dd5b0ebeff568f7000022ea5f04aa86ad3124b8", - "reference": "0dd5b0ebeff568f7000022ea5f04aa86ad3124b8", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/3920f0fb0aff39263d3a4cb0bca120a67a1a6a11", + "reference": "3920f0fb0aff39263d3a4cb0bca120a67a1a6a11", "shasum": "" }, "require": { @@ -3709,7 +4492,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.81" + "source": "https://github.com/phpstan/phpstan/tree/0.12.82" }, "funding": [ { @@ -3725,7 +4508,7 @@ "type": "tidelift" } ], - "time": "2021-03-08T22:03:02+00:00" + "time": "2021-03-19T06:08:17+00:00" }, { "name": "phpunit/php-code-coverage", @@ -4047,16 +4830,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.2", + "version": "9.5.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f661659747f2f87f9e72095bb207bceb0f151cb4" + "reference": "27241ac75fc37ecf862b6e002bf713b6566cbe41" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f661659747f2f87f9e72095bb207bceb0f151cb4", - "reference": "f661659747f2f87f9e72095bb207bceb0f151cb4", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/27241ac75fc37ecf862b6e002bf713b6566cbe41", + "reference": "27241ac75fc37ecf862b6e002bf713b6566cbe41", "shasum": "" }, "require": { @@ -4134,7 +4917,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.2" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.3" }, "funding": [ { @@ -4146,7 +4929,7 @@ "type": "github" } ], - "time": "2021-02-02T14:45:58+00:00" + "time": "2021-03-17T07:30:34+00:00" }, { "name": "psr/event-dispatcher", @@ -6374,89 +7157,6 @@ "time": "2021-01-07T16:49:33+00:00" }, { - "name": "symfony/polyfill-php80", - "version": "v1.22.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", - "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.22-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-01-07T16:49:33+00:00" - }, - { "name": "symfony/process", "version": "v5.2.4", "source": { @@ -6794,16 +7494,16 @@ }, { "name": "vimeo/psalm", - "version": "4.6.3", + "version": "4.6.4", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "f1a840727dd756899eee2f1f9ea443e265a4763f" + "reference": "97fe86c4e158b5a57c5150aa5055c38b5a809aab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/f1a840727dd756899eee2f1f9ea443e265a4763f", - "reference": "f1a840727dd756899eee2f1f9ea443e265a4763f", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/97fe86c4e158b5a57c5150aa5055c38b5a809aab", + "reference": "97fe86c4e158b5a57c5150aa5055c38b5a809aab", "shasum": "" }, "require": { @@ -6892,9 +7592,9 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.6.3" + "source": "https://github.com/vimeo/psalm/tree/4.6.4" }, - "time": "2021-03-14T00:28:24+00:00" + "time": "2021-03-16T23:28:18+00:00" }, { "name": "webmozart/assert", diff --git a/globals.d.ts b/globals.d.ts deleted file mode 100644 index 1059108a..00000000 --- a/globals.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import * as jQuery from 'jquery'; - -declare global { - interface Window { - jQuery: typeof jQuery; - $: typeof jQuery; - } -}
\ No newline at end of file @@ -27,11 +27,11 @@ if (\PHP_SAPI === 'cli-server') { $new_location = 'Location: http://' . $_SERVER['HTTP_HOST'] . $req_uri; - if ($filePath && // 1. check that filepath is set - \is_readable($filePath) && // 2. and references a readable file/folder - 0 === \mb_strpos($filePath, BASE_PATH . \DIRECTORY_SEPARATOR) && // 3. And is inside this folder - BASE_PATH . \DIRECTORY_SEPARATOR . 'index.php' !== $filePath && // 4. discard circular references to index.php - '.' !== \mb_substr(\basename($filePath), 0, 1) // 5. don't serve dotfiles + if ($filePath // 1. check that filepath is set + && \is_readable($filePath) // 2. and references a readable file/folder + && 0 === \mb_strpos($filePath, BASE_PATH . \DIRECTORY_SEPARATOR) // 3. And is inside this folder + && BASE_PATH . \DIRECTORY_SEPARATOR . 'index.php' !== $filePath // 4. discard circular references to index.php + && '.' !== \mb_substr(\basename($filePath), 0, 1) // 5. don't serve dotfiles ) { if ('.php' === \mb_strtolower(\mb_substr($filePath, -4))) { // php file; serve through interpreter diff --git a/package.json b/package.json index ba5e71f7..3c9a45c3 100644 --- a/package.json +++ b/package.json @@ -5,19 +5,42 @@ "repository": "git@github.com:HuasoFoundries/phpPgAdmin6.git", "author": "ffflabs <amenadiel@gmail.com>", "license": "MIT", + "typings": "assets/types/globals.d.ts", "scripts": { - "watch":"less-watch-compiler --config .build/less-watch-compiler.config.json", + "psalter": "vendor/bin/psalm --config=psalm.xml --alter --allow-backwards-incompatible-changes=false --dry-run", + "csfixer": "yarn phpcbf || vendor/bin/php-cs-fixer fix --config=.php_cs.php --diff --diff-format=udiff --verbose", + "phpcbf": "tools/phpcbf --standard=.phpcs.xml --parallel=2 --cache=.build/phpcs/php-cs.cache src/* ", + "phpstan": "./vendor/bin/phpstan analyse --memory-limit=2G --configuration phpstan.neon ", + "parallel-lint": "./vendor/bin/parallel-lint --exclude vendor --exclude .build --exclude _ide_helper* . ", + "phplint": "yarn parallel-lint && yarn psalm && yarn phpstan ", + "psalm:unused": "yarn psalter --issues=UnusedMethod,PossiblyUnusedMethod,UnusedProperty,PossiblyUnusedProperty,UnusedVariable ", + "psalm": "vendor/bin/psalm --config=psalm.xml ", + "psalm:static_analysis": "yarn psalm --show-info=false --long-progress --threads=4 ", + "rector": "vendor/bin/rector process --dry-run", + "watch:less": "less-watch-compiler --config .build/less-watch-compiler.config.json", + "watch:tail": "tail -f temp/debug.output.log | bunyan", + "watch": "concurrently -r -p \"[{name}]\" -k -n w: \"yarn:watch:*\"", "build": "npm run compile_less && workbox injectManifest workbox-config.js ", - "compile_less": "lessc assets/themes/global.less assets/themes/global.css", + "compile_less": "lessc assets/themes/global.less assets/themes/global.css", "eslint": "eslint --fix --ext js --ignore-path .eslintignore assets", "prettier": "prettier -c --config .prettierrc assets/{js,themes}/*" }, "devDependencies": { + "@types/codemirror": "^0.0.108", + "@types/datatables.net": "^1.10.19", "@types/jquery": "^3.5.1", + "@types/jstree": "^3.3.40", + "@types/select2": "^4.0.53", + "@types/workbox-sw": "^4.3.1", + "@typescript-eslint/eslint-plugin": "^4.19.0", + "@typescript-eslint/parser": "^4.19.0", "babel-eslint": "^10.1.0", + "chai": "^4.2.0", + "concurrently": "^6.0.0", "eslint": "^7.8.1", - "eslint-config-prettier": "^6.11.0", + "eslint-config-prettier": "^7.1.0", "eslint-plugin-prettier": "^3.1.4", + "jstree": "^3.3.11", "less-watch-compiler": "^1.14.6", "lessc": "^1.0.2", "melody-idom": "^1.7.5", @@ -29,4 +52,4 @@ "workbox-cli": "^6.0.2" }, "dependencies": {} -} +}
\ No newline at end of file diff --git a/src/classes/ADONewConnection.php b/src/classes/ADONewConnection.php index 4534e17f..4884f3f0 100644 --- a/src/classes/ADONewConnection.php +++ b/src/classes/ADONewConnection.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin; diff --git a/src/classes/ADORecordSet.php b/src/classes/ADORecordSet.php index cd1b0119..77ea72ab 100644 --- a/src/classes/ADORecordSet.php +++ b/src/classes/ADORecordSet.php @@ -6,10 +6,10 @@ namespace PHPPgAdmin; -use PHPPgAdmin\Interfaces\RecordSet; use ADOFieldObject; use ADORecordSet as ADODBRecordsetClass; use Countable; +use PHPPgAdmin\Interfaces\RecordSet; /** * Extends ADORecordSet to let correct inference on PHPDoc params. @@ -29,7 +29,7 @@ class ADORecordSet extends ADODBRecordsetClass implements Countable, RecordSet * * @return int number of rows or -1 if this is not supported */ - public function RecordCount():int + public function RecordCount(): int { return $this->count(); } @@ -39,7 +39,7 @@ class ADORecordSet extends ADODBRecordsetClass implements Countable, RecordSet * * @param int $fieldoffset * - * @return ADOFieldObject the field + * @return \the the field */ public function FetchField($fieldoffset = -1): ADOFieldObject { diff --git a/src/classes/ADOdbException.php b/src/classes/ADOdbException.php index 3dbe8418..b5d3ec1f 100644 --- a/src/classes/ADOdbException.php +++ b/src/classes/ADOdbException.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin; diff --git a/src/classes/ArrayRecordSet.php b/src/classes/ArrayRecordSet.php index bc7337b3..f6d0fd46 100644 --- a/src/classes/ArrayRecordSet.php +++ b/src/classes/ArrayRecordSet.php @@ -1,14 +1,14 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin; -use PHPPgAdmin\Interfaces\RecordSet; use ADOFieldObject; use Countable; +use PHPPgAdmin\Interfaces\RecordSet; /** * @file @@ -23,7 +23,7 @@ use Countable; * * Id: ArrayRecordSet.php,v 1.3 2007/01/10 01:46:28 soranzo Exp $ */ -class ArrayRecordSet implements Countable , RecordSet +class ArrayRecordSet implements Countable, RecordSet { public $EOF = false; @@ -53,25 +53,27 @@ class ArrayRecordSet implements Countable , RecordSet { return \count($this->_array); } - function FetchField($off = 0): ADOFieldObject - { - // offsets begin at 0 - - $o= new ADOFieldObject(); - - $o->name= array_keys($this->fields)[$off]??null; - $value = $this->fields[$o->name??random_bytes(64)]??null; - $o->type= get_debug_type($value); - $o->max_length = 1024; - return $o; - } + + public function FetchField($off = 0): ADOFieldObject + { + // offsets begin at 0 + + $o = new ADOFieldObject(); + + $o->name = \array_keys($this->fields)[$off] ?? null; + $value = $this->fields[$o->name ?? \random_bytes(64)] ?? null; + $o->type = get_debug_type($value); + $o->max_length = 1024; + + return $o; + } /** * Counts the records in the instance array. * * @return int number of records in the instance array */ - public function RecordCount():int + public function RecordCount(): int { return $this->count(); } diff --git a/src/classes/CheckStyleRenderer.php b/src/classes/CheckStyleRenderer.php index ef23395c..02428209 100644 --- a/src/classes/CheckStyleRenderer.php +++ b/src/classes/CheckStyleRenderer.php @@ -1,17 +1,17 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ + namespace PHPPgAdmin; -use PHPMD\PHPMD; -use PHPMD\Report; use PHPMD\Renderer\XMLRenderer; +use PHPMD\Report; /** * This class will render a Java-checkstyle compatible xml-report. - * for use with cs2pr and others + * for use with cs2pr and others. */ class CheckStyleRenderer extends XMLRenderer { @@ -24,28 +24,8 @@ class CheckStyleRenderer extends XMLRenderer private $fileName; /** - * Get a violation severity level according to the priority - * of the rule that's being broken - * @see https://checkstyle.sourceforge.io/version/4.4/property_types.html#severity - * - priority 1 maps to error level severity - * - priority 2 maps to warning level severity - * - priority > 2 maps to info level severity - * - * @param integer $priority priority of the broken rule - * @return string either error, warning or info - */ - protected function mapPriorityToSeverity($priority) - { - if ($priority>2) { - return 'info'; - } - return $priority===2? 'warning':'error'; - } - /** * This method will be called when the engine has finished the source analysis * phase. - * - * @param Report $report */ public function renderReport(Report $report) { @@ -105,19 +85,41 @@ class CheckStyleRenderer extends XMLRenderer $writer->write('</checkstyle>' . \PHP_EOL); } - /** + + /** + * Get a violation severity level according to the priority + * of the rule that's being broken. + * + * @see https://checkstyle.sourceforge.io/version/4.4/property_types.html#severity + * - priority 1 maps to error level severity + * - priority 2 maps to warning level severity + * - priority > 2 maps to info level severity + * + * @param int $priority priority of the broken rule + * + * @return string either error, warning or info + */ + protected function mapPriorityToSeverity($priority) + { + if (2 < $priority) { + return 'info'; + } + + return 2 === $priority ? 'warning' : 'error'; + } + + /** * This method will write a xml attribute named <b>$attr</b> to the output * when the given <b>$value</b> is not an empty string and is not <b>null</b>. * - * @param string $attr The xml attribute name. - * @param string $value The attribute value. - * @return void + * @param string $attr the xml attribute name + * @param string $value the attribute value */ protected function maybeAdd($attr, $value) { - if ($value === null || trim($value) === '') { + if (null === $value || \trim($value) === '') { return; } $this->getWriter()->write(' ' . $attr . '="' . $value . '"'); } -}
\ No newline at end of file +} diff --git a/src/classes/Connection.php b/src/classes/Connection.php index eb898f7c..d49f4285 100644 --- a/src/classes/Connection.php +++ b/src/classes/Connection.php @@ -1,12 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin; -use ADODB_pdo; use ADODB_postgres9; use PHPPgAdmin\Traits\HelperTrait; @@ -83,9 +82,7 @@ class Connection $this->container = $container; - $this->conn = 'pdo' === $this->adodb_driver ? - $this->getPDOConnection($host, $port, $sslmode, $database, $user, $password, $fetchMode) : - $this->getPG9Connection($host, $port, $sslmode, $database, $user, $password, $fetchMode); + $this->conn = $this->getPG9Connection($host, $port, $sslmode, $database, $user, $password, $fetchMode); $this->conn->setFetchMode($fetchMode); //$this->prtrace($this->conn); } @@ -109,7 +106,7 @@ class Connection return null; } $serverInfo = $this->conn->ServerInfo(); - // dump($serverInfo); + // dump($serverInfo); $this->pgVersion = $serverInfo['version']; $description = \sprintf( 'PostgreSQL %s', @@ -187,27 +184,4 @@ class Connection return $this->conn; } - - private function getPDOConnection( - string $host, - int $port, - string $sslmode, - ?string $database, - ?string $user, - ?string $password, - int $fetchMode = \ADODB_FETCH_ASSOC - ): ADODB_pdo { - $this->conn = ADONewConnection('pdo'); - $this->conn->setFetchMode($fetchMode); - $dsnString = \sprintf( - 'pgsql:host=%s;port=%d;dbname=%s;sslmode=%s;application_name=PHPPgAdmin6', - $host, - $port, - $database, - $sslmode - ); - $this->conn->connect($dsnString, $user, $password); - - return $this->conn; - } } diff --git a/src/classes/ContainerHandlers.php b/src/classes/ContainerHandlers.php index 0b5bebf5..aee76539 100644 --- a/src/classes/ContainerHandlers.php +++ b/src/classes/ContainerHandlers.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin; @@ -19,14 +19,14 @@ class ContainerHandlers * */ private $container; - /** - * @param ContainerUtils $container - */ public function __construct(ContainerUtils $container) { $this->container = $container; } + /** + * @return static + */ public function storeMainRequestParams(): self { $this->container['action'] = $_REQUEST['action'] ?? ''; @@ -41,7 +41,7 @@ class ContainerHandlers /** * Sets the views. * - * @return self ( description_of_the_return_value ) + * @return static ( description_of_the_return_value ) */ public function setViews(): self { @@ -69,7 +69,7 @@ class ContainerHandlers /** * Sets the instance of Misc class. * - * @return self ( description_of_the_return_value ) + * @return static ( description_of_the_return_value ) */ public function setMisc(): self { @@ -96,6 +96,9 @@ class ContainerHandlers return $this; } + /** + * @return static + */ public function setExtra(): self { $container = $this->container; @@ -112,9 +115,15 @@ class ContainerHandlers return $this; } + /** + * @return static + */ public function setHaltHandler(): self { - $this->container['haltHandler'] = static function (ContainerUtils $c) { + $this->container['haltHandler'] = /** + * @psalm-return \Closure(mixed, mixed, mixed, mixed=):mixed + */ + static function (ContainerUtils $c): \Closure { return static function ($request, $response, $exits, $status = 500) { $title = 'PHPPgAdmin Error'; diff --git a/src/classes/ContainerUtils.php b/src/classes/ContainerUtils.php index 7199f163..2b1c00db 100644 --- a/src/classes/ContainerUtils.php +++ b/src/classes/ContainerUtils.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin; @@ -19,21 +19,21 @@ use Slim\Http\Request; use Slim\Http\Response; /** + * @property string $BASE_PATH + * @property string $database + * @property bool $DEBUGMODE * @property array $deploy_info - * @property Messages $flash * @property \GuzzleHttp\Client $fcIntranetClient + * @property Messages $flash + * @property bool $IN_TEST * @property Misc $misc - * @property ViewManager $view * @property Request $request * @property Response $response - * @property string $BASE_PATH - * @property string $THEME_PATH - * @property string $subFolder - * @property bool $DEBUGMODE - * @property bool $IN_TEST - * @property string $server - * @property string $database * @property string $schema + * @property string $server + * @property string $subFolder + * @property string $THEME_PATH + * @property ViewManager $view * * @method mixed get(string) */ @@ -110,7 +110,7 @@ class ContainerUtils extends Container implements ContainerInterface $container = self::getContainerInstance($config); - if (self::$appInstance === null) { + if (null === self::$appInstance) { self::$appInstance = new App($container); } @@ -137,13 +137,13 @@ class ContainerUtils extends Container implements ContainerInterface ]; self::$envConfig = \array_merge(self::$envConfig, $config); - if (self::$instance === null) { + + if (null === self::$instance) { self::$instance = new static(self::$envConfig); self::$instance ->withConf(self::$envConfig); - $handlers = new ContainerHandlers(self::$instance); $handlers->setExtra() ->setMisc() @@ -171,10 +171,10 @@ class ContainerUtils extends Container implements ContainerInterface $destinationurl = $this->subFolder . '/intro'; } else { // otherwise, you'll be redirected to the login page for that server; - $destinationurl = $this->subFolder . '/login' . ($query_string !== '' ? '?' . $query_string : ''); + $destinationurl = $this->subFolder . '/login' . ('' !== $query_string ? '?' . $query_string : ''); } // ddd($destinationurl); - return (strpos($destinationurl, '/') === 0) ? $destinationurl : '/' . $destinationurl; + return (\mb_strpos($destinationurl, '/') === 0) ? $destinationurl : '/' . $destinationurl; } /** @@ -196,20 +196,19 @@ class ContainerUtils extends Container implements ContainerInterface } } - public function getActionUrl($subject, bool $debug = false) + /** + * @param mixed $subject + * + * @return null|Decorators\ActionUrlDecorator + */ + public function getActionUrl($subject, bool $debug = false) { $container = self::getContainerInstance(); $_server_info = $container->misc->getServerInfo(); $url = $container->misc->getLastTabURL($subject) ?? ['url' => 'alldb', 'urlvars' => ['subject' => 'server']]; - $url['urlvars'] = array_merge([], $url['urlvars'] ?? []); - + $url['urlvars'] = \array_merge([], $url['urlvars'] ?? []); if (isset($_server_info['username']) && \is_array($url)) { - - - - - $this->addFlash($url, 'getLastTabURL for ' . $subject); // Load query vars into superglobal arrays @@ -227,11 +226,13 @@ class ContainerUtils extends Container implements ContainerInterface //kdump($url); return null; } + /** * Gets the destination with the last active tab selected for that controller * Usually used after going through a redirect route. * * @param string $subject The subject, usually a view name like 'server' or 'table' + * @param array $urlvars * * @return string The destination url with last tab set in the query string */ @@ -243,14 +244,10 @@ class ContainerUtils extends Container implements ContainerInterface //$this->prtrace('$_server_info', $_server_info); // If username isn't set in server_info, you should login $url = $container->misc->getLastTabURL($subject) ?? ['url' => 'alldb', 'urlvars' => ['subject' => 'server']]; - $url['urlvars'] = array_merge($urlvars, $url['urlvars'] ?? []); + $url['urlvars'] = \array_merge($urlvars, $url['urlvars'] ?? []); $destinationurl = $this->getRedirectUrl(); - if (isset($_server_info['username']) && \is_array($url)) { - - - - + if (isset($_server_info['username']) && \is_array($url)) { $this->addFlash($url, 'getLastTabURL for ' . $subject); // Load query vars into superglobal arrays @@ -264,9 +261,10 @@ class ContainerUtils extends Container implements ContainerInterface $_GET = \array_merge($_GET, $urlvars); $actionurl = Decorator::actionurl($url['url'], $_GET); - $destinationurl = str_replace($this->subFolder, '', $actionurl->value($_GET)); + $destinationurl = \str_replace($this->subFolder, '', $actionurl->value($_GET)); } - return (($container->subFolder === '' || strpos($destinationurl, $container->subFolder) === 0) ? '' : $container->subFolder) . $destinationurl; + + return (('' === $container->subFolder || \mb_strpos($destinationurl, $container->subFolder) === 0) ? '' : $container->subFolder) . $destinationurl; } /** @@ -274,7 +272,7 @@ class ContainerUtils extends Container implements ContainerInterface * * @param string $errormsg The error msg * - * @return Container The app container + * @return self The app container */ public function addError(string $errormsg): Container { @@ -298,9 +296,14 @@ class ContainerUtils extends Container implements ContainerInterface return \str_replace(['<br>', '<br/>', '<br />'], \PHP_EOL, $msg); } + /** + * @return (bool|string)[][] + * + * @psalm-return array{settings: array{displayErrorDetails: bool, determineRouteBeforeAppMiddleware: true, base_path: string, debug: bool, phpMinVer: string, addContentLengthHeader: false, appName: string}} + */ public static function getDefaultConfig(bool $debug = false): array { - return [ + return [ 'settings' => [ 'displayErrorDetails' => $debug, 'determineRouteBeforeAppMiddleware' => true, @@ -313,8 +316,18 @@ class ContainerUtils extends Container implements ContainerInterface ]; } + public function getAllRequestVars(): array + { + return \array_merge( + $this->request->getQueryParams() ?? [], + $this->request->getParsedBody() ?? [] + ); + } + /** * @param array $conf + * + * @return static */ private function withConf($conf): self { @@ -327,7 +340,12 @@ class ContainerUtils extends Container implements ContainerInterface $container->THEME_PATH = $conf['theme_path']; $container->IN_TEST = $conf['IN_TEST']; $container['errors'] = []; - $container['conf'] = static function (Container $c) use ($conf): array { + $container['conf'] = /** + * @return (bool[]|mixed|string)[] + * + * @psalm-return array{plugins: array<empty, empty>, display_sizes: array{schemas: bool, tables: bool}, theme: mixed|string} + */ + static function (Container $c) use ($conf): array { $display_sizes = $conf['display_sizes']; if (\is_array($display_sizes)) { diff --git a/src/classes/Misc.php b/src/classes/Misc.php index c32fceb5..bed33dc5 100644 --- a/src/classes/Misc.php +++ b/src/classes/Misc.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin; @@ -184,7 +184,7 @@ class Misc * @param string $key name of the key to set * @param mixed $value value of the key to set * - * @return \PHPPgAdmin\Misc this class instance + * @return static this class instance */ public function setConf($key, $value) { @@ -240,7 +240,7 @@ class Misc * * @param ViewManager $view view instance * - * @return \PHPPgAdmin\Misc this class instance + * @return static this class instance */ public function setView(ViewManager $view) { @@ -259,7 +259,7 @@ class Misc * * @param bool $flag true or false to allow unconnected clients to access the view * - * @return \PHPPgAdmin\Misc this class instance + * @return static this class instance */ public function setNoDBConnection($flag) { @@ -283,7 +283,7 @@ class Misc * * @param string $msg error message string * - * @return \PHPPgAdmin\Misc this class instance + * @return static this class instance */ public function setErrorMsg($msg) { @@ -337,7 +337,7 @@ class Misc return null; } - if ($_connection === null) { + if (null === $_connection) { $this->container->addError($lang['strloginfailed']); $this->setErrorMsg($lang['strloginfailed']); @@ -382,9 +382,9 @@ class Misc } } - if ($this->getNoDBConnection() || - null === $this->getDatabase() || - !isset($_REQUEST['schema']) + if ($this->getNoDBConnection() + || null === $this->getDatabase() + || !isset($_REQUEST['schema']) ) { return $this->_data; } @@ -402,10 +402,9 @@ class Misc /** * Undocumented function. * - * @param string $database * @param string $server_id * - * @return null|Connection + * @return Connection */ public function getConnection(string $database = '', $server_id = null): ?Connection { @@ -429,16 +428,16 @@ class Misc 'administrator' => 'administrator', ]; - if (isset($server_info['username']) && - \array_key_exists(\mb_strtolower($server_info['username']), $bad_usernames) + if (isset($server_info['username']) + && \array_key_exists(\mb_strtolower($server_info['username']), $bad_usernames) ) { $msg = $lang['strlogindisallowed']; throw new Exception($msg); } - if (!isset($server_info['password']) || - '' === $server_info['password'] + if (!isset($server_info['password']) + || '' === $server_info['password'] ) { $msg = $lang['strlogindisallowed']; @@ -489,8 +488,8 @@ class Misc $server_string = $info['host'] . ':' . $info['port'] . ':' . $info['sslmode']; $server_sha = \sha1($server_string); - if ($this->_server_id === $server_string || - $this->_server_id === $server_sha + if ($this->_server_id === $server_string + || $this->_server_id === $server_sha ) { if (isset($info['username'])) { $this->setServerInfo(null, $info, $this->_server_id); @@ -555,10 +554,10 @@ class Misc $server_info = $this->getServerInfo($this->_server_id); - if (null !== $this->_server_id && - isset($server_info['useonlydefaultdb']) && - true === $server_info['useonlydefaultdb'] && - isset($server_info['defaultdb']) + if (null !== $this->_server_id + && isset($server_info['useonlydefaultdb']) + && true === $server_info['useonlydefaultdb'] + && isset($server_info['defaultdb']) ) { $this->_database = $server_info['defaultdb']; } elseif ('' !== $database) { @@ -581,7 +580,7 @@ class Misc * * @param string $schema The schema name * - * @return int 0 on success + * @return int|string 0 on success */ public function setCurrentSchema($schema) { @@ -617,7 +616,7 @@ class Misc /** * Sets the href tracking variable. * - * @return \PHPPgAdmin\Misc this class instance + * @return static this class instance */ public function setHREF() { @@ -667,7 +666,7 @@ class Misc public function stripVar(&$var): void { if (\is_array($var)) { - foreach (array_keys($var) as $k) { + foreach (\array_keys($var) as $k) { $this->stripVar($var[$k]); /* magic_quotes_gpc escape keys as well ...*/ @@ -691,7 +690,7 @@ class Misc * * @param mixed $strIniSize The PHP.INI variable * - * @return bool|float|int size in bytes, false on failure + * @return false|float size in bytes, false on failure */ public function inisizeToBytes($strIniSize) { @@ -722,6 +721,13 @@ class Misc } } + /** + * @param string $subject + * + * @return (mixed|string)[] + * + * @psalm-return array{subject?: string, server?: string, database?: string, schema?: mixed} + */ public function getRequestVars($subject = '') { $v = []; @@ -802,8 +808,8 @@ class Misc [$usec, $sec] = \explode(' ', \microtime()); $time = ((float) $usec + (float) $sec); - $server = $this->container->server !== '' ? $this->container->server : $_REQUEST['server']; - $database = $this->container->database !== '' ? $this->container->database : $_REQUEST['database']; + $server = '' !== $this->container->server ? $this->container->server : $_REQUEST['server']; + $database = '' !== $this->container->database ? $this->container->database : $_REQUEST['database']; $_SESSION['history'][$server][$database][\sprintf( '%s', diff --git a/src/classes/Translations.php b/src/classes/Translations.php index 087f4701..9c8d8593 100644 --- a/src/classes/Translations.php +++ b/src/classes/Translations.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin; diff --git a/src/classes/ViewManager.php b/src/classes/ViewManager.php index 0217b515..e4dd45e4 100644 --- a/src/classes/ViewManager.php +++ b/src/classes/ViewManager.php @@ -1,14 +1,12 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin; use PHPPgAdmin\Traits\HelperTrait; -use Psr\Http\Message\ResponseInterface; -use Slim\Http\Response; use Slim\Views\Twig; use Slim\Views\TwigExtension; @@ -127,9 +125,8 @@ class ViewManager extends Twig private static $instance; /** - * @param mixed $path - * @param mixed $settings - * @param ContainerUtils $c + * @param mixed $path + * @param mixed $settings */ public function __construct($path, $settings, ContainerUtils $c) { @@ -187,7 +184,7 @@ class ViewManager extends Twig * * @param bool $flag sets internal $_reload_browser var which will be passed to the footer methods * - * @return \PHPPgAdmin\ViewManager this class instance + * @return static this class instance */ public function setReloadBrowser($flag): self { @@ -196,16 +193,11 @@ class ViewManager extends Twig return $this; } - /** - * @return bool - */ public function getReloadBrowser(): bool { return $this->_reload_browser; } - - /** * Gets the theme from * 1. The $_REQUEST global (when it's chosen from start screen) @@ -225,31 +217,31 @@ class ViewManager extends Twig // Check if theme is in $_REQUEST, $_SESSION or $_COOKIE // 1.- First priority: $_REQUEST, this happens when you use the selector - if (\array_key_exists('theme', $_REQUEST) && - \array_key_exists($_REQUEST['theme'], $themefolders) + if (\array_key_exists('theme', $_REQUEST) + && \array_key_exists($_REQUEST['theme'], $themefolders) ) { $_theme = $_REQUEST['theme']; } elseif ( // otherwise, see if there's a theme associated with this particular server - null !== $_server_info && - \array_key_exists('theme', $_server_info) && - \is_string($_server_info['theme']) && - \array_key_exists($_COOKIE['ppaTheme'], $themefolders) + null !== $_server_info + && \array_key_exists('theme', $_server_info) + && \is_string($_server_info['theme']) + && \array_key_exists($_COOKIE['ppaTheme'], $themefolders) ) { $_theme = $_server_info['theme']; - } elseif (isset($_SESSION) && \array_key_exists('ppaTheme', $_SESSION) && - \array_key_exists($_SESSION['ppaTheme'], $themefolders) + } elseif (isset($_SESSION) && \array_key_exists('ppaTheme', $_SESSION) + && \array_key_exists($_SESSION['ppaTheme'], $themefolders) ) { // otherwise check $_SESSION $_theme = $_SESSION['ppaTheme']; - } elseif (\array_key_exists('ppaTheme', $_COOKIE) && - \array_key_exists($_COOKIE['ppaTheme'], $themefolders) + } elseif (\array_key_exists('ppaTheme', $_COOKIE) + && \array_key_exists($_COOKIE['ppaTheme'], $themefolders) ) { // oterwise check $_COOKIE $_theme = $_COOKIE['ppaTheme']; } elseif ( // see if there's a valid theme set in config file - \array_key_exists('theme', $conf) && - \is_string($conf['theme']) && - \array_key_exists($conf['theme'], $themefolders) + \array_key_exists('theme', $conf) + && \is_string($conf['theme']) + && \array_key_exists($conf['theme'], $themefolders) ) { $_theme = $conf['theme']; } @@ -264,7 +256,7 @@ class ViewManager extends Twig { $form = []; - if ($this->container->server !== '') { + if ('' !== $this->container->server) { $form[] = \sprintf( '<input type="hidden" name="%s" value="%s" />', 'server', @@ -272,7 +264,7 @@ class ViewManager extends Twig ); } - if ($this->container->database !== '') { + if ('' !== $this->container->database) { $form[] = \sprintf( '<input type="hidden" name="%s" value="%s" />', 'database', @@ -280,7 +272,7 @@ class ViewManager extends Twig ); } - if ($this->container->schema !== '') { + if ('' !== $this->container->schema) { $form[] = \sprintf( '<input type="hidden" name="%s" value="%s" />', 'schema', @@ -335,8 +327,6 @@ class ViewManager extends Twig /** * @param string $icon - * - * @return string */ public function icon($icon = ''): string { @@ -443,6 +433,19 @@ class ViewManager extends Twig return $default_icon; } + /** + * Undocumented function. + * + * @psalm-suppress LessSpecificReturnStatement + * @psalm-suppress MoreSpecificReturnType + * + * @return class-string + */ + public function getControllerClassName(string $subject): string + { + return '\PHPPgAdmin\Controller\\' . \ucfirst($subject) . 'Controller'; + } + private function getCookieTheme(): ?string { $cookie_theme = $_COOKIE['ppaTheme'] ?? null; @@ -482,48 +485,6 @@ class ViewManager extends Twig $_SESSION['ppaTheme'] = $_theme; } } -/** - * Undocumented function - * @deprecated v6.2.0 we won't use iframes anymore. - * @param Response $response - * @param string $subject - * @param string $query_string - * @param string $template - * @return ResponseInterface - */ -public function maybeRenderIframes(Response $response, string $subject, string $query_string,string $template='intro_view.twig') -{ - $c = $this->getContainer(); - - $in_test = $this->offsetGet('in_test'); - $includeJsTree = $this->offsetExists('includeJsTree')?$this->offsetGet('includeJsTree'):false; - - if ('1' === $in_test||$includeJsTree) { - $className = self::getControllerClassName($subject); - $controller = new $className($c); - - return $controller->render(); - } - $viewVars = [ - 'url' => '/src/views/' . $subject . ($query_string !== '' ? '?' . $query_string : ''), - 'headertemplate' => 'header.twig', - ]; - - return $this->render($response, $template, $viewVars); -} - /** - * Undocumented function. - * - * @param string $subject - * @psalm-suppress LessSpecificReturnStatement - * @psalm-suppress MoreSpecificReturnType - * - * @return class-string - */ - public function getControllerClassName(string $subject): string - { - return '\PHPPgAdmin\Controller\\' . \ucfirst($subject) . 'Controller'; - } private function getContainer(): ContainerUtils { @@ -568,8 +529,8 @@ public function maybeRenderIframes(Response $response, string $subject, string $ 'global.css' ); // if $folderpath if indeed a folder and contains a global.css file, then it's a theme - if (\is_dir($folderpath) && - \is_file($stylesheet) + if (\is_dir($folderpath) + && \is_file($stylesheet) ) { $themefolders[$foldername] = $folderpath; } diff --git a/src/controllers/AcinsertController.php b/src/controllers/AcinsertController.php index 4dafaecc..94415d32 100644 --- a/src/controllers/AcinsertController.php +++ b/src/controllers/AcinsertController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; @@ -14,7 +14,7 @@ class AcinsertController extends BaseController /** * Default method to render the controller according to the action parameter. */ - public function render(): void + public function render() { $data = $this->misc->getDatabaseAccessor(); diff --git a/src/controllers/AggregatesController.php b/src/controllers/AggregatesController.php index 601dd562..c572140b 100644 --- a/src/controllers/AggregatesController.php +++ b/src/controllers/AggregatesController.php @@ -1,13 +1,13 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use Slim\Http\Response; use PHPPgAdmin\Decorators\Decorator; +use Slim\Http\Response; /** * Base controller class. @@ -20,6 +20,8 @@ class AggregatesController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|Response|string */ public function render() { @@ -91,7 +93,7 @@ class AggregatesController extends BaseController * * @param mixed $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $this->printTrail('schema'); $this->printTabs('schema', 'aggregates'); @@ -162,7 +164,9 @@ class AggregatesController extends BaseController unset($actions['alter']); } - echo $this->printTable($aggregates, $columns, $actions, $this->table_place, $this->lang['strnoaggregates']); + if (self::isRecordset($aggregates)) { + echo $this->printTable($aggregates, $columns, $actions, $this->table_place, $this->lang['strnoaggregates']); + } $navlinks = [ 'create' => [ @@ -259,7 +263,7 @@ class AggregatesController extends BaseController * * @param mixed $msg */ - public function doCreate($msg = ''): void + public function doCreate($msg = '') { $this->data = $this->misc->getDatabaseAccessor(); @@ -418,7 +422,7 @@ class AggregatesController extends BaseController * * @param mixed $msg */ - public function doAlter($msg = ''): void + public function doAlter($msg = '') { $this->data = $this->misc->getDatabaseAccessor(); @@ -542,7 +546,7 @@ class AggregatesController extends BaseController * * @param mixed $msg */ - public function doProperties($msg = ''): void + public function doProperties($msg = '') { $this->data = $this->misc->getDatabaseAccessor(); diff --git a/src/controllers/AlldbController.php b/src/controllers/AlldbController.php index 479efe92..b74d6cdc 100644 --- a/src/controllers/AlldbController.php +++ b/src/controllers/AlldbController.php @@ -1,14 +1,14 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use Slim\Http\Response; use PHPPgAdmin\Decorators\Decorator; use PHPPgAdmin\Traits\ExportTrait; +use Slim\Http\Response; /** * Base controller class. @@ -23,6 +23,8 @@ class AlldbController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|Response|string */ public function render() { @@ -85,7 +87,7 @@ class AlldbController extends BaseController $output = \ob_get_clean(); $this->printHeader($this->headerTitle(), null, true, $header_template); - $this->printBody(true,'flexbox_body',false,true); + $this->printBody(true, 'flexbox_body', false, true); echo $output; return $this->printFooter(); @@ -96,7 +98,7 @@ class AlldbController extends BaseController * * @param mixed $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $this->printTrail('server'); $this->printTabs('server', 'databases'); @@ -114,7 +116,7 @@ class AlldbController extends BaseController 'database' => [ 'title' => $this->lang['strdatabase'], 'field' => Decorator::field('datname'), - 'url' => $redirecturl . '&', + 'url' => $redirecturl . '&', 'vars' => ['database' => 'datname'], ], 'owner' => [ @@ -218,7 +220,9 @@ class AlldbController extends BaseController unset($actions['privileges']); } - echo $this->printTable($databases, $columns, $actions, $this->table_place, $this->lang['strnodatabases']); + if (self::isRecordSet($databases)) { + echo $this->printTable($databases, $columns, $actions, $this->table_place, $this->lang['strnodatabases']); + } $navlinks = [ 'create' => [ @@ -255,6 +259,7 @@ class AlldbController extends BaseController 'action' => Decorator::redirecturl('redirect', $reqvars, ['subject' => 'database', 'database' => Decorator::field('datname')]), 'branch' => Decorator::url('/src/views/database', $reqvars, ['action' => 'tree', 'database' => Decorator::field('datname')]), ]; + return $this->printTree($databases, $attrs, 'databases'); } @@ -288,7 +293,7 @@ class AlldbController extends BaseController // Fetch all users $rs = $data->getDatabaseOwner($_REQUEST['alterdatabase']); - $owner = isset($rs->fields['usename']) ? $rs->fields['usename'] : ''; + $owner = $rs->fields['usename'] ?? ''; $users = $data->getUsers(); echo \sprintf( @@ -308,7 +313,7 @@ class AlldbController extends BaseController if ($data->hasSharedComments()) { $rs = $data->getDatabaseComment($_REQUEST['alterdatabase']); - $comment = isset($rs->fields['description']) ? $rs->fields['description'] : ''; + $comment = $rs->fields['description'] ?? ''; echo \sprintf( '<tr><th class="data left">%s</th>', $this->lang['strcomment'] @@ -443,7 +448,7 @@ class AlldbController extends BaseController * * @param mixed $msg */ - public function doCreate($msg = ''): void + public function doCreate($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -659,7 +664,7 @@ class AlldbController extends BaseController * * @param mixed $msg */ - public function doExport($msg = ''): void + public function doExport($msg = '') { $this->printTrail('server'); $this->printTabs('server', 'export'); diff --git a/src/controllers/BaseController.php b/src/controllers/BaseController.php index c454b9f3..7263a090 100644 --- a/src/controllers/BaseController.php +++ b/src/controllers/BaseController.php @@ -1,12 +1,12 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use PHPPgAdmin\ADORecordSet; +use IteratorAggregate; use PHPPgAdmin\ArrayRecordSet; use PHPPgAdmin\ContainerUtils; use PHPPgAdmin\Misc; @@ -17,17 +17,16 @@ use PHPPgAdmin\XHtml\HTMLFooterController; use PHPPgAdmin\XHtml\HTMLHeaderController; use PHPPgAdmin\XHtml\HTMLNavbarController; use PHPPgAdmin\XHtml\HTMLTableController; -use Slim\Http\Response; -use ADORecordSet as ADODBRecordsetClass; /** * Base controller class. */ class BaseController { - public $postgresqlMinVer; use HelperTrait; + public $postgresqlMinVer; + public $appLangFiles = []; public $appThemes = []; @@ -126,8 +125,7 @@ class BaseController /** * Constructs the base controller (common for almost all controllers). * - * @param ContainerUtils $container the $app container - * @param bool $no_db_connection [optional] if true, sets $this->misc->setNoDBConnection(true); + * @param ContainerUtils $container the $app container */ public function __construct(ContainerUtils $container) { @@ -202,9 +200,9 @@ class BaseController */ public function headerTitle($title = '', $prefix = '', $suffix = '') { - $title = $title !== '' ? $title : $this->controller_title; + $title = '' !== $title ? $title : $this->controller_title; - return $prefix . $this->lang[$title] . ($suffix !== '' ? ': ' . $suffix : ''); + return $prefix . $this->lang[$title] . ('' !== $suffix ? ': ' . $suffix : ''); } /** @@ -218,16 +216,16 @@ class BaseController /** * Display a table of data. * - * @param ADORecordSet|ArrayRecordSet $tabledata a set of data to be formatted - * @param array $columns An associative array of columns to be displayed: - * @param array $actions Actions that can be performed on each object: - * @param string $place Place where the $actions are displayed. Like 'display-browse', - * @param string $nodata (optional) Message to display if data set is empty - * @param callable $pre_fn (optional) callback closure for each row + * @param IteratorAggregate $tabledata a set of data to be formatted + * @param array $columns An associative array of columns to be displayed: + * @param array $actions Actions that can be performed on each object: + * @param string $place Place where the $actions are displayed. Like 'display-browse', + * @param string $nodata (optional) Message to display if data set is empty + * @param callable $pre_fn (optional) callback closure for each row * * @return string the html of the table */ - public function printTable(&$tabledata, &$columns, &$actions, $place, $nodata = '', $pre_fn = null) + public function printTable(IteratorAggregate &$tabledata, &$columns, &$actions, $place, $nodata = '', $pre_fn = null) { $html_table = $this->_getTableController(); @@ -236,12 +234,17 @@ class BaseController return $html_table->printTable(); } + public static function isRecordSet($variable) + { + return $variable instanceof IteratorAggregate && \method_exists($variable, 'MoveNext'); + } + /** * Hides or show tree tabs according to their properties. * * @param array $tabs The tabs * - * @return ADORecordSet|ArrayRecordSet filtered tabs in the form of an ArrayRecordSet + * @return ArrayRecordSet filtered tabs in the form of an ArrayRecordSet */ public function adjustTabsForTree(&$tabs) { @@ -253,14 +256,15 @@ class BaseController /** * Produce JSON data for the browser tree. * - * @param \PHPPgAdmin\Interfaces\Recordset|\ADORecordSet - * @param array $attrs Attributes for tree items - * @param string $section The section where the branch is linked in the tree - * @param bool $print either to return or echo the result + * @param \ADORecordSet|\PHPPgAdmin\Interfaces\Recordset + * @param false|string $section + * @param bool $print either to return or echo the result + * + * @return (array|bool|string)[] * - * @return Response|string the json rendered tree + * @psalm-return array<int|string, array<string, mixed>|bool|string> */ - public function printTree( &$_treedata, &$attrs, $section, $print = true) + public function printTree(&$_treedata, &$attrs, $section, $print = true) { $tree = $this->_getTreeController(); @@ -285,9 +289,9 @@ class BaseController /** * @param (array[][]|mixed)[][] $navlinks - * @param string $place - * @param array $env * @param mixed $do_print + * + * @return null|string */ public function printNavLinks(array $navlinks, string $place, array $env = [], $do_print = true) { @@ -306,9 +310,10 @@ class BaseController } /** - * @param true $do_print - * @param null|string $from - * @param mixed $link + * @param true $do_print + * @param mixed $link + * + * @return null|string */ public function printLink($link, bool $do_print = true, ?string $from = null) { @@ -323,6 +328,8 @@ class BaseController /** * @param true $flag + * + * @return HTMLFooterController */ public function setReloadDropDatabase(bool $flag) { @@ -333,6 +340,8 @@ class BaseController /** * @param true $flag + * + * @return HTMLFooterController */ public function setNoBottomLink(bool $flag) { @@ -341,6 +350,9 @@ class BaseController return $footer_controller->setNoBottomLink($flag); } + /** + * @return null|string + */ public function printFooter(bool $doBody = true, string $template = 'footer.twig') { $footer_controller = $this->_getFooterController(); @@ -383,6 +395,8 @@ class BaseController /** * @param true $flag + * + * @return HTMLHeaderController */ public function setNoOutput(bool $flag) { @@ -392,39 +406,32 @@ class BaseController } /** - * @param null|string $script - * @param string $title - * @param bool $do_print - * @param string $template + * @return string */ public function printHeader(string $title = '', ?string $script = null, bool $do_print = true, string $template = 'header.twig') { - $title = $title !== '' ? $title : $this->headerTitle(); + $title = '' !== $title ? $title : $this->headerTitle(); $header_controller = $this->_getHeaderController(); return $header_controller->printHeader($title, $script, $do_print, $template); } /** - * Undocumented function + * Undocumented function. + * + * @param bool $includeJsTree either to add the jsTree in the root body. By default is inserted using an iframe * - * @param boolean $doBody - * @param string $bodyClass - * @param boolean $onloadInit - * @param boolean $includeJsTree either to add the jsTree in the root body. By default is inserted using an iframe * @return string */ - public function printBody(bool $doBody = true, string $bodyClass = 'detailbody', bool $onloadInit = false,bool $includeJsTree=true) + public function printBody(bool $doBody = true, string $bodyClass = 'detailbody', bool $onloadInit = false, bool $includeJsTree = true) { $header_controller = $this->_getHeaderController(); - return $header_controller->printBody($doBody, $bodyClass, $onloadInit,$includeJsTree); + return $header_controller->printBody($doBody, $bodyClass, $onloadInit, $includeJsTree); } /** - * @param null|string $help - * @param string $title - * @param bool $do_print + * @return string */ public function printTitle(string $title, ?string $help = null, bool $do_print = true) { @@ -434,9 +441,7 @@ class BaseController } /** - * Retrieves a request parameter either from the body or query string - * @param string $key - * @param null|string $default + * Retrieves a request parameter either from the body or query string. */ public function getRequestParam(string $key, ?string $default = null) { @@ -444,7 +449,6 @@ class BaseController } /** - * @param string $key * @param null|array|bool|float|int|string $default * * @return bool| null|array|string|int|float @@ -460,23 +464,12 @@ class BaseController * * @return null|array|float|int|string */ - public function getQueryStrinParam($key, $default = null) + public function getQueryStringParam($key, $default = null) { return \requestInstance()->getQueryParam($key, $default); } /** - * @return array - */ - public function getAllParams(): array - { - return \array_merge( - \requestInstance()->getQueryParams() ?? [], - \requestInstance()->getParsedBody() ?? [] - ); - } - - /** * Print out a message. * * @param string $msg The message diff --git a/src/controllers/BrowserController.php b/src/controllers/BrowserController.php index 3c47284d..64fadb58 100644 --- a/src/controllers/BrowserController.php +++ b/src/controllers/BrowserController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; @@ -20,6 +20,8 @@ class BrowserController extends BaseController * Default method to render the controller according to the action parameter. * * @param null|mixed $action + * + * @return string */ public function render($action = null) { diff --git a/src/controllers/CastsController.php b/src/controllers/CastsController.php index 29451a9a..a5f7b927 100644 --- a/src/controllers/CastsController.php +++ b/src/controllers/CastsController.php @@ -1,13 +1,13 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use Slim\Http\Response; use PHPPgAdmin\Decorators\Decorator; +use Slim\Http\Response; /** * Base controller class. @@ -18,6 +18,8 @@ class CastsController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|Response|string */ public function render() { @@ -28,7 +30,7 @@ class CastsController extends BaseController $this->printHeader(); $this->printBody(); $this->doDefault(); - + return $this->printFooter(); } @@ -37,7 +39,7 @@ class CastsController extends BaseController * * @param mixed $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -88,7 +90,9 @@ class CastsController extends BaseController $actions = []; - echo $this->printTable($casts, $columns, $actions, 'casts-casts', $this->lang['strnocasts']); + if (self::isRecordset($casts)) { + echo $this->printTable($casts, $columns, $actions, 'casts-casts', $this->lang['strnocasts']); + } } /** diff --git a/src/controllers/ColpropertiesController.php b/src/controllers/ColpropertiesController.php index ac4ba282..52553f9f 100644 --- a/src/controllers/ColpropertiesController.php +++ b/src/controllers/ColpropertiesController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; @@ -22,7 +22,7 @@ class ColpropertiesController extends BaseController /** * Default method to render the controller according to the action parameter. */ - public function render(): void + public function render() { if (isset($_REQUEST['table']) && !empty($_REQUEST['table'])) { $this->tableName = &$_REQUEST['table']; @@ -125,7 +125,10 @@ class ColpropertiesController extends BaseController } $actions = []; - echo $this->printTable($attrs, $column, $actions, $this->table_place, $this->lang['strnodata'], $attPre); + + if (self::isRecordset($attrs)) { + echo $this->printTable($attrs, $column, $actions, $this->table_place, $this->lang['strnodata'], $attPre); + } echo '<br />' . \PHP_EOL; @@ -228,7 +231,7 @@ class ColpropertiesController extends BaseController * * @param mixed $msg */ - public function doAlter($msg = ''): void + public function doAlter($msg = '') { $data = $this->misc->getDatabaseAccessor(); diff --git a/src/controllers/ConstraintsController.php b/src/controllers/ConstraintsController.php index 332b3107..4589d2e5 100644 --- a/src/controllers/ConstraintsController.php +++ b/src/controllers/ConstraintsController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; @@ -116,7 +116,7 @@ class ConstraintsController extends BaseController * * @param mixed $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -171,7 +171,9 @@ class ConstraintsController extends BaseController ], ]; - echo $this->printTable($constraints, $columns, $actions, 'constraints-constraints', $this->lang['strnoconstraints'], $cnPre); + if (self::isRecordset($constraints)) { + echo $this->printTable($constraints, $columns, $actions, 'constraints-constraints', $this->lang['strnoconstraints'], $cnPre); + } $navlinks = [ 'addcheck' => [ @@ -243,7 +245,7 @@ class ConstraintsController extends BaseController * * @param string $msg The message */ - public function formAddForeignKey($msg = ''): void + public function formAddForeignKey($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -702,9 +704,9 @@ class ConstraintsController extends BaseController $this->coalesceArr($_POST, 'target', ''); // Check that they've given at least one source column - if (!isset($_REQUEST['SourceColumnList']) && (!isset($_POST['IndexColumnList']) || - !\is_array($_POST['IndexColumnList']) || - 0 === \count($_POST['IndexColumnList']))) { + if (!isset($_REQUEST['SourceColumnList']) && (!isset($_POST['IndexColumnList']) + || !\is_array($_POST['IndexColumnList']) + || 0 === \count($_POST['IndexColumnList']))) { return $this->formAddForeignKey($this->lang['strfkneedscols']); } // Copy the IndexColumnList variable from stage 1 diff --git a/src/controllers/ConversionsController.php b/src/controllers/ConversionsController.php index e2721f8b..5ebd28c6 100644 --- a/src/controllers/ConversionsController.php +++ b/src/controllers/ConversionsController.php @@ -1,13 +1,13 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use Slim\Http\Response; use PHPPgAdmin\Decorators\Decorator; +use Slim\Http\Response; /** * Base controller class. @@ -18,6 +18,8 @@ class ConversionsController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|Response|string */ public function render() { @@ -28,7 +30,6 @@ class ConversionsController extends BaseController $this->printHeader(); $this->printBody(); $this->doDefault(); - return $this->printFooter(); } @@ -38,7 +39,7 @@ class ConversionsController extends BaseController * * @param string $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -74,7 +75,9 @@ class ConversionsController extends BaseController $actions = []; - echo $this->printTable($conversions, $columns, $actions, 'conversions-conversions', $this->lang['strnoconversions']); + if (self::isRecordset($conversions)) { + echo $this->printTable($conversions, $columns, $actions, 'conversions-conversions', $this->lang['strnoconversions']); + } } /** @@ -86,7 +89,12 @@ class ConversionsController extends BaseController $constraints = $data->getConstraints($_REQUEST['table']); - $getIcon = static function ($f) { + $getIcon = /** + * @param mixed $f + * + * @return null|string + */ + static function ($f) { switch ($f['contype']) { case 'u': return 'UniqueConstraint'; diff --git a/src/controllers/DatabaseController.php b/src/controllers/DatabaseController.php index e9801e91..f4842ef6 100644 --- a/src/controllers/DatabaseController.php +++ b/src/controllers/DatabaseController.php @@ -1,15 +1,15 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use Slim\Http\Response; use PHPPgAdmin\Decorators\Decorator; use PHPPgAdmin\Traits\AdminTrait; use PHPPgAdmin\Traits\ExportTrait; +use Slim\Http\Response; /** * Base controller class. @@ -27,6 +27,8 @@ class DatabaseController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|Response|string */ public function render() { @@ -102,7 +104,6 @@ class DatabaseController extends BaseController $this->doSQL(); $this->view->offsetSet('codemirror', true); - break; case 'variables': $this->doVariables(); @@ -316,7 +317,7 @@ class DatabaseController extends BaseController * * @param mixed $msg */ - public function doExport($msg = ''): void + public function doExport($msg = '') { $this->printTrail('database'); $this->printTabs('database', 'export'); @@ -366,7 +367,9 @@ class DatabaseController extends BaseController $actions = []; - echo $this->printTable($variables, $columns, $actions, $this->table_place, $this->lang['strnodata']); + if (self::isRecordset($variables)) { + echo $this->printTable($variables, $columns, $actions, $this->table_place, $this->lang['strnodata']); + } } /** @@ -375,7 +378,7 @@ class DatabaseController extends BaseController * * @param mixed $msg */ - public function doProcesses($msg = ''): void + public function doProcesses($msg = '') { $this->printTrail('database'); $this->printTabs('database', 'processes'); @@ -428,7 +431,9 @@ class DatabaseController extends BaseController $actions = []; - echo $this->printTable($prep_xacts, $columns, $actions, 'database-processes-preparedxacts', $this->lang['strnodata']); + if (self::isRecordset($prep_xacts)) { + echo $this->printTable($prep_xacts, $columns, $actions, 'database-processes-preparedxacts', $this->lang['strnodata']); + } } // Fetch the processes from the database @@ -518,7 +523,9 @@ class DatabaseController extends BaseController unset($columns['actions']); } - echo $this->printTable($processes, $columns, $actions, 'database-processes', $this->lang['strnodata']); + if (self::isRecordset($processes)) { + echo $this->printTable($processes, $columns, $actions, 'database-processes', $this->lang['strnodata']); + } } public function currentLocks(bool $isAjax = false): void @@ -565,7 +572,10 @@ class DatabaseController extends BaseController } $actions = []; - echo $this->printTable($variables, $columns, $actions, 'database-locks', $this->lang['strnodata']); + + if (self::isRecordset($variables)) { + echo $this->printTable($variables, $columns, $actions, 'database-locks', $this->lang['strnodata']); + } } /** @@ -676,8 +686,6 @@ class DatabaseController extends BaseController } /** - * @param string $curr - * * @return string */ private function _printTypeOption(string $curr) @@ -731,6 +739,10 @@ class DatabaseController extends BaseController return $this->lang['strallobjects']; } + /** + * @param string $curr + * @param mixed $rs + */ private function _printHtmlForType($curr, $rs): void { $destination = null; diff --git a/src/controllers/DataexportController.php b/src/controllers/DataexportController.php index 84c0899c..d4336b97 100644 --- a/src/controllers/DataexportController.php +++ b/src/controllers/DataexportController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; @@ -94,7 +94,7 @@ class DataexportController extends BaseController return $this->mimicDumpFeature($format, $cleanprefix, $oids); } - public function doDefault($msg = ''): void + public function doDefault($msg = '') { if (!isset($_REQUEST['query']) || empty($_REQUEST['query'])) { $_REQUEST['query'] = $_SESSION['sqlquery']; @@ -250,6 +250,12 @@ class DataexportController extends BaseController return $response; } + /** + * @param \PHPPgAdmin\Database\Postgres $data + * @param mixed $object + * + * @return \ADORecordSet|bool|int|string + */ private function _getRS($data, $object, bool $oids) { if ($object) { @@ -291,6 +297,13 @@ class DataexportController extends BaseController ->withHeader('Content-Disposition', 'attachment; filename=dump.' . $ext); } + /** + * @param \PHPPgAdmin\Database\Postgres $data + * @param \ADORecordSet|bool|int|string $rs + * @param mixed $object + * @param mixed $format + * @param mixed $response + */ private function pickFormat($data, $object, bool $oids, $rs, $format, $response) { if ('copy' === $format) { @@ -311,6 +324,12 @@ class DataexportController extends BaseController return $response; } + /** + * @param bool $oids + * @param \PHPPgAdmin\Database\Postgres $data + * @param mixed $object + * @param mixed $rs + */ private function _mimicCopy($data, $object, $oids, $rs): void { $data->fieldClean($object); @@ -348,6 +367,12 @@ class DataexportController extends BaseController echo "\\.\n"; } + /** + * @param bool $oids + * @param \PHPPgAdmin\Database\Postgres $data + * @param mixed $object + * @param mixed $rs + */ private function _mimicHtml($data, $object, $oids, $rs): void { echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n"; @@ -364,7 +389,7 @@ class DataexportController extends BaseController // Output header row $j = 0; - foreach (array_keys($rs->fields) as $k) { + foreach (\array_keys($rs->fields) as $k) { $finfo = $rs->FetchField($j++); if ($finfo->name === $data->id && !$oids) { @@ -397,6 +422,12 @@ class DataexportController extends BaseController echo "</html>\r\n"; } + /** + * @param bool $oids + * @param \PHPPgAdmin\Database\Postgres $data + * @param mixed $object + * @param mixed $rs + */ private function _mimicXml($data, $object, $oids, $rs): void { echo '<?xml version="1.0" encoding="utf-8" ?>' . \PHP_EOL; @@ -407,7 +438,7 @@ class DataexportController extends BaseController $j = 0; echo "\t<header>" . \PHP_EOL; - foreach (array_keys($rs->fields) as $k) { + foreach (\array_keys($rs->fields) as $k) { $finfo = $rs->FetchField($j++); $name = \htmlspecialchars($finfo->name); $type = \htmlspecialchars($finfo->type); @@ -448,6 +479,12 @@ class DataexportController extends BaseController echo '</data>' . \PHP_EOL; } + /** + * @param bool $oids + * @param \PHPPgAdmin\Database\Postgres $data + * @param mixed $object + * @param mixed $rs + */ private function _mimicSQL($data, $object, $oids, $rs): void { $data->fieldClean($object); @@ -514,6 +551,13 @@ class DataexportController extends BaseController } } + /** + * @param bool $oids + * @param \PHPPgAdmin\Database\Postgres $data + * @param mixed $object + * @param mixed $rs + * @param mixed $format + */ private function _csvOrTab($data, $object, $oids, $rs, $format): void { switch ($format) { diff --git a/src/controllers/DataimportController.php b/src/controllers/DataimportController.php index abb13179..ac0120e5 100644 --- a/src/controllers/DataimportController.php +++ b/src/controllers/DataimportController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; @@ -15,6 +15,8 @@ class DataimportController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|string */ public function render() { @@ -328,8 +330,7 @@ class DataimportController extends BaseController } /** - * @param null|string $field - * @param mixed $null_array + * @param mixed $null_array * * @return bool */ diff --git a/src/controllers/DbexportController.php b/src/controllers/DbexportController.php index 94a236ae..9190f96b 100644 --- a/src/controllers/DbexportController.php +++ b/src/controllers/DbexportController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; @@ -14,7 +14,7 @@ class DbexportController extends BaseController /** * Default method to render the controller according to the action parameter. */ - public function render() + public function render() { $data = $this->misc->getDatabaseAccessor(); diff --git a/src/controllers/DisplayController.php b/src/controllers/DisplayController.php index 7ca9a253..f82a4b11 100644 --- a/src/controllers/DisplayController.php +++ b/src/controllers/DisplayController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; @@ -9,7 +9,6 @@ namespace PHPPgAdmin\Controller; use ADOFieldObject; use ADORecordSet; use Exception; -use Kint\Kint; use PHPPgAdmin\ADOdbException; use PHPPgAdmin\Traits\InsertEditRowTrait; @@ -22,6 +21,8 @@ class DisplayController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|\Slim\Http\Response */ public function render() { @@ -39,18 +40,16 @@ class DisplayController extends BaseController $scripts .= "var Display = {\n"; $scripts .= "errmsg: '" . \str_replace("'", "\\'", $this->lang['strconnectionfail']) . "'\n"; $scripts .= "};\n"; - $this->scripts =$scripts. '</script>' . \PHP_EOL; + $this->scripts = $scripts . '</script>' . \PHP_EOL; $footer_template = 'footer.twig'; $header_template = 'header.twig'; -$browseResult=[]; + $browseResult = []; \ob_start(); switch ($this->action) { case 'editrow': - $this->view->offsetSet('codemirror',true); - - + $this->view->offsetSet('codemirror', true); if (isset($_POST['save'])) { $this->doEditRow(); @@ -60,14 +59,12 @@ $browseResult=[]; break; case 'confeditrow': - // d($_REQUEST); + // d($_REQUEST); $this->formEditRow(); break; case 'delrow': - $this->view->offsetSet('codemirror',true); - - + $this->view->offsetSet('codemirror', true); if (isset($_POST['yes'])) { $this->doDelRow(false); @@ -82,21 +79,19 @@ $browseResult=[]; break; default: - $this->view->offsetSet('datatables',true); - $this->view->offsetSet('codemirror',true); - - - $jsonResult=$this->doBrowse(); + $this->view->offsetSet('datatables', true); + $this->view->offsetSet('codemirror', true); + + $jsonResult = $this->doBrowse(); break; } $output = \ob_get_clean(); - $json=boolval($this->getRequestParam('json',null)); - //ddd($this->getAllParams()); -if($json) { - return responseInstance()->withJson( $jsonResult); + $json = (bool) ($this->getRequestParam('json', null)); - } + if ($json) { + return responseInstance()->withJson($jsonResult); + } $subject = $this->coalesceArr($_REQUEST, 'subject', 'table')['subject']; $object = null; @@ -114,7 +109,7 @@ if($json) { } else { $title = $this->headerTitle('strqueryresults'); } -$this->view->offsetSet('serverSide',1); + $this->view->offsetSet('serverSide', 1); $this->printHeader($title, $this->scripts, true, $header_template); $this->printBody(); @@ -128,6 +123,10 @@ $this->view->offsetSet('serverSide',1); * Displays requested data. * * @param mixed $msg + * + * @return (array[]|int)[]|null + * + * @psalm-return array{draw: int, recordsTotal: int, recordsFiltered: int, data: list<array>}|null */ public function doBrowse($msg = '') { @@ -172,14 +171,15 @@ $this->view->offsetSet('serverSide',1); $_REQUEST['return'] = 'selectrows'; } - $json=boolval($this->getRequestParam('json',null)); + $json = (bool) ($this->getRequestParam('json', null)); //$object = $this->setIfIsset($object, $_REQUEST[$subject]); - $trailsubject=$subject; - if($subject==='table' && !$this->getRequestParam($subject,null)) { - $trailsubject='database'; + $trailsubject = $subject; + + if ('table' === $subject && !$this->getRequestParam($subject, null)) { + $trailsubject = 'database'; } - $this->printTrail($trailsubject,!$json); + $this->printTrail($trailsubject, !$json); $tabsPosition = 'browse'; if ('database' === $trailsubject) { @@ -187,12 +187,12 @@ $this->view->offsetSet('serverSide',1); } elseif ('column' === $trailsubject) { $tabsPosition = 'colproperties'; } - + $this->printTabs($trailsubject, $tabsPosition, !$json); - + [$query, $title, $type] = $this->getQueryTitleAndType($data, $object); - $this->printTitle($this->lang[$title],null, !$json); + $this->printTitle($this->lang[$title], null, !$json); $this->printMsg($msg, !$json); @@ -212,9 +212,8 @@ $this->view->offsetSet('serverSide',1); if (isset($search_path) && (0 !== $data->setSearchPath(\array_map('trim', \explode(',', $search_path))))) { return; } - - $paginate=$this->getRequestParam('paginate',null); - + + $paginate = $this->getRequestParam('paginate', null); try { $max_pages = 0; @@ -230,22 +229,22 @@ $this->view->offsetSet('serverSide',1); $this->conf['max_rows'], $max_pages ); - - - if($json) { - $jsonResult=[]; + + if ($json) { + $jsonResult = []; + while (!$resultset->EOF) { - $jsonResult[]= $this->getJsonRowCells($resultset,isset($object)); + $jsonResult[] = $this->getJsonRowCells($resultset, isset($object)); $resultset->MoveNext(); } - + return [ - 'draw'=>1, - 'recordsTotal'=>$max_pages, - 'recordsFiltered'=>$max_pages, - 'data'=>$jsonResult]; + 'draw' => 1, + 'recordsTotal' => $max_pages, + 'recordsFiltered' => $max_pages, + 'data' => $jsonResult, + ]; } - } catch (ADOdbException $e) { return $this->halt($e->getMessage()); } @@ -282,7 +281,7 @@ $this->view->offsetSet('serverSide',1); $this->misc->saveScriptHistory($_REQUEST['query']); } - $query = $query ? $query : \sprintf( + $query = $query ?: \sprintf( 'SELECT * FROM %s.%s', $_REQUEST['schema'], $object @@ -292,25 +291,24 @@ $this->view->offsetSet('serverSide',1); //die(htmlspecialchars($query)); - $formHTML= '<form method="post" id="sqlform" action="' . $_SERVER['REQUEST_URI'] . '">'; - $formHTML.= $this->view->form; + $formHTML = '<form method="post" id="sqlform" action="' . $_SERVER['REQUEST_URI'] . '">'; + $formHTML .= $this->view->form; if ($object) { - $formHTML.= '<input type="hidden" name="' . $subject . '" value="'. \htmlspecialchars($object). '" />' . \PHP_EOL; - } - $search_path = \htmlspecialchars($_REQUEST['search_path']??null); - $formHTML.= '<input type="hidden" name="search_path" id="search_path" size="45" value="' . $search_path . '" />'; - - if(isset($_REQUEST['paginate'])) { - $formHTML.= '<input type="hidden" name="paginate" value="on" />'; + $formHTML .= '<input type="hidden" name="' . $subject . '" value="' . \htmlspecialchars($object) . '" />' . \PHP_EOL; } - // $formHTML.= '<input type="checkbox" name="json" />'; - $formHTML.= '<textarea width="90%" name="query" id="query" rows="5" cols="100" resizable="true">'; - $formHTML.= \htmlspecialchars($query); - $formHTML.= '</textarea><br><input type="submit"/>'; - $formHTML.= '</form>'; -echo $formHTML; + $search_path = \htmlspecialchars($_REQUEST['search_path'] ?? null); + $formHTML .= '<input type="hidden" name="search_path" id="search_path" size="45" value="' . $search_path . '" />'; + if (isset($_REQUEST['paginate'])) { + $formHTML .= '<input type="hidden" name="paginate" value="on" />'; + } + // $formHTML.= '<input type="checkbox" name="json" />'; + $formHTML .= '<textarea width="90%" name="query" id="query" rows="5" cols="100" resizable="true">'; + $formHTML .= \htmlspecialchars($query); + $formHTML .= '</textarea><br><input type="submit"/>'; + $formHTML .= '</form>'; + echo $formHTML; $this->printResultsTable($resultset, $page, $max_pages, $_gets, $object); // Navigation links @@ -360,9 +358,7 @@ echo $formHTML; return [$query, $title, $type]; } - /** - * @param array $_gets * @param mixed $resultset * @param mixed $page * @param mixed $max_pages @@ -370,7 +366,6 @@ echo $formHTML; */ public function printResultsTable($resultset, $page, $max_pages, array $_gets, $object): void { - if (!\is_object($resultset) || 0 >= $resultset->RecordCount()) { echo \sprintf( '<p>%s</p>', @@ -453,20 +448,22 @@ echo $formHTML; if (!\is_object($resultset) || 0 >= $resultset->RecordCount()) { return; } -$dttFields=[]; + $dttFields = []; + foreach (\array_keys($resultset->fields) as $index => $key) { if (($key === $data->id) && (!($withOid && $this->conf['show_oids']))) { continue; } $finfo = $resultset->FetchField($index); - $dttFields[]=["data"=>$finfo->name]; + $dttFields[] = ['data' => $finfo->name]; + if (false === $args) { echo '<th class="data">', $this->misc->printVal($finfo->name), '</th>' . \PHP_EOL; continue; } - + $args['page'] = $_REQUEST['page']; $args['sortkey'] = $index + 1; // Sort direction opposite to current direction, unless it's currently '' @@ -490,37 +487,37 @@ $dttFields=[]; } echo '</a></th>' . \PHP_EOL; } - $this->view->offsetSet('dttFields',$dttFields); - \reset($resultset->fields); + $this->view->offsetSet('dttFields', $dttFields); + \reset($resultset->fields); } -private function FetchField(ADORecordSet $ADORecordSet,int $index):ADOFieldObject { - return $ADORecordSet->FetchField($index); -} - /** + /** * Print table rows. * - * @param ADORecordSet $resultset The resultset - * @param bool $withOid either to display OIDs or not + * @param ADORecordSet $resultset The resultset + * @param bool $withOid either to display OIDs or not */ public function getJsonRowCells(&$resultset, $withOid): array { $data = $this->misc->getDatabaseAccessor(); $j = 0; - $strings=$this->getRequestParam('string', 'collapsed'); -$result=[]; + $strings = $this->getRequestParam('string', 'collapsed'); + $result = []; + foreach ($resultset->fields as $fieldname => $fieldvalue) { /** @var ADOFieldObject */ - $finfo =$this->FetchField( $resultset,$j++); + $finfo = $this->FetchField($resultset, $j++); if (($fieldname === $data->id) && (!($withOid && $this->conf['show_oids']))) { continue; } - $result[$finfo->name ] =$fieldvalue; + $result[$finfo->name] = $fieldvalue; } + return $result; } + /** * Print table rows. * @@ -533,11 +530,11 @@ $result=[]; $data = $this->misc->getDatabaseAccessor(); $j = 0; - $strings=$this->getRequestParam('string', 'collapsed'); + $strings = $this->getRequestParam('string', 'collapsed'); foreach ($resultset->fields as $fieldName => $fieldValue) { /** @var ADOFieldObject */ - $finfo =$this->FetchField( $resultset,$j++); + $finfo = $this->FetchField($resultset, $j++); if (($fieldName === $data->id) && (!($withOid && $this->conf['show_oids']))) { continue; @@ -548,8 +545,9 @@ $result=[]; echo '<td> </td>'; } else { echo '<td style="white-space:nowrap;">'; - if ((null !== $fieldValue)&& isset($fkey_information['byfield'][$fieldName])) { - $this->_printFKLinks($resultset, $fkey_information, $fieldName, $fieldValue, $printvalOpts); + + if ((null !== $fieldValue) && isset($fkey_information['byfield'][$fieldName])) { + $this->_printFKLinks($resultset, $fkey_information, $fieldName, $fieldValue, $printvalOpts); } $val = $this->misc->printVal($fieldValue, $finfo->type, $printvalOpts); @@ -564,7 +562,7 @@ $result=[]; * * @param string $msg message to display on top of the form or after performing edition */ - public function formEditRow($msg = ''): void + public function formEditRow($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -706,8 +704,7 @@ $result=[]; } echo '<input type="hidden" name="action" value="editrow" />' . \PHP_EOL; - // d($_REQUEST); - // d($this->getAllParams()); + echo $this->view->form; $subject = $this->getRequestParam('subject', $_REQUEST['subject'] ?? null); @@ -782,12 +779,10 @@ $result=[]; } /** - * @param array $_gets - * @param mixed $type - * @param mixed $page - * @param string $subject - * @param mixed $object - * @param mixed $resultset + * @param mixed $type + * @param mixed $page + * @param mixed $object + * @param mixed $resultset * * @return ((array|mixed|string)[][]|mixed)[][] * @@ -836,7 +831,7 @@ $result=[]; ], 'content' => $this->lang['streditsql'], ]; - } + } $navlinks['collapse'] = [ 'attr' => [ 'href' => [ @@ -945,8 +940,13 @@ $result=[]; return $navlinks; } + /** * Performs actual edition of row. + * + * @return (array[]|int)[]|null + * + * @psalm-return array{draw: int, recordsTotal: int, recordsFiltered: int, data: list<array>}|null */ public function doEditRow() { @@ -1088,7 +1088,9 @@ $result=[]; * Build & return the FK information data structure * used when deciding if a field should have a FK link or not. * - * @return array associative array describing the FK + * @return (array[]|string)[] + * + * @psalm-return array{byconstr: array<array-key, array{url_data: string, fkeys: array, consrc: mixed}>, byfield: array<array-key, list<mixed>>, common_url?: string} */ public function &getFKInfo() { @@ -1139,7 +1141,7 @@ $result=[]; $ops = []; - foreach (array_keys($_REQUEST['fkey']) as $x) { + foreach (\array_keys($_REQUEST['fkey']) as $x) { $ops[$x] = '='; } $query = $data->getSelectSQL($_REQUEST['table'], [], $_REQUEST['fkey'], $ops); @@ -1182,13 +1184,19 @@ $result=[]; } /** + * @return \the + */ + private function FetchField(ADORecordSet $ADORecordSet, int $index): ADOFieldObject + { + return $ADORecordSet->FetchField($index); + } + + /** * @psalm-return array{0: array{actionbuttons: array{edit: array{content: mixed, attr: array{href: array{url: string, urlvars: array{action: mixed|string, strings: mixed, page: mixed}}}}, delete: array{content: mixed, attr: array{href: array{url: string, urlvars: array{action: mixed|string, strings: mixed, page: mixed}}}}}, place: string}, 1: array<empty, empty>|iterable} * - * @param object $resultset - * @param mixed $object - * @param mixed $data - * @param mixed $page - * @param array $_gets + * @param mixed $object + * @param mixed $data + * @param mixed $page * * @return (((((mixed|string)[]|string)[][]|mixed)[][]|string)[]|iterable)[] */ @@ -1268,6 +1276,10 @@ $result=[]; return [$actions, $key]; } + /** + * @param array|iterable $key + * @param ((((mixed|string)[]|string)[][]|mixed)[][]|string)[] $actions + */ private function _printResultsTableActionButtons(ADORecordSet $resultset, $key, $actions, bool $display_action_column, string $buttonclass): void { if (!$display_action_column) { @@ -1325,11 +1337,9 @@ $result=[]; } /** - * @param bool[] $printvalOpts - * @param ADORecordSet $resultset - * @param array $fkey_information - * @param mixed $fieldName - * @param mixed $fieldValue + * @param bool[] $printvalOpts + * @param mixed $fieldName + * @param mixed $fieldValue */ private function _printFKLinks(ADORecordSet $resultset, array $fkey_information, $fieldName, $fieldValue, array &$printvalOpts): void { @@ -1383,9 +1393,6 @@ $result=[]; /** * @psalm-return array{0: int, 1: int} * - * @param int $page - * @param int $pages - * * @return int[] */ private function _getMinMaxPages(int $page, int $pages) diff --git a/src/controllers/DomainsController.php b/src/controllers/DomainsController.php index 80ee6dc4..fc1cfdfb 100644 --- a/src/controllers/DomainsController.php +++ b/src/controllers/DomainsController.php @@ -1,13 +1,13 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use Slim\Http\Response; use PHPPgAdmin\Decorators\Decorator; +use Slim\Http\Response; /** * Base controller class. @@ -18,6 +18,8 @@ class DomainsController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|Response|string */ public function render() { @@ -108,7 +110,7 @@ class DomainsController extends BaseController * * @param mixed $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -186,7 +188,9 @@ class DomainsController extends BaseController unset($actions['alter']); } - echo $this->printTable($domains, $columns, $actions, 'domains-domains', $this->lang['strnodomains']); + if (self::isRecordset($domains)) { + echo $this->printTable($domains, $columns, $actions, 'domains-domains', $this->lang['strnodomains']); + } $navlinks = [ 'create' => [ @@ -263,7 +267,7 @@ class DomainsController extends BaseController * * @param mixed $msg */ - public function doAlter($msg = ''): void + public function doAlter($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -468,7 +472,7 @@ class DomainsController extends BaseController * * @param mixed $msg */ - public function doProperties($msg = ''): void + public function doProperties($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -554,7 +558,9 @@ class DomainsController extends BaseController ], ]; - echo $this->printTable($domaincons, $columns, $actions, 'domains-properties', $this->lang['strnodata']); + if (self::isRecordset($domaincons)) { + echo $this->printTable($domaincons, $columns, $actions, 'domains-properties', $this->lang['strnodata']); + } } } else { echo \sprintf( @@ -668,7 +674,7 @@ class DomainsController extends BaseController * * @param mixed $msg */ - public function doCreate($msg = ''): void + public function doCreate($msg = '') { $data = $this->misc->getDatabaseAccessor(); diff --git a/src/controllers/FulltextController.php b/src/controllers/FulltextController.php index 4c91d786..443320e6 100644 --- a/src/controllers/FulltextController.php +++ b/src/controllers/FulltextController.php @@ -1,14 +1,14 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use Slim\Http\Response; use PHPPgAdmin\Decorators\Decorator; use PHPPgAdmin\XHtml\HTMLController; +use Slim\Http\Response; /** * Base controller class. @@ -19,6 +19,8 @@ class FulltextController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|Response|string */ public function render() { @@ -34,7 +36,7 @@ class FulltextController extends BaseController $this->printBody(); if (null !== $this->getPostParam('cancel')) { - $this->action = isset($_POST['prev_action']) ? $_POST['prev_action'] : ''; + $this->action = $_POST['prev_action'] ?? ''; } switch ($this->action) { @@ -132,7 +134,7 @@ class FulltextController extends BaseController return $this->printFooter(); } - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -193,7 +195,9 @@ class FulltextController extends BaseController ], ]; - echo $this->printTable($cfgs, $columns, $actions, 'fulltext-fulltext', $this->lang['strftsnoconfigs']); + if (self::isRecordset($cfgs)) { + echo $this->printTable($cfgs, $columns, $actions, 'fulltext-fulltext', $this->lang['strftsnoconfigs']); + } $navlinks = [ 'createconf' => [ @@ -401,7 +405,7 @@ class FulltextController extends BaseController * * @param mixed $msg */ - public function doCreateConfig($msg = ''): void + public function doCreateConfig($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -568,7 +572,7 @@ class FulltextController extends BaseController * * @param mixed $msg */ - public function doAlterConfig($msg = ''): void + public function doAlterConfig($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -658,7 +662,7 @@ class FulltextController extends BaseController * * @param mixed $msg */ - public function doViewParsers($msg = ''): void + public function doViewParsers($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -686,7 +690,9 @@ class FulltextController extends BaseController $actions = []; - echo $this->printTable($parsers, $columns, $actions, 'fulltext-viewparsers', $this->lang['strftsnoparsers']); + if (self::isRecordset($parsers)) { + echo $this->printTable($parsers, $columns, $actions, 'fulltext-viewparsers', $this->lang['strftsnoparsers']); + } //TODO: navlink to "create parser" } @@ -696,7 +702,7 @@ class FulltextController extends BaseController * * @param mixed $msg */ - public function doViewDicts($msg = ''): void + public function doViewDicts($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -752,7 +758,9 @@ class FulltextController extends BaseController ], ]; - echo $this->printTable($dicts, $columns, $actions, 'fulltext-viewdicts', $this->lang['strftsnodicts']); + if (self::isRecordset($dicts)) { + echo $this->printTable($dicts, $columns, $actions, 'fulltext-viewdicts', $this->lang['strftsnodicts']); + } $navlinks = [ 'createdict' => [ @@ -850,7 +858,9 @@ class FulltextController extends BaseController ], ]; - echo $this->printTable($map, $columns, $actions, 'fulltext-viewconfig', $this->lang['strftsemptymap']); + if (self::isRecordset($map)) { + echo $this->printTable($map, $columns, $actions, 'fulltext-viewconfig', $this->lang['strftsemptymap']); + } $navlinks = [ 'addmapping' => [ @@ -878,7 +888,7 @@ class FulltextController extends BaseController * * @param mixed $msg */ - public function doCreateDict($msg = ''): void + public function doCreateDict($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -1073,7 +1083,7 @@ class FulltextController extends BaseController * * @param mixed $msg */ - public function doAlterDict($msg = ''): void + public function doAlterDict($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -1218,6 +1228,7 @@ class FulltextController extends BaseController echo '</form>' . \PHP_EOL; } elseif (\is_array($_REQUEST['mapping'])) { $status = $data->changeFtsMapping($_REQUEST['ftscfg'], $_REQUEST['mapping'], 'drop'); + if (0 !== $status) { $this->doViewConfig($_REQUEST['ftscfg'], $this->lang['strftsmappingdroppedbad']); @@ -1235,7 +1246,7 @@ class FulltextController extends BaseController } } - public function doAlterMapping($msg = ''): void + public function doAlterMapping($msg = '') { $data = $this->misc->getDatabaseAccessor(); $this->printTrail('ftscfg'); @@ -1356,7 +1367,7 @@ class FulltextController extends BaseController * * @param mixed $msg */ - public function doAddMapping($msg = ''): void + public function doAddMapping($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -1397,7 +1408,7 @@ class FulltextController extends BaseController '>%s', $mapping ), - $mapping_desc !== '' ? \sprintf( + '' !== $mapping_desc ? \sprintf( ' - %s', $mapping_desc ) : '', diff --git a/src/controllers/FunctionsController.php b/src/controllers/FunctionsController.php index e1a8f62c..42932659 100644 --- a/src/controllers/FunctionsController.php +++ b/src/controllers/FunctionsController.php @@ -1,14 +1,14 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use Slim\Http\Response; use ADORecordSet; use PHPPgAdmin\Decorators\Decorator; +use Slim\Http\Response; /** * Base controller class. @@ -21,6 +21,8 @@ class FunctionsController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|Response|string */ public function render() { @@ -67,8 +69,8 @@ class FunctionsController extends BaseController break; case 'edit': - $this->view->offsetSet('codemirror',true); - + $this->view->offsetSet('codemirror', true); + $this->doEdit(); break; @@ -105,7 +107,7 @@ class FunctionsController extends BaseController * * @param mixed $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -119,8 +121,8 @@ class FunctionsController extends BaseController 'function' => [ 'title' => $this->lang['strfunction'], 'field' => Decorator::field('proproto'), - 'url'=>containerInstance()->getDestinationWithLastTab('function'), - + 'url' => containerInstance()->getDestinationWithLastTab('function'), + 'vars' => ['function' => 'proproto', 'function_oid' => 'prooid'], ], 'returns' => [ @@ -143,7 +145,7 @@ class FunctionsController extends BaseController 'field' => Decorator::field('procomment'), ], ]; - $actions = [ + $actions = [ 'multiactions' => [ 'keycols' => ['function' => 'proproto', 'function_oid' => 'prooid'], 'url' => 'functions', @@ -190,7 +192,9 @@ class FunctionsController extends BaseController ], ]; - echo $this->printTable($funcs, $columns, $actions, $this->table_place, $this->lang['strnofunctions']); + if (self::isRecordset($funcs)) { + echo $this->printTable($funcs, $columns, $actions, $this->table_place, $this->lang['strnofunctions']); + } $this->_printNavLinks('functions-functions'); } @@ -224,7 +228,7 @@ class FunctionsController extends BaseController ] ), ]; - + return $this->printTree($funcs, $attrs, 'functions'); } @@ -287,7 +291,7 @@ class FunctionsController extends BaseController * * @param mixed $msg */ - public function doEdit($msg = ''): void + public function doEdit($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -538,8 +542,6 @@ class FunctionsController extends BaseController * * @param string $fname The function name * @param int $function_oid The function oid - * - * @return string the navlinks to print at the bottom */ public function showDefinition($fname, $function_oid) { @@ -834,6 +836,7 @@ class FunctionsController extends BaseController } elseif (\is_array($_POST['function_oid'])) { $msg = ''; $status = $data->beginTransaction(); + if (0 === $status) { foreach ($_POST['function_oid'] as $k => $s) { $status = $data->dropFunction($s, isset($_POST['cascade'])); @@ -857,6 +860,7 @@ class FunctionsController extends BaseController } } } + if (0 === $data->endTransaction()) { // Everything went fine, back to the Default page.... $this->view->setReloadBrowser(true); diff --git a/src/controllers/GroupsController.php b/src/controllers/GroupsController.php index 1a0a6966..14f306ae 100644 --- a/src/controllers/GroupsController.php +++ b/src/controllers/GroupsController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; @@ -18,7 +18,7 @@ class GroupsController extends BaseController /** * Default method to render the controller according to the action parameter. */ - public function render(): void + public function render() { $this->printHeader(); $this->printBody(); @@ -91,7 +91,7 @@ class GroupsController extends BaseController * * @param mixed $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -131,7 +131,9 @@ class GroupsController extends BaseController ], ]; - echo $this->printTable($groups, $columns, $actions, 'groups-properties', $this->lang['strnogroups']); + if (self::isRecordset($groups)) { + echo $this->printTable($groups, $columns, $actions, 'groups-properties', $this->lang['strnogroups']); + } $this->printNavLinks(['create' => [ 'attr' => [ @@ -217,7 +219,7 @@ class GroupsController extends BaseController * * @param mixed $msg */ - public function doProperties($msg = ''): void + public function doProperties($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -257,7 +259,9 @@ class GroupsController extends BaseController ], ]; - echo $this->printTable($groupdata, $columns, $actions, 'groups-members', $this->lang['strnousers']); + if (self::isRecordset($groupdata)) { + echo $this->printTable($groupdata, $columns, $actions, 'groups-members', $this->lang['strnousers']); + } } // Display form for adding a user to the group @@ -346,7 +350,7 @@ class GroupsController extends BaseController * * @param mixed $msg */ - public function doCreate($msg = ''): void + public function doCreate($msg = '') { $data = $this->misc->getDatabaseAccessor(); $this->coalesceArr($_POST, 'name', ''); diff --git a/src/controllers/HelpController.php b/src/controllers/HelpController.php index 49ef698b..fe53103c 100644 --- a/src/controllers/HelpController.php +++ b/src/controllers/HelpController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; @@ -16,7 +16,7 @@ class HelpController extends BaseController /** * Default method to render the controller according to the action parameter. */ - public function render(): void + public function render() { switch ($this->action) { case 'browse': @@ -57,7 +57,7 @@ class HelpController extends BaseController $this->doBrowse($this->lang['strinvalidhelppage']); } - public function doBrowse($msg = ''): void + public function doBrowse($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -72,7 +72,7 @@ class HelpController extends BaseController $pages = $data->getHelpPages(); - foreach (array_keys($pages) as $page) { + foreach (\array_keys($pages) as $page) { echo \sprintf( '<dt>%s</dt>', $page diff --git a/src/controllers/HistoryController.php b/src/controllers/HistoryController.php index 3f66a288..e15c2457 100644 --- a/src/controllers/HistoryController.php +++ b/src/controllers/HistoryController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; @@ -27,6 +27,8 @@ class HistoryController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|string */ public function render() { @@ -64,8 +66,8 @@ class HistoryController extends BaseController // Set the name of the window $this->setWindowName('history'); - $this->view->offsetSet('excludeJsTree',true); - $this->view->offsetSet('inPopUp',true); + $this->view->offsetSet('excludeJsTree', true); + $this->view->offsetSet('inPopUp', true); return $this->printFooter(true, 'footer_sqledit.twig'); } @@ -140,7 +142,9 @@ class HistoryController extends BaseController ], ]; - echo $this->printTable($history, $columns, $actions, 'history-history', $this->lang['strnohistory']); + if (self::isRecordset($history)) { + echo $this->printTable($history, $columns, $actions, 'history-history', $this->lang['strnohistory']); + } } else { echo \sprintf( '<p>%s</p>', diff --git a/src/controllers/IndexesController.php b/src/controllers/IndexesController.php index c0f7de8c..305892c3 100644 --- a/src/controllers/IndexesController.php +++ b/src/controllers/IndexesController.php @@ -1,17 +1,17 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use Slim\Http\Response; use PHPPgAdmin\ADOdbException; use PHPPgAdmin\Decorators\Decorator; use PHPPgAdmin\XHtml\XHtmlButton; use PHPPgAdmin\XHtml\XHtmlOption; use PHPPgAdmin\XHtml\XHtmlSelect; +use Slim\Http\Response; /** * Base controller class. @@ -24,6 +24,8 @@ class IndexesController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|Response|string */ public function render() { @@ -196,7 +198,9 @@ class IndexesController extends BaseController ], ]; - echo $this->printTable($indexes, $columns, $actions, 'indexes-indexes', $this->lang['strnoindexes'], $indPre); + if (self::isRecordset($indexes)) { + echo $this->printTable($indexes, $columns, $actions, 'indexes-indexes', $this->lang['strnoindexes'], $indPre); + } $this->printNavLinks([ 'create' => [ @@ -231,7 +235,7 @@ class IndexesController extends BaseController $indexes = $data->getIndexes($object); - $getIcon = static function ($f) { + $getIcon = static function ($f): string { if ('t' === $f['indisprimary']) { return 'PrimaryKey'; } @@ -338,7 +342,7 @@ class IndexesController extends BaseController * * @param mixed $msg */ - public function doCreateIndex($msg = ''): void + public function doCreateIndex($msg = '') { $data = $this->misc->getDatabaseAccessor(); diff --git a/src/controllers/InfoController.php b/src/controllers/InfoController.php index c55d04d0..cb2e41e7 100644 --- a/src/controllers/InfoController.php +++ b/src/controllers/InfoController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; @@ -17,17 +17,18 @@ class InfoController extends BaseController * @var array<string, bool>|mixed */ public $shownull; + public $controller_title = 'strtables'; /** * Default method to render the controller according to the action parameter. */ - public function render(): void + public function render() { $this->printHeader($this->headerTitle('', '', $_REQUEST['table'] . ' - ' . $this->lang['strinfo'])); $this->printBody(); $this->doDefault(); - + $this->printFooter(); } @@ -36,7 +37,7 @@ class InfoController extends BaseController * * @param string $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -101,6 +102,9 @@ class InfoController extends BaseController } } + /** + * @param int|\PHPPgAdmin\ADORecordSet|string $children + */ private function _printChildren($children): void { echo \sprintf( @@ -137,9 +141,14 @@ class InfoController extends BaseController ], ]; - echo $this->printTable($children, $columns, $actions, 'info-children', $this->lang['strnodata']); + if (self::isRecordset($children)) { + echo $this->printTable($children, $columns, $actions, 'info-children', $this->lang['strnodata']); + } } + /** + * @param int|\PHPPgAdmin\ADORecordSet|string $tablestatstups + */ private function _printTablestatstups($tablestatstups): void { echo \sprintf( @@ -215,6 +224,9 @@ class InfoController extends BaseController echo '</table>' . \PHP_EOL; } + /** + * @param int|\PHPPgAdmin\ADORecordSet|string $tablestatsio + */ private function _printTablestatsio($tablestatsio): void { echo \sprintf( @@ -355,6 +367,9 @@ class InfoController extends BaseController echo '</table>' . \PHP_EOL; } + /** + * @param int|\PHPPgAdmin\ADORecordSet|string $indexstatstups + */ private function _printIndexstatstups($indexstatstups): void { echo \sprintf( @@ -401,6 +416,9 @@ class InfoController extends BaseController echo '</table>' . \PHP_EOL; } + /** + * @param int|\PHPPgAdmin\ADORecordSet|string $indexstatsio + */ private function _printIndexstatsio($indexstatsio): void { echo \sprintf( @@ -455,6 +473,9 @@ class InfoController extends BaseController echo '</table>' . \PHP_EOL; } + /** + * @param int|\PHPPgAdmin\ADORecordSet|string $parents + */ private function _printParents($parents): void { echo \sprintf( @@ -491,9 +512,14 @@ class InfoController extends BaseController ], ]; - echo $this->printTable($parents, $columns, $actions, 'info-parents', $this->lang['strnodata']); + if (self::isRecordset($parents)) { + echo $this->printTable($parents, $columns, $actions, 'info-parents', $this->lang['strnodata']); + } } + /** + * @param int|\PHPPgAdmin\ADORecordSet|string $referrers + */ private function _printReferring($referrers): void { echo \sprintf( @@ -538,6 +564,8 @@ class InfoController extends BaseController ], ]; - echo $this->printTable($referrers, $columns, $actions, 'info-referrers', $this->lang['strnodata']); + if (self::isRecordset($referrers)) { + echo $this->printTable($referrers, $columns, $actions, 'info-referrers', $this->lang['strnodata']); + } } } diff --git a/src/controllers/IntroController.php b/src/controllers/IntroController.php index 9ffdb846..3aa4aa25 100644 --- a/src/controllers/IntroController.php +++ b/src/controllers/IntroController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; @@ -15,6 +15,8 @@ class IntroController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return \Slim\Http\Response */ public function render() { @@ -34,7 +36,7 @@ class IntroController extends BaseController public function doDefault() { $intro_html = $this->printHeader('Intro', $this->scripts, false); - $intro_html .= $this->printBody(false,'flexbox_body',false,true); + $intro_html .= $this->printBody(false, 'flexbox_body', false, true); $intro_html .= $this->printTrail('root', false); diff --git a/src/controllers/LanguagesController.php b/src/controllers/LanguagesController.php index 88452586..683a709b 100644 --- a/src/controllers/LanguagesController.php +++ b/src/controllers/LanguagesController.php @@ -1,13 +1,13 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use Slim\Http\Response; use PHPPgAdmin\Decorators\Decorator; +use Slim\Http\Response; /** * Base controller class. @@ -18,6 +18,8 @@ class LanguagesController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|Response|string */ public function render() { @@ -37,7 +39,7 @@ class LanguagesController extends BaseController * * @param mixed $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -65,7 +67,9 @@ class LanguagesController extends BaseController $actions = []; - echo $this->printTable($languages, $columns, $actions, 'languages-languages', $this->lang['strnolanguages']); + if (self::isRecordset($languages)) { + echo $this->printTable($languages, $columns, $actions, 'languages-languages', $this->lang['strnolanguages']); + } } /** diff --git a/src/controllers/LoginController.php b/src/controllers/LoginController.php index de9f8ec6..1aea6c5d 100644 --- a/src/controllers/LoginController.php +++ b/src/controllers/LoginController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; @@ -43,6 +43,8 @@ class LoginController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|\Slim\Http\Response */ public function render() { diff --git a/src/controllers/MaterializedviewpropertiesController.php b/src/controllers/MaterializedviewpropertiesController.php index c0cb17eb..4cd5be87 100644 --- a/src/controllers/MaterializedviewpropertiesController.php +++ b/src/controllers/MaterializedviewpropertiesController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; @@ -137,7 +137,7 @@ class MaterializedviewpropertiesController extends BaseController * * @param mixed $msg */ - public function doEdit($msg = ''): void + public function doEdit($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -196,7 +196,7 @@ class MaterializedviewpropertiesController extends BaseController * * @param mixed $msg */ - public function doProperties($msg = ''): void + public function doProperties($msg = '') { $data = $this->misc->getDatabaseAccessor(); diff --git a/src/controllers/MaterializedviewsController.php b/src/controllers/MaterializedviewsController.php index 45242dcc..bccbea71 100644 --- a/src/controllers/MaterializedviewsController.php +++ b/src/controllers/MaterializedviewsController.php @@ -1,14 +1,14 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use Slim\Http\Response; use PHPPgAdmin\Decorators\Decorator; use PHPPgAdmin\Traits\ViewsMatviewsTrait; +use Slim\Http\Response; /** * Base controller class. @@ -112,7 +112,7 @@ class MaterializedviewsController extends BaseController * * @param mixed $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -127,7 +127,7 @@ class MaterializedviewsController extends BaseController 'title' => 'M ' . $this->lang['strview'], 'field' => Decorator::field('relname'), 'url' => \containerInstance()->getDestinationWithLastTab('matview'), - + 'vars' => [$this->keystring => 'relname'], ], 'owner' => [ @@ -209,7 +209,9 @@ class MaterializedviewsController extends BaseController ], ]; - echo $this->printTable($matviews, $columns, $actions, $this->table_place, $this->lang['strnoviews']); + if (self::isRecordset($matviews)) { + echo $this->printTable($matviews, $columns, $actions, $this->table_place, $this->lang['strnoviews']); + } $navlinks = [ 'create' => [ @@ -321,6 +323,7 @@ class MaterializedviewsController extends BaseController } elseif (\is_array($_POST['view'])) { $msg = ''; $status = $data->beginTransaction(); + if (0 === $status) { foreach ($_POST['view'] as $s) { $status = $data->dropView($s, isset($_POST['cascade'])); @@ -344,6 +347,7 @@ class MaterializedviewsController extends BaseController } } } + if (0 === $data->endTransaction()) { // Everything went fine, back to the Default page.... $this->view->setReloadBrowser(true); @@ -391,7 +395,7 @@ class MaterializedviewsController extends BaseController * * @param mixed $msg */ - public function doWizardCreate($msg = ''): void + public function doWizardCreate($msg = '') { $this->printTrail('schema'); $this->printTitle($this->lang['strcreatematviewwiz'], 'pg.matview.create'); @@ -405,14 +409,14 @@ class MaterializedviewsController extends BaseController * * @param mixed $msg */ - public function doCreate($msg = ''): void + public function doCreate($msg = '') { $data = $this->misc->getDatabaseAccessor(); $this->coalesceArr($_REQUEST, 'formView', ''); if (!isset($_REQUEST['formDefinition'])) { - $_REQUEST['formDefinition'] = isset($_SESSION['sqlquery']) ? $_SESSION['sqlquery'] : 'SELECT '; + $_REQUEST['formDefinition'] = $_SESSION['sqlquery'] ?? 'SELECT '; } $this->coalesceArr($_REQUEST, 'formComment', ''); diff --git a/src/controllers/OpclassesController.php b/src/controllers/OpclassesController.php index 2bb95657..4836e3ad 100644 --- a/src/controllers/OpclassesController.php +++ b/src/controllers/OpclassesController.php @@ -1,13 +1,13 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use Slim\Http\Response; use PHPPgAdmin\Decorators\Decorator; +use Slim\Http\Response; /** * Base controller class. @@ -18,6 +18,8 @@ class OpclassesController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|Response|string */ public function render() { @@ -29,7 +31,6 @@ class OpclassesController extends BaseController $this->printBody(); $this->doDefault(); - $this->printFooter(); } @@ -38,7 +39,7 @@ class OpclassesController extends BaseController * * @param string $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -74,7 +75,9 @@ class OpclassesController extends BaseController $actions = []; - echo $this->printTable($opclasses, $columns, $actions, 'opclasses-opclasses', $this->lang['strnoopclasses']); + if ($opclasses instanceof \PHPPgAdmin\Interfaces\RecordSet) { + echo $this->printTable($opclasses, $columns, $actions, 'opclasses-opclasses', $this->lang['strnoopclasses']); + } } /** diff --git a/src/controllers/OperatorsController.php b/src/controllers/OperatorsController.php index 01a4d075..406e8d08 100644 --- a/src/controllers/OperatorsController.php +++ b/src/controllers/OperatorsController.php @@ -1,13 +1,13 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use Slim\Http\Response; use PHPPgAdmin\Decorators\Decorator; +use Slim\Http\Response; /** * Base controller class. @@ -18,6 +18,8 @@ class OperatorsController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|Response|string */ public function render() { @@ -106,7 +108,7 @@ class OperatorsController extends BaseController * * @param mixed $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -166,7 +168,9 @@ class OperatorsController extends BaseController ], ]; - echo $this->printTable($operators, $columns, $actions, 'operators-operators', $this->lang['strnooperators']); + if (self::isRecordset($operators)) { + echo $this->printTable($operators, $columns, $actions, 'operators-operators', $this->lang['strnooperators']); + } // TODO operators action=create $this->lang['strcreateoperator'] } @@ -176,7 +180,7 @@ class OperatorsController extends BaseController * * @param mixed $msg */ - public function doProperties($msg = ''): void + public function doProperties($msg = '') { $data = $this->misc->getDatabaseAccessor(); diff --git a/src/controllers/PrivilegesController.php b/src/controllers/PrivilegesController.php index 182db391..f504d703 100644 --- a/src/controllers/PrivilegesController.php +++ b/src/controllers/PrivilegesController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; @@ -18,7 +18,7 @@ class PrivilegesController extends BaseController /** * Default method to render the controller according to the action parameter. */ - public function render(): void + public function render() { $this->printHeader(); $this->printBody(); @@ -51,7 +51,7 @@ class PrivilegesController extends BaseController * * @param mixed $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); $subject = $_REQUEST['subject']; @@ -84,7 +84,7 @@ class PrivilegesController extends BaseController return; } - $object = isset($_REQUEST[$subject . '_oid']) ? $_REQUEST[$subject . '_oid'] : $_REQUEST[$subject]; + $object = $_REQUEST[$subject . '_oid'] ?? $_REQUEST[$subject]; // Get the privileges on the object, given its type if ('column' === $subject) { @@ -484,7 +484,7 @@ class PrivilegesController extends BaseController $object = $_REQUEST[$_REQUEST['subject']]; } - $table = isset($_REQUEST['table']) ? $_REQUEST['table'] : null; + $table = $_REQUEST['table'] ?? null; $status = $data->setPrivileges( ('grant' === $mode) ? 'GRANT' : 'REVOKE', diff --git a/src/controllers/RolesController.php b/src/controllers/RolesController.php index 8fb58c24..cdb7e6ce 100644 --- a/src/controllers/RolesController.php +++ b/src/controllers/RolesController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; @@ -19,7 +19,7 @@ class RolesController extends BaseController /** * Default method to render the controller according to the action parameter. */ - public function render(): void + public function render() { $this->printHeader(); $this->printBody(); @@ -94,7 +94,7 @@ class RolesController extends BaseController * * @param mixed $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -118,7 +118,7 @@ class RolesController extends BaseController 'title' => $this->lang['strrole'], 'field' => Decorator::field('rolname'), 'url' => \containerInstance()->getDestinationWithLastTab('role'), - + 'vars' => ['rolename' => 'rolname'], ], 'group' => [ @@ -194,7 +194,9 @@ class RolesController extends BaseController ], ]; - echo $this->printTable($roles, $columns, $actions, 'roles-roles', $this->lang['strnoroles']); + if (self::isRecordset($roles)) { + echo $this->printTable($roles, $columns, $actions, 'roles-roles', $this->lang['strnoroles']); + } $navlinks = [ 'create' => [ @@ -218,7 +220,7 @@ class RolesController extends BaseController * * @param mixed $msg */ - public function doCreate($msg = ''): void + public function doCreate($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -242,7 +244,7 @@ class RolesController extends BaseController $this->printTitle($this->lang['strcreaterole'], 'pg.role.create'); $this->printMsg($msg); - echo '<form action="roles" method="post">' . \PHP_EOL; + echo '<form action="roles" class="max_height" method="post">' . \PHP_EOL; echo '<table>' . \PHP_EOL; echo \sprintf( ' <tr> @@ -270,36 +272,31 @@ class RolesController extends BaseController <th class="data left"><label for="formSuper">%s</label></th>', $this->lang['strsuper'] ) . \PHP_EOL; - echo "\t\t<td class=\"data1\"><input type=\"checkbox\" id=\"formSuper\" name=\"formSuper\"", - (isset($_POST['formSuper'])) ? ' checked="checked"' : '', " /></td>\n\t</tr>" . \PHP_EOL; + echo "\t\t<td class=\"data1\"><input type=\"checkbox\" id=\"formSuper\" name=\"formSuper\"", (isset($_POST['formSuper'])) ? ' checked="checked"' : '', " /></td>\n\t</tr>" . \PHP_EOL; echo \sprintf( ' <tr> <th class="data left"><label for="formCreateDB">%s</label></th>', $this->lang['strcreatedb'] ) . \PHP_EOL; - echo "\t\t<td class=\"data1\"><input type=\"checkbox\" id=\"formCreateDB\" name=\"formCreateDB\"", - (isset($_POST['formCreateDB'])) ? ' checked="checked"' : '', " /></td>\n\t</tr>" . \PHP_EOL; + echo "\t\t<td class=\"data1\"><input type=\"checkbox\" id=\"formCreateDB\" name=\"formCreateDB\"", (isset($_POST['formCreateDB'])) ? ' checked="checked"' : '', " /></td>\n\t</tr>" . \PHP_EOL; echo \sprintf( ' <tr> <th class="data left"><label for="formCreateRole">%s</label></th>', $this->lang['strcancreaterole'] ) . \PHP_EOL; - echo "\t\t<td class=\"data1\"><input type=\"checkbox\" id=\"formCreateRole\" name=\"formCreateRole\"", - (isset($_POST['formCreateRole'])) ? ' checked="checked"' : '', " /></td>\n\t</tr>" . \PHP_EOL; + echo "\t\t<td class=\"data1\"><input type=\"checkbox\" id=\"formCreateRole\" name=\"formCreateRole\"", (isset($_POST['formCreateRole'])) ? ' checked="checked"' : '', " /></td>\n\t</tr>" . \PHP_EOL; echo \sprintf( ' <tr> <th class="data left"><label for="formInherits">%s</label></th>', $this->lang['strinheritsprivs'] ) . \PHP_EOL; - echo "\t\t<td class=\"data1\"><input type=\"checkbox\" id=\"formInherits\" name=\"formInherits\"", - (isset($_POST['formInherits'])) ? ' checked="checked"' : '', " /></td>\n\t</tr>" . \PHP_EOL; + echo "\t\t<td class=\"data1\"><input type=\"checkbox\" id=\"formInherits\" name=\"formInherits\"", (isset($_POST['formInherits'])) ? ' checked="checked"' : '', " /></td>\n\t</tr>" . \PHP_EOL; echo \sprintf( ' <tr> <th class="data left"><label for="formCanLogin">%s</label></th>', $this->lang['strcanlogin'] ) . \PHP_EOL; - echo "\t\t<td class=\"data1\"><input type=\"checkbox\" id=\"formCanLogin\" name=\"formCanLogin\"", - (isset($_POST['formCanLogin'])) ? ' checked="checked"' : '', " /></td>\n\t</tr>" . \PHP_EOL; + echo "\t\t<td class=\"data1\"><input type=\"checkbox\" id=\"formCanLogin\" name=\"formCanLogin\"", (isset($_POST['formCanLogin'])) ? ' checked="checked"' : '', " /></td>\n\t</tr>" . \PHP_EOL; echo \sprintf( ' <tr> <th class="data left">%s</th>', @@ -329,8 +326,7 @@ class RolesController extends BaseController echo \sprintf( ' <option value="%s"', $rolename - ), - (\in_array($rolename, $_POST['memberof'], true) ? ' selected="selected"' : ''), '>', $this->misc->printVal($rolename), '</option>' . \PHP_EOL; + ), (\in_array($rolename, $_POST['memberof'], true) ? ' selected="selected"' : ''), '>', $this->misc->printVal($rolename), '</option>' . \PHP_EOL; $roles->MoveNext(); } echo "\t\t\t</select>" . \PHP_EOL; @@ -350,8 +346,7 @@ class RolesController extends BaseController echo \sprintf( ' <option value="%s"', $rolename - ), - (\in_array($rolename, $_POST['members'], true) ? ' selected="selected"' : ''), '>', $this->misc->printVal($rolename), '</option>' . \PHP_EOL; + ), (\in_array($rolename, $_POST['members'], true) ? ' selected="selected"' : ''), '>', $this->misc->printVal($rolename), '</option>' . \PHP_EOL; $roles->MoveNext(); } echo "\t\t\t</select>" . \PHP_EOL; @@ -371,8 +366,7 @@ class RolesController extends BaseController echo \sprintf( ' <option value="%s"', $rolename - ), - (\in_array($rolename, $_POST['adminmembers'], true) ? ' selected="selected"' : ''), '>', $this->misc->printVal($rolename), '</option>' . \PHP_EOL; + ), (\in_array($rolename, $_POST['adminmembers'], true) ? ' selected="selected"' : ''), '>', $this->misc->printVal($rolename), '</option>' . \PHP_EOL; $roles->MoveNext(); } echo "\t\t\t</select>" . \PHP_EOL; @@ -441,7 +435,7 @@ class RolesController extends BaseController * * @param mixed $msg */ - public function doAlter($msg = ''): void + public function doAlter($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -497,36 +491,31 @@ class RolesController extends BaseController <th class="data left"><label for="formSuper">%s</label></th>', $this->lang['strsuper'] ) . \PHP_EOL; - echo "\t\t<td class=\"data1\"><input type=\"checkbox\" id=\"formSuper\" name=\"formSuper\"", - (isset($_POST['formSuper'])) ? ' checked="checked"' : '', " /></td>\n\t</tr>" . \PHP_EOL; + echo "\t\t<td class=\"data1\"><input type=\"checkbox\" id=\"formSuper\" name=\"formSuper\"", (isset($_POST['formSuper'])) ? ' checked="checked"' : '', " /></td>\n\t</tr>" . \PHP_EOL; echo \sprintf( ' <tr> <th class="data left"><label for="formCreateDB">%s</label></th>', $this->lang['strcreatedb'] ) . \PHP_EOL; - echo "\t\t<td class=\"data1\"><input type=\"checkbox\" id=\"formCreateDB\" name=\"formCreateDB\"", - (isset($_POST['formCreateDB'])) ? ' checked="checked"' : '', " /></td>\n\t</tr>" . \PHP_EOL; + echo "\t\t<td class=\"data1\"><input type=\"checkbox\" id=\"formCreateDB\" name=\"formCreateDB\"", (isset($_POST['formCreateDB'])) ? ' checked="checked"' : '', " /></td>\n\t</tr>" . \PHP_EOL; echo \sprintf( ' <tr> <th class="data left"><label for="formCreateRole">%s</label></th>', $this->lang['strcancreaterole'] ) . \PHP_EOL; - echo "\t\t<td class=\"data1\"><input type=\"checkbox\" id=\"formCreateRole\" name=\"formCreateRole\"", - (isset($_POST['formCreateRole'])) ? ' checked="checked"' : '', " /></td>\n\t</tr>" . \PHP_EOL; + echo "\t\t<td class=\"data1\"><input type=\"checkbox\" id=\"formCreateRole\" name=\"formCreateRole\"", (isset($_POST['formCreateRole'])) ? ' checked="checked"' : '', " /></td>\n\t</tr>" . \PHP_EOL; echo \sprintf( ' <tr> <th class="data left"><label for="formInherits">%s</label></th>', $this->lang['strinheritsprivs'] ) . \PHP_EOL; - echo "\t\t<td class=\"data1\"><input type=\"checkbox\" id=\"formInherits\" name=\"formInherits\"", - (isset($_POST['formInherits'])) ? ' checked="checked"' : '', " /></td>\n\t</tr>" . \PHP_EOL; + echo "\t\t<td class=\"data1\"><input type=\"checkbox\" id=\"formInherits\" name=\"formInherits\"", (isset($_POST['formInherits'])) ? ' checked="checked"' : '', " /></td>\n\t</tr>" . \PHP_EOL; echo \sprintf( ' <tr> <th class="data left"><label for="formCanLogin">%s</label></th>', $this->lang['strcanlogin'] ) . \PHP_EOL; - echo "\t\t<td class=\"data1\"><input type=\"checkbox\" id=\"formCanLogin\" name=\"formCanLogin\"", - (isset($_POST['formCanLogin'])) ? ' checked="checked"' : '', " /></td>\n\t</tr>" . \PHP_EOL; + echo "\t\t<td class=\"data1\"><input type=\"checkbox\" id=\"formCanLogin\" name=\"formCanLogin\"", (isset($_POST['formCanLogin'])) ? ' checked="checked"' : '', " /></td>\n\t</tr>" . \PHP_EOL; echo \sprintf( ' <tr> <th class="data left">%s</th>', @@ -565,8 +554,7 @@ class RolesController extends BaseController echo \sprintf( ' <option value="%s"', $rolename - ), - (\in_array($rolename, $_POST['memberof'], true) ? ' selected="selected"' : ''), '>', $this->misc->printVal($rolename), '</option>' . \PHP_EOL; + ), (\in_array($rolename, $_POST['memberof'], true) ? ' selected="selected"' : ''), '>', $this->misc->printVal($rolename), '</option>' . \PHP_EOL; $roles->MoveNext(); } echo "\t\t\t</select>" . \PHP_EOL; @@ -586,8 +574,7 @@ class RolesController extends BaseController echo \sprintf( ' <option value="%s"', $rolename - ), - (\in_array($rolename, $_POST['members'], true) ? ' selected="selected"' : ''), '>', $this->misc->printVal($rolename), '</option>' . \PHP_EOL; + ), (\in_array($rolename, $_POST['members'], true) ? ' selected="selected"' : ''), '>', $this->misc->printVal($rolename), '</option>' . \PHP_EOL; $roles->MoveNext(); } echo "\t\t\t</select>" . \PHP_EOL; @@ -607,8 +594,7 @@ class RolesController extends BaseController echo \sprintf( ' <option value="%s"', $rolename - ), - (\in_array($rolename, $_POST['adminmembers'], true) ? ' selected="selected"' : ''), '>', $this->misc->printVal($rolename), '</option>' . \PHP_EOL; + ), (\in_array($rolename, $_POST['adminmembers'], true) ? ' selected="selected"' : ''), '>', $this->misc->printVal($rolename), '</option>' . \PHP_EOL; $roles->MoveNext(); } echo "\t\t\t</select>" . \PHP_EOL; @@ -715,7 +701,7 @@ class RolesController extends BaseController * * @param mixed $msg */ - public function doProperties($msg = ''): void + public function doProperties($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -893,7 +879,7 @@ class RolesController extends BaseController * * @param mixed $msg */ - public function doAccount($msg = ''): void + public function doAccount($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -1079,6 +1065,9 @@ class RolesController extends BaseController $_POST['formPassword'] = ''; } + /** + * @param \PHPPgAdmin\Database\Postgres $data + */ private function _populateMemberof($data): void { if (!isset($_POST['memberof'])) { @@ -1097,6 +1086,9 @@ class RolesController extends BaseController } } + /** + * @param \PHPPgAdmin\Database\Postgres $data + */ private function _populateMembers($data): void { if (!isset($_POST['members'])) { @@ -1115,6 +1107,9 @@ class RolesController extends BaseController } } + /** + * @param \PHPPgAdmin\Database\Postgres $data + */ private function _populateAdminmembers($data): void { if (!isset($_POST['adminmembers'])) { diff --git a/src/controllers/RulesController.php b/src/controllers/RulesController.php index 084621cc..66440834 100644 --- a/src/controllers/RulesController.php +++ b/src/controllers/RulesController.php @@ -1,13 +1,13 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use Slim\Http\Response; use PHPPgAdmin\Decorators\Decorator; +use Slim\Http\Response; /** * Base controller class. @@ -16,6 +16,8 @@ class RulesController extends BaseController { /** * Default method to render the controller according to the action parameter. + * + * @return null|Response|string */ public function render() { @@ -67,7 +69,7 @@ class RulesController extends BaseController * * @param mixed $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -112,7 +114,9 @@ class RulesController extends BaseController ], ]; - echo $this->printTable($rules, $columns, $actions, 'rules-rules', $this->lang['strnorules']); + if (self::isRecordset($rules)) { + echo $this->printTable($rules, $columns, $actions, 'rules-rules', $this->lang['strnorules']); + } $this->printNavLinks(['create' => [ 'attr' => [ @@ -189,6 +193,7 @@ class RulesController extends BaseController $this->lang['strevent'] ) . \PHP_EOL; echo '<td class="data1"><select name="event">' . \PHP_EOL; + foreach ($data->rule_events as $v) { echo \sprintf( '<option value="%s"', diff --git a/src/controllers/SchemasController.php b/src/controllers/SchemasController.php index 2877548b..f3fb9766 100644 --- a/src/controllers/SchemasController.php +++ b/src/controllers/SchemasController.php @@ -1,14 +1,14 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use Slim\Http\Response; use PHPPgAdmin\Decorators\Decorator; use PHPPgAdmin\Traits\ExportTrait; +use Slim\Http\Response; /** * Base controller class. @@ -21,6 +21,8 @@ class SchemasController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|Response|string */ public function render() { @@ -92,7 +94,7 @@ class SchemasController extends BaseController * * @param mixed $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -117,16 +119,16 @@ class SchemasController extends BaseController 'owner' => [ 'title' => $this->lang['strowner'], 'field' => Decorator::field('nspowner'), - ]]; - if(boolval($this->conf['display_sizes']['schemas']??false)) { - - + ], + ]; + + if ((bool) ($this->conf['display_sizes']['schemas'] ?? false)) { $columns['schema_size'] = [ 'title' => $this->lang['strsize'], 'field' => Decorator::field('schema_size'), ]; } - $columns=array_merge($columns,[ + $columns = \array_merge($columns, [ 'actions' => [ 'title' => $this->lang['stractions'], ], @@ -184,7 +186,9 @@ class SchemasController extends BaseController unset($actions['alter']); } - echo $this->printTable($schemas, $columns, $actions, 'schemas-schemas', $this->lang['strnoschemas']); + if (self::isRecordset($schemas)) { + echo $this->printTable($schemas, $columns, $actions, 'schemas-schemas', $this->lang['strnoschemas']); + } $this->printNavLinks(['create' => [ 'attr' => [ @@ -274,7 +278,7 @@ class SchemasController extends BaseController * * @param mixed $msg */ - public function doCreate($msg = ''): void + public function doCreate($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -380,7 +384,7 @@ class SchemasController extends BaseController * * @param mixed $msg */ - public function doAlter($msg = ''): void + public function doAlter($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -468,8 +472,6 @@ class SchemasController extends BaseController /** * Save the form submission containing changes to a schema. - * - * @param mixed $msg */ public function doSaveAlter(): void { @@ -539,6 +541,7 @@ class SchemasController extends BaseController } elseif (\is_array($_POST['nsp'])) { $msg = ''; $status = $data->beginTransaction(); + if (0 === $status) { foreach ($_POST['nsp'] as $s) { $status = $data->dropSchema($s, isset($_POST['cascade'])); @@ -562,6 +565,7 @@ class SchemasController extends BaseController } } } + if (0 === $data->endTransaction()) { // Everything went fine, back to the Default page.... $this->view->setReloadBrowser(true); @@ -586,7 +590,7 @@ class SchemasController extends BaseController * * @param mixed $msg */ - public function doExport($msg = ''): void + public function doExport($msg = '') { $this->printTrail('schema'); $this->printTabs('schema', 'export'); diff --git a/src/controllers/SequencesController.php b/src/controllers/SequencesController.php index da338e61..f6424eb5 100644 --- a/src/controllers/SequencesController.php +++ b/src/controllers/SequencesController.php @@ -1,13 +1,13 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use Slim\Http\Response; use PHPPgAdmin\Decorators\Decorator; +use Slim\Http\Response; /** * Base controller class. @@ -18,6 +18,8 @@ class SequencesController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|Response|string */ public function render() { @@ -111,7 +113,7 @@ class SequencesController extends BaseController * * @param mixed $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -190,7 +192,9 @@ class SequencesController extends BaseController ], ]; - echo $this->printTable($sequences, $columns, $actions, 'sequences-sequences', $this->lang['strnosequences']); + if (self::isRecordset($sequences)) { + echo $this->printTable($sequences, $columns, $actions, 'sequences-sequences', $this->lang['strnosequences']); + } $this->printNavLinks(['create' => [ 'attr' => [ @@ -236,7 +240,7 @@ class SequencesController extends BaseController * * @param mixed $msg */ - public function doProperties($msg = ''): void + public function doProperties($msg = '') { $data = $this->misc->getDatabaseAccessor(); $this->printTrail('sequence'); @@ -475,6 +479,7 @@ class SequencesController extends BaseController } elseif (\is_array($_POST['sequence'])) { $msg = ''; $status = $data->beginTransaction(); + if (0 === $status) { foreach ($_POST['sequence'] as $s) { $status = $data->dropSequence($s, isset($_POST['cascade'])); @@ -498,6 +503,7 @@ class SequencesController extends BaseController } } } + if (0 === $data->endTransaction()) { // Everything went fine, back to the Default page.... $this->view->setReloadBrowser(true); @@ -522,7 +528,7 @@ class SequencesController extends BaseController * * @param mixed $msg */ - public function doCreateSequence($msg = ''): void + public function doCreateSequence($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -717,7 +723,7 @@ class SequencesController extends BaseController * * @param mixed $msg */ - public function doSetval($msg = ''): void + public function doSetval($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -828,7 +834,7 @@ class SequencesController extends BaseController * * @param mixed $msg */ - public function doAlter($msg = ''): void + public function doAlter($msg = '') { $data = $this->misc->getDatabaseAccessor(); diff --git a/src/controllers/ServersController.php b/src/controllers/ServersController.php index 781d4537..a1809bd4 100644 --- a/src/controllers/ServersController.php +++ b/src/controllers/ServersController.php @@ -1,15 +1,15 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use Slim\Http\Response; use PHPPgAdmin\ArrayRecordSet; use PHPPgAdmin\Decorators\Decorator; use PHPPgAdmin\Traits\ServersTrait; +use Slim\Http\Response; /** * Base controller class. @@ -36,6 +36,8 @@ class ServersController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|Response|string */ public function render() { @@ -46,7 +48,7 @@ class ServersController extends BaseController $msg = $this->msg; $server_html = $this->printHeader($this->headerTitle(), null, false); - $server_html .= $this->printBody(false,'flexbox_body',false,true); + $server_html .= $this->printBody(false, 'flexbox_body', false, true); $server_html .= $this->printTrail('root', false); \ob_start(); @@ -66,20 +68,20 @@ class ServersController extends BaseController $server_html .= \ob_get_clean(); $server_html .= $this->printFooter(false); - $route=requestInstance()->getAttribute('route'); - $theResponse=\responseInstance(); - // ddd($server_html); + $route = requestInstance()->getAttribute('route'); + $theResponse = \responseInstance(); + // ddd($server_html); if (null === $route) { echo $server_html; } else { $body = $theResponse->getBody(); $body->write($server_html); - - return $theResponse ; + + return $theResponse; } } - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $this->printTabs('root', 'servers'); $this->printMsg($msg); @@ -96,12 +98,15 @@ class ServersController extends BaseController ]; $actions = []; - if ((false !== $group) && - (isset($this->conf['srv_groups'][$group])) && - (0 < $groups->RecordCount()) + if ((false !== $group) + && (isset($this->conf['srv_groups'][$group])) + && (0 < $groups->RecordCount()) ) { $this->printTitle(\sprintf($this->lang['strgroupgroups'], \htmlentities($this->conf['srv_groups'][$group]['desc'], \ENT_QUOTES, 'UTF-8'))); - echo $this->printTable($groups, $columns, $actions, $this->table_place); + + if (self::isRecordset($groups)) { + echo $this->printTable($groups, $columns, $actions, $this->table_place); + } } $servers = $this->getServers(true, $group); @@ -112,7 +117,6 @@ class ServersController extends BaseController 'field' => Decorator::field('desc'), 'url' => \containerInstance()->getDestinationWithLastTab('server'), 'vars' => ['server' => 'sha'], - ], 'host' => [ 'title' => $this->lang['strhost'], @@ -146,19 +150,26 @@ class ServersController extends BaseController ], ]; //\sha1("{$server_info['host']}:{$server_info['port']}:{$server_info['sslmode']}") - $svPre = static function (&$rowdata) use ($actions) { + $svPre = /** + * @psalm-return array{logout: array{content: mixed, attr: array{href: array{url: string, urlvars: array{action: string, logoutServer: \PHPPgAdmin\Decorators\FieldDecorator}}}, disable: bool}} + * + * @param mixed $rowdata + * + * @return (((\PHPPgAdmin\Decorators\FieldDecorator|string)[]|string)[][]|bool|mixed)[][] + */ + static function (&$rowdata) use ($actions): array { $actions['logout']['disable'] = empty($rowdata->fields['username']); return $actions; }; - if ((false !== $group) && - isset($this->conf['srv_groups'][$group]) + if ((false !== $group) + && isset($this->conf['srv_groups'][$group]) ) { $this->printTitle(\sprintf($this->lang['strgroupservers'], \htmlentities($this->conf['srv_groups'][$group]['desc'], \ENT_QUOTES, 'UTF-8')), null); $actions['logout']['attr']['href']['urlvars']['group'] = $group; } - $thetable= $this->printTable($servers, $columns, $actions, $this->table_place, $this->lang['strnoobjects'], $svPre); + $thetable = $this->printTable($servers, $columns, $actions, $this->table_place, $this->lang['strnoobjects'], $svPre); echo $thetable; } @@ -224,7 +235,9 @@ class ServersController extends BaseController * @param bool $recordset return as RecordSet suitable for HTMLTableController::printTable if true, otherwise just return an array * @param mixed $group_id a group name to filter the returned servers using $this->conf[srv_groups] * - * @return array|ArrayRecordSet either an array or a Recordset suitable for HTMLTableController::printTable + * @return (\PHPPgAdmin\Decorators\UrlDecorator|mixed|string)[][]|ArrayRecordSet either an array or a Recordset suitable for HTMLTableController::printTable + * + * @psalm-return ArrayRecordSet|array<array-key, array{id: mixed|string, desc: mixed, icon: string, action: \PHPPgAdmin\Decorators\UrlDecorator, branch: \PHPPgAdmin\Decorators\UrlDecorator}> */ private function getServersGroups($recordset = false, $group_id = false) { @@ -232,10 +245,10 @@ class ServersController extends BaseController if (isset($this->conf['srv_groups'])) { foreach ($this->conf['srv_groups'] as $i => $group) { - if (((false === $group_id) && (!isset($group['parents']))) || - (false !== $group_id) && - isset($group['parents']) && - \in_array( + if (((false === $group_id) && (!isset($group['parents']))) + || (false !== $group_id) + && isset($group['parents']) + && \in_array( $group_id, \explode( ',', diff --git a/src/controllers/SqlController.php b/src/controllers/SqlController.php index 83d8646e..586c654b 100644 --- a/src/controllers/SqlController.php +++ b/src/controllers/SqlController.php @@ -1,13 +1,13 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; use ADORecordSet; -use Kint\Kint; +use Exception; use PHPPgAdmin\ADOdbException; /** @@ -27,6 +27,8 @@ class SqlController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|\Slim\Http\Response|string */ public function render() { @@ -57,62 +59,56 @@ class SqlController extends BaseController if (isset($_REQUEST['subject'])) { $this->subject = $_REQUEST['subject']; } - + // Check to see if pagination has been specified. In that case, send to display // script for pagination // if a file is given or the request is an explain, do not paginate - if (isset($_REQUEST['paginate']) && - !(isset($_FILES['script']) && 0 < $_FILES['script']['size']) && - (0 === \preg_match('/^\s*explain/i', $this->query))) { + if (isset($_REQUEST['paginate']) + && !(isset($_FILES['script']) && 0 < $_FILES['script']['size']) + && (0 === \preg_match('/^\s*explain/i', $this->query)) + ) { //if (!(isset($_FILES['script']) && $_FILES['script']['size'] > 0)) { - + $display_controller = new DisplayController($this->getContainer()); - + return $display_controller->render(); } - - $this->view->offsetSet('codemirror',true); - - - // Set the schema search path + $this->view->offsetSet('codemirror', true); + + // May as well try to time the query + + [$usec, $sec] = \explode(' ', \microtime()); + $this->start_time = ((float) $usec + (float) $sec); + $this->view->offsetSet('serverSide', 1); + $header = $this->printHeader($this->headerTitle(), null, true); + $body = $this->printBody(false); + $trail = $this->printTrail('database', false); + $title = $this->printTitle($this->lang['strqueryresults'], null, false); + echo $body . $trail . $title; + if (isset($_REQUEST['search_path']) && 0 !== $data->setSearchPath(\array_map('trim', \explode(',', $_REQUEST['search_path'])))) { - $this->printHeader($this->headerTitle(), null, true ); - $body=$this->printBody(false); - $trail=$this->printTrail('database',false); - $title=$this->printTitle($this->lang['strqueryresults'],null,false); - echo $body.$trail.$title; return $this->printFooter(); } - - // May as well try to time the query - if (\function_exists('microtime')) { - [$usec, $sec] = \explode(' ', \microtime()); - $this->start_time = ((float) $usec + (float) $sec); - $this->view->offsetSet('serverSide',1); - $header= $this->printHeader($this->headerTitle(), null, true ); - $body=$this->printBody(false); - $trail=$this->printTrail('database',false); - $title=$this->printTitle($this->lang['strqueryresults'],null,false); - echo $body.$trail.$title; - - $rs = $this->doDefault(); - - - } - echo $body.$trail.$title; - // echo $body.$trail.$title; - $this->doFooter(true, 'footer_sqledit.twig', $rs); + try { + $rs = $this->doDefault(); + + // echo $body.$trail.$title; + $this->doFooter(true, 'footer_sqledit.twig', $rs); + } catch (Exception $e) { + exit($e->getMessage()); + } } + /** + * @return null|\PHPPgAdmin\ADORecordSet + */ public function doDefault() { $_connection = $this->misc->getConnection(); try { - - return $this->execute_query(); } catch (ADOdbException $e) { $message = $e->getMessage(); @@ -129,13 +125,13 @@ class SqlController extends BaseController $data = $this->misc->getDatabaseAccessor(); $_connection = $this->misc->getConnection(); $lang = $this->lang; - $json=[]; + $json = []; /** * This is a callback function to display the result of each separate query. * * @param ADORecordSet $rs The recordset returned by the script execetor */ - $sqlCallback = static function ($query, $rs, $lineno) use ($data, $misc, $lang, $_connection,&$json): void { + $sqlCallback = static function ($query, $rs, $lineno) use ($data, $misc, $lang, $_connection, &$json): void { // Check if $rs is false, if so then there was a fatal error if (false === $rs) { echo \htmlspecialchars($_FILES['script']['name']), ':', $lineno, ': ', \nl2br(\htmlspecialchars($_connection->getLastError())), '<br/>' . \PHP_EOL; @@ -166,7 +162,7 @@ class SqlController extends BaseController } echo '</tr>' . \PHP_EOL; $row = \pg_fetch_row($rs); - + ++$i; } @@ -203,7 +199,7 @@ class SqlController extends BaseController } /** - * @return null|ADORecordSet + * @return null|\PHPPgAdmin\ADORecordSet */ private function execute_query() { @@ -217,7 +213,7 @@ class SqlController extends BaseController * @var ADORecordSet */ $rs = $data->conn->Execute($this->query); - + echo '<form method="post" id="sqlform" action="' . $_SERVER['REQUEST_URI'] . '">'; echo '<textarea width="90%" name="query" id="query" rows="5" cols="100" resizable="true">'; @@ -225,7 +221,7 @@ class SqlController extends BaseController echo '</textarea><br>'; echo $this->view->setForm(); echo '<input type="submit"/></form>'; -$json=[]; + $json = []; // $rs will only be an object if there is no error if (\is_object($rs)) { // Request was run, saving it in history @@ -239,37 +235,37 @@ $json=[]; if (0 < $rs->RecordCount()) { echo "<table>\n<tr>"; - foreach (array_keys($rs->fields) as $fieldName) { + foreach (\array_keys($rs->fields) as $fieldName) { $finfo = $rs->FetchField($fieldName); echo '<th class="data">', $this->misc->printVal($finfo->name), '</th>'; } echo '</tr>' . \PHP_EOL; $i = 0; -$res=''; + while (!$rs->EOF) { $id = (0 === ($i % 2) ? '1' : '2'); - $res.= \sprintf( + $res = \sprintf( '<tr class="data%s">', $id ) . \PHP_EOL; - $json[$i]=[]; + $json[$i] = []; + foreach ($rs->fields as $fieldName => $fieldValue) { $finfo = $rs->FetchField($fieldName); - $parsedValue=$this->misc->printVal($fieldValue, $finfo->type, ['null' => true]); - - $json[$i][$fieldName]=$parsedValue; - $res.= '<td style="white-space:nowrap;">'; - $res.= $parsedValue; - $res.= '</td>'; + $parsedValue = $this->misc->printVal($fieldValue, $finfo->type, ['null' => true]); + + $json[$i][$fieldName] = $parsedValue; + $res .= '<td style="white-space:nowrap;">'; + $res .= $parsedValue; + $res .= '</td>'; } - $res.= '</tr>' . \PHP_EOL; + $res .= '</tr>' . \PHP_EOL; + echo $res; $rs->MoveNext(); ++$i; - } - - echo $res; + echo '</table>' . \PHP_EOL; echo '<p>', $rs->RecordCount(), \sprintf( ' %s</p>', @@ -285,15 +281,16 @@ $res=''; // Otherwise nodata to print echo '<p>', $this->lang['strnodata'], '</p>' . \PHP_EOL; } - + return $rs; } } /** * @param true $doBody - * @param string $template * @param null|mixed $rs + * + * @return null|string */ private function doFooter(bool $doBody = true, string $template = 'footer.twig', $rs = null) { diff --git a/src/controllers/SqleditController.php b/src/controllers/SqleditController.php index 03c79ef6..b303fd54 100644 --- a/src/controllers/SqleditController.php +++ b/src/controllers/SqleditController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; @@ -26,7 +26,7 @@ class SqleditController extends BaseController /** * Default method to render the controller according to the action parameter. */ - public function render(): void + public function render() { switch ($this->action) { case 'find': @@ -41,21 +41,21 @@ class SqleditController extends BaseController break; } - + $this->setWindowName('sqledit'); $this->scripts = '<script type="text/javascript">window.inPopUp=true;</script>'; - $this->view->offsetSet('excludeJsTree',true); - $this->view->offsetSet('inPopUp',true); - $this->view->offsetSet('codemirror',true); + $this->view->offsetSet('excludeJsTree', true); + $this->view->offsetSet('inPopUp', true); + $this->view->offsetSet('codemirror', true); - $header=$this->printHeader($title, $this->scripts, false, 'header_sqledit.twig'); + $header = $this->printHeader($title, $this->scripts, false, 'header_sqledit.twig'); echo $header; - $this->printBody(true, 'sql_edit',false,false); + $this->printBody(true, 'sql_edit', false, false); echo $body_text; - $footer=$this->printFooter(false, 'footer_sqledit.twig'); - + $footer = $this->printFooter(false, 'footer_sqledit.twig'); + echo $footer; } @@ -74,19 +74,19 @@ class SqleditController extends BaseController $this->coalesceArr($_REQUEST, 'search_path', \implode(',', $data->getSearchPath())); $sqlquery = \htmlspecialchars($_SESSION['sqlquery']); - + $default_html = $this->printTabs('popup', 'sql', false); - - $default_html .= '<form action="' . \containerInstance()->subFolder . '/sql" method="post" enctype="multipart/form-data" class="sqlform" id="sqlform" target="opener">'; + + $default_html .= '<form action="' . \containerInstance()->subFolder . '/sql" method="post" enctype="multipart/form-data" class="sqlform" id="sqlform" target="detail">'; $default_html .= \PHP_EOL; $default_html .= $this->printConnection('sql', false); - + $default_html .= \PHP_EOL; - + $default_html .= ' <div class="searchpath">'; $default_html .= '<label>'; $default_html .= $this->view->printHelp($this->lang['strsearchpath'], 'pg.schema.search_path', false); - + $search_path = \htmlspecialchars($_REQUEST['search_path']); $default_html .= ': <input type="text" name="search_path" id="search_path" size="45" value="' . $search_path . '" />'; $default_html .= '</label>' . \PHP_EOL; @@ -154,7 +154,7 @@ class SqleditController extends BaseController $default_html = $this->printTabs('popup', 'find', false); - $default_html .= '<form action="database" method="post" target="opener">' . \PHP_EOL; + $default_html .= '<form action="database" method="post" target="detail">' . \PHP_EOL; $default_html .= $this->printConnection('find', false); $default_html .= '<p><input class="focusme" name="term" id="term" value="' . \htmlspecialchars($_REQUEST['term']) . \sprintf( '" size="32" maxlength="%s" />', diff --git a/src/controllers/TablesController.php b/src/controllers/TablesController.php index b21009e9..ff1c69a7 100644 --- a/src/controllers/TablesController.php +++ b/src/controllers/TablesController.php @@ -1,16 +1,16 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use Slim\Http\Response; use PHPPgAdmin\Decorators\Decorator; use PHPPgAdmin\Traits\AdminTrait; use PHPPgAdmin\Traits\InsertEditRowTrait; use PHPPgAdmin\XHtml\HTMLController; +use Slim\Http\Response; /** * Base controller class. @@ -147,7 +147,7 @@ class TablesController extends BaseController * * @param mixed $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -159,13 +159,15 @@ class TablesController extends BaseController $columns = $this->_getColumns(); - if(!boolval($this->conf['display_sizes']['tables']??false)) { + if (!(bool) ($this->conf['display_sizes']['tables'] ?? false)) { unset($columns['table_size']); } $actions = $this->_getActions(); - echo $this->printTable($tables, $columns, $actions, $this->table_place, $this->lang['strnotables']); + if (self::isRecordset($tables)) { + echo $this->printTable($tables, $columns, $actions, $this->table_place, $this->lang['strnotables']); + } $attr = [ 'href' => [ 'url' => 'tables', @@ -293,7 +295,7 @@ class TablesController extends BaseController * * @param mixed $msg */ - public function doCreate($msg = ''): void + public function doCreate($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -865,7 +867,7 @@ class TablesController extends BaseController * @param mixed $confirm * @param mixed $msg * - * @return null|string + * @return null|Response */ public function doSelectRows($confirm, $msg = '') { @@ -1036,7 +1038,7 @@ class TablesController extends BaseController * * @param mixed $msg */ - public function formInsertRow($msg = ''): void + public function formInsertRow($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -1512,9 +1514,9 @@ class TablesController extends BaseController } /** - * @return (mixed|string|string[])[][] + * @return (\PHPPgAdmin\Decorators\FieldDecorator|mixed|string|string[])[][] * - * @psalm-return array{table: array{title: mixed, field: mixed, url: string, vars: array{table: string}}, owner: array{title: mixed, field: mixed}, tablespace: array{title: mixed, field: mixed}, tuples: array{title: mixed, field: mixed, type: string}, table_size: array{title: mixed, field: mixed}, actions: array{title: mixed}, comment: array{title: mixed, field: mixed}} + * @psalm-return array{table: array{title: mixed, field: \PHPPgAdmin\Decorators\FieldDecorator, url: string, vars: array{table: string}}, owner: array{title: mixed, field: \PHPPgAdmin\Decorators\FieldDecorator}, tablespace: array{title: mixed, field: \PHPPgAdmin\Decorators\FieldDecorator}, tuples: array{title: mixed, field: \PHPPgAdmin\Decorators\FieldDecorator, type: string}, table_size: array{title: mixed, field: \PHPPgAdmin\Decorators\FieldDecorator}, actions: array{title: mixed}, comment: array{title: mixed, field: \PHPPgAdmin\Decorators\FieldDecorator}} */ private function _getColumns() { @@ -1556,9 +1558,9 @@ class TablesController extends BaseController } /** - * @return ((((mixed|string)[]|string)[]|string)[]|mixed|string)[][] + * @return ((((\PHPPgAdmin\Decorators\FieldDecorator|string)[]|string)[]|string)[]|mixed|string)[][] * - * @psalm-return array{multiactions: array{keycols: array{table: string}, url: string, default: string}, browse: array{content: mixed, attr: array{href: array{url: string, urlvars: array{subject: string, return: string, table: mixed}}}}, select: array{content: mixed, attr: array{href: array{url: string, urlvars: array{action: string, table: mixed}}}}, insert: array{content: mixed, attr: array{href: array{url: string, urlvars: array{action: string, table: mixed}}}}, empty: array{multiaction: string, content: mixed, attr: array{href: array{url: string, urlvars: array{action: string, table: mixed}}}}, alter: array{content: mixed, attr: array{href: array{url: string, urlvars: array{action: string, table: mixed}}}}, drop: array{multiaction: string, content: mixed, attr: array{href: array{url: string, urlvars: array{action: string, table: mixed}}}}, vacuum: array{multiaction: string, content: mixed, attr: array{href: array{url: string, urlvars: array{action: string, table: mixed}}}}, analyze: array{multiaction: string, content: mixed, attr: array{href: array{url: string, urlvars: array{action: string, table: mixed}}}}, reindex: array{multiaction: string, content: mixed, attr: array{href: array{url: string, urlvars: array{action: string, table: mixed}}}}} + * @psalm-return array{multiactions: array{keycols: array{table: string}, url: string, default: string}, browse: array{content: mixed, attr: array{href: array{url: string, urlvars: array{subject: string, return: string, table: \PHPPgAdmin\Decorators\FieldDecorator}}}}, select: array{content: mixed, attr: array{href: array{url: string, urlvars: array{action: string, table: \PHPPgAdmin\Decorators\FieldDecorator}}}}, insert: array{content: mixed, attr: array{href: array{url: string, urlvars: array{action: string, table: \PHPPgAdmin\Decorators\FieldDecorator}}}}, empty: array{multiaction: string, content: mixed, attr: array{href: array{url: string, urlvars: array{action: string, table: \PHPPgAdmin\Decorators\FieldDecorator}}}}, alter: array{content: mixed, attr: array{href: array{url: string, urlvars: array{action: string, table: \PHPPgAdmin\Decorators\FieldDecorator}}}}, drop: array{multiaction: string, content: mixed, attr: array{href: array{url: string, urlvars: array{action: string, table: \PHPPgAdmin\Decorators\FieldDecorator}}}}, vacuum: array{multiaction: string, content: mixed, attr: array{href: array{url: string, urlvars: array{action: string, table: \PHPPgAdmin\Decorators\FieldDecorator}}}}, analyze: array{multiaction: string, content: mixed, attr: array{href: array{url: string, urlvars: array{action: string, table: \PHPPgAdmin\Decorators\FieldDecorator}}}}, reindex: array{multiaction: string, content: mixed, attr: array{href: array{url: string, urlvars: array{action: string, table: \PHPPgAdmin\Decorators\FieldDecorator}}}}} */ private function _getActions() { diff --git a/src/controllers/TablespacesController.php b/src/controllers/TablespacesController.php index 51ddf42f..ed119cf4 100644 --- a/src/controllers/TablespacesController.php +++ b/src/controllers/TablespacesController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; @@ -18,7 +18,7 @@ class TablespacesController extends BaseController /** * Default method to render the controller according to the action parameter. */ - public function render(): void + public function render() { $this->printHeader(); $this->printBody(); @@ -75,7 +75,7 @@ class TablespacesController extends BaseController * * @param mixed $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -149,7 +149,9 @@ class TablespacesController extends BaseController ], ]; - echo $this->printTable($tablespaces, $columns, $actions, 'tablespaces-tablespaces', $this->lang['strnotablespaces']); + if (self::isRecordset($tablespaces)) { + echo $this->printTable($tablespaces, $columns, $actions, 'tablespaces-tablespaces', $this->lang['strnotablespaces']); + } $this->printNavLinks(['create' => [ 'attr' => [ @@ -170,7 +172,7 @@ class TablespacesController extends BaseController * * @param mixed $msg */ - public function doAlter($msg = ''): void + public function doAlter($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -320,7 +322,7 @@ class TablespacesController extends BaseController * * @param mixed $msg */ - public function doCreate($msg = ''): void + public function doCreate($msg = '') { $data = $this->misc->getDatabaseAccessor(); diff --git a/src/controllers/TblpropertiesController.php b/src/controllers/TblpropertiesController.php index 971f5b2b..3b288a98 100644 --- a/src/controllers/TblpropertiesController.php +++ b/src/controllers/TblpropertiesController.php @@ -1,15 +1,15 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use Slim\Http\Response; use Closure; use PHPPgAdmin\Decorators\Decorator; use PHPPgAdmin\Traits\ExportTrait; +use Slim\Http\Response; /** * Base controller class. @@ -22,6 +22,8 @@ class TblpropertiesController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|Response|string */ public function render() { @@ -105,7 +107,7 @@ class TblpropertiesController extends BaseController * * @param mixed $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $misc = $this->misc; $this->data = $misc->getDatabaseAccessor(); @@ -331,7 +333,7 @@ class TblpropertiesController extends BaseController * * @param mixed $msg */ - public function doAlter($msg = ''): void + public function doAlter($msg = '') { $misc = $this->misc; $data = $misc->getDatabaseAccessor(); @@ -494,7 +496,7 @@ class TblpropertiesController extends BaseController } } - public function doExport($msg = ''): void + public function doExport($msg = '') { $data = $this->misc->getDatabaseAccessor(); $subject = 'table'; @@ -520,7 +522,7 @@ class TblpropertiesController extends BaseController echo $this->formFooter($subject, $object); } - public function doImport($msg = ''): void + public function doImport($msg = '') { $misc = $this->misc; @@ -609,7 +611,7 @@ class TblpropertiesController extends BaseController * * @param mixed $msg */ - public function doAddColumn($msg = ''): void + public function doAddColumn($msg = '') { $misc = $this->misc; $data = $misc->getDatabaseAccessor(); @@ -860,7 +862,7 @@ class TblpropertiesController extends BaseController } /** - * @psalm-return \Closure(mixed, mixed):mixed + * @psalm-return Closure(mixed, mixed):mixed * * @param mixed $data * @@ -1072,6 +1074,8 @@ class TblpropertiesController extends BaseController ], ]; - echo $this->printTable($attrs, $columns, $actions, 'tblproperties-tblproperties', $this->lang['strnodata'], $attPre); + if (self::isRecordset($attrs)) { + echo $this->printTable($attrs, $columns, $actions, 'tblproperties-tblproperties', $this->lang['strnodata'], $attPre); + } } } diff --git a/src/controllers/TreeController.php b/src/controllers/TreeController.php index 01bfb635..e7159798 100644 --- a/src/controllers/TreeController.php +++ b/src/controllers/TreeController.php @@ -1,12 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; - use ADORecordSet; use PHPPgAdmin\ArrayRecordSet; use PHPPgAdmin\ContainerUtils; use PHPPgAdmin\Decorators\Decorator; @@ -70,19 +69,19 @@ class TreeController extends BaseController /** * Produce JSON data for the browser tree. * - * @param Recordset|ADORecordSet $_treedata a set of records to populate the tree - * @param array $attrs Attributes for tree items - * 'text' - the text for the tree node - * 'icon' - an icon for node - * 'openIcon' - an alternative icon when the node is expanded - * 'toolTip' - tool tip text for the node - * 'action' - URL to visit when single clicking the node - * 'iconAction' - URL to visit when single clicking the icon node - * 'branch' - URL for child nodes (tree XML) - * 'expand' - the action to return XML for the subtree - * 'nodata' - message to display when node has no children - * @param string $section The section where the branch is linked in the tree - * @param bool $print either to return or echo the result + * @param \PHPPgAdmin\ADORecordSet|Recordset $_treedata a set of records to populate the tree + * @param array $attrs Attributes for tree items + * 'text' - the text for the tree node + * 'icon' - an icon for node + * 'openIcon' - an alternative icon when the node is expanded + * 'toolTip' - tool tip text for the node + * 'action' - URL to visit when single clicking the node + * 'iconAction' - URL to visit when single clicking the icon node + * 'branch' - URL for child nodes (tree XML) + * 'expand' - the action to return XML for the subtree + * 'nodata' - message to display when node has no children + * @param string $section The section where the branch is linked in the tree + * @param bool $print either to return or echo the result * * @return (array|bool|string)[] the json rendered tree * @@ -148,6 +147,7 @@ class TreeController extends BaseController { $parent = []; $subFolder = containerInstance()->subFolder; + if (isset($attrs['is_root'])) { $parent = [ 'id' => 'root', @@ -166,9 +166,10 @@ class TreeController extends BaseController $icon = $this->view->icon(Decorator::get_sanitized_value($attrs['openIcon'], $rec)); } $href = Decorator::get_sanitized_value($attrs['action'], $rec); + if ($href) { - $href = \str_replace('//', '/', $href); - $href = $subFolder . str_replace($subFolder, '', $href); + $href = \str_replace('//', '/', $href); + $href = $subFolder . \str_replace($subFolder, '', $href); } $tree = [ @@ -185,21 +186,17 @@ class TreeController extends BaseController ]; $url = Decorator::get_sanitized_value($attrs['branch'], $rec); - $urlparts = parse_url('https://dummy.domain' . $tree['a_attr']['href']); - $path_arr = explode('/', $urlparts['path'] ?? ''); - $tree['url'] = containerInstance()->getDestinationWithLastTab(array_pop($path_arr)); - - - - $url = \str_replace('/src/views/', '/', $url); + $urlparts = \parse_url('https://dummy.domain' . $tree['a_attr']['href']); + $path_arr = \explode('/', $urlparts['path'] ?? ''); + $tree['url'] = containerInstance()->getDestinationWithLastTab(\array_pop($path_arr)); + $url = \str_replace('/src/views/', '/', $url); if ($url) { $tree['url'] = $url; $tree['children'] = true; } - $parent[] = $tree; } } else { diff --git a/src/controllers/TriggersController.php b/src/controllers/TriggersController.php index 00319c6c..42a127d7 100644 --- a/src/controllers/TriggersController.php +++ b/src/controllers/TriggersController.php @@ -1,15 +1,15 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use Slim\Http\Response; use PHPPgAdmin\Decorators\Decorator; use PHPPgAdmin\XHtml\XHtmlOption; use PHPPgAdmin\XHtml\XHtmlSelect; +use Slim\Http\Response; /** * Base controller class. @@ -20,6 +20,8 @@ class TriggersController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|Response|string */ public function render() { @@ -106,7 +108,7 @@ class TriggersController extends BaseController * * @param mixed $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -213,7 +215,9 @@ class TriggersController extends BaseController ]; } - echo $this->printTable($triggers, $columns, $actions, 'triggers-triggers', $this->lang['strnotriggers'], $tgPre); + if (self::isRecordset($triggers)) { + echo $this->printTable($triggers, $columns, $actions, 'triggers-triggers', $this->lang['strnotriggers'], $tgPre); + } $this->printNavLinks(['create' => [ 'attr' => [ @@ -270,7 +274,7 @@ class TriggersController extends BaseController * * @param mixed $msg */ - public function doAlter($msg = ''): void + public function doAlter($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -475,7 +479,7 @@ class TriggersController extends BaseController * * @param mixed $msg */ - public function doCreate($msg = ''): void + public function doCreate($msg = '') { $data = $this->misc->getDatabaseAccessor(); diff --git a/src/controllers/TypesController.php b/src/controllers/TypesController.php index 5ac777a9..ddcde2a3 100644 --- a/src/controllers/TypesController.php +++ b/src/controllers/TypesController.php @@ -1,13 +1,13 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use Slim\Http\Response; use PHPPgAdmin\Decorators\Decorator; +use Slim\Http\Response; /** * Base controller class. @@ -18,6 +18,8 @@ class TypesController extends BaseController /** * Default method to render the controller according to the action parameter. + * + * @return null|Response|string */ public function render() { @@ -88,7 +90,7 @@ class TypesController extends BaseController * * @param mixed $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -155,7 +157,9 @@ class TypesController extends BaseController ], ]; - echo $this->printTable($types, $columns, $actions, 'types-types', $this->lang['strnotypes']); + if (self::isRecordset($types)) { + echo $this->printTable($types, $columns, $actions, 'types-types', $this->lang['strnotypes']); + } $navlinks = [ 'create' => [ @@ -242,7 +246,7 @@ class TypesController extends BaseController * * @param mixed $msg */ - public function doProperties($msg = ''): void + public function doProperties($msg = '') { $data = $this->misc->getDatabaseAccessor(); // Get type (using base name) @@ -280,7 +284,9 @@ class TypesController extends BaseController $actions = []; - echo $this->printTable($attrs, $columns, $actions, 'types-properties', $this->lang['strnodata'], $attPre); + if (self::isRecordset($attrs)) { + echo $this->printTable($attrs, $columns, $actions, 'types-properties', $this->lang['strnodata'], $attPre); + } break; case 'e': @@ -414,7 +420,7 @@ class TypesController extends BaseController * * @param mixed $msg */ - public function doCreateComposite($msg = ''): void + public function doCreateComposite($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -652,7 +658,7 @@ class TypesController extends BaseController * * @param mixed $msg */ - public function doCreateEnum($msg = ''): void + public function doCreateEnum($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -829,7 +835,7 @@ class TypesController extends BaseController * * @param mixed $msg */ - public function doCreate($msg = ''): void + public function doCreate($msg = '') { $data = $this->misc->getDatabaseAccessor(); diff --git a/src/controllers/UsersController.php b/src/controllers/UsersController.php index 6a380d1f..51f9025e 100644 --- a/src/controllers/UsersController.php +++ b/src/controllers/UsersController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; @@ -18,23 +18,24 @@ class UsersController extends BaseController /** * Default method to render the controller according to the action parameter. */ - public function render(): void + public function render() { $this->printHeader(); - -$this->action=isset($_REQUEST['cancel'])?'cancel':$this->action; + + $this->action = isset($_REQUEST['cancel']) ? 'cancel' : $this->action; + switch ($this->action) { case 'cancel': $this->printBody(); $this->doDefault(); - break; + break; case 'changepassword': if (isset($_REQUEST['ok'])) { - $this->printBody(); + $this->printBody(); $this->doChangePassword(false); } else { - $this->printBody(); + $this->printBody(); $this->doAccount(); } @@ -50,9 +51,8 @@ $this->action=isset($_REQUEST['cancel'])?'cancel':$this->action; break; case 'save_create': - $this->printBody(); + $this->printBody(); $this->doSaveCreate(); - break; case 'create': @@ -61,9 +61,8 @@ $this->action=isset($_REQUEST['cancel'])?'cancel':$this->action; break; case 'drop': - $this->printBody(); + $this->printBody(); $this->doDrop(false); - break; case 'confirm_drop': @@ -72,9 +71,8 @@ $this->action=isset($_REQUEST['cancel'])?'cancel':$this->action; break; case 'save_edit': - $this->printBody(); + $this->printBody(); $this->doSaveEdit(); - break; case 'edit': @@ -84,7 +82,7 @@ $this->action=isset($_REQUEST['cancel'])?'cancel':$this->action; break; default: - $this->view->offsetSet('trail',$this->printTrail('server',false)); + $this->view->offsetSet('trail', $this->printTrail('server', false)); $this->printBody(); $this->doDefault(); @@ -99,7 +97,7 @@ $this->action=isset($_REQUEST['cancel'])?'cancel':$this->action; * * @param mixed $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -108,7 +106,6 @@ $this->action=isset($_REQUEST['cancel'])?'cancel':$this->action; return 'infinity' === $val ? $lang['strnever'] : \htmlspecialchars($val); }; - $this->printTabs('server', 'users'); $this->printMsg($msg); @@ -175,7 +172,9 @@ $this->action=isset($_REQUEST['cancel'])?'cancel':$this->action; ], ]; - echo $this->printTable($users, $columns, $actions, 'users-users', $this->lang['strnousers']); + if (self::isRecordset($users)) { + echo $this->printTable($users, $columns, $actions, 'users-users', $this->lang['strnousers']); + } $this->printNavLinks(['create' => [ 'attr' => [ @@ -199,7 +198,7 @@ $this->action=isset($_REQUEST['cancel'])?'cancel':$this->action; * * @param mixed $msg */ - public function doAccount($msg = ''): void + public function doAccount($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -326,7 +325,7 @@ $this->action=isset($_REQUEST['cancel'])?'cancel':$this->action; * * @param mixed $msg */ - public function doEdit($msg = ''): void + public function doEdit($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -501,7 +500,7 @@ $this->action=isset($_REQUEST['cancel'])?'cancel':$this->action; * * @param mixed $msg */ - public function doCreate($msg = ''): void + public function doCreate($msg = '') { $data = $this->misc->getDatabaseAccessor(); diff --git a/src/controllers/ViewpropertiesController.php b/src/controllers/ViewpropertiesController.php index 5b9afeb8..94ebce6c 100644 --- a/src/controllers/ViewpropertiesController.php +++ b/src/controllers/ViewpropertiesController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; @@ -46,8 +46,8 @@ class ViewpropertiesController extends BaseController break; case 'edit': - $this->view->offsetSet('codemirror',true); - + $this->view->offsetSet('codemirror', true); + $this->doEdit(); break; @@ -126,7 +126,7 @@ class ViewpropertiesController extends BaseController * * @param mixed $msg */ - public function doEdit($msg = ''): void + public function doEdit($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -135,9 +135,9 @@ class ViewpropertiesController extends BaseController $this->printMsg($msg); $viewdata = $data->getView($_REQUEST[$this->subject]); - $this->view->offsetSet('codemirror',true); + $this->view->offsetSet('codemirror', true); - $this->printHeader($this->headerTitle(), null, true ); + $this->printHeader($this->headerTitle(), null, true); if (0 < $viewdata->RecordCount()) { if (!isset($_POST['formDefinition'])) { @@ -206,7 +206,7 @@ class ViewpropertiesController extends BaseController * * @param mixed $msg */ - public function doProperties($msg = ''): void + public function doProperties($msg = '') { $data = $this->misc->getDatabaseAccessor(); diff --git a/src/controllers/ViewsController.php b/src/controllers/ViewsController.php index b3587391..88b0c456 100644 --- a/src/controllers/ViewsController.php +++ b/src/controllers/ViewsController.php @@ -1,14 +1,14 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Controller; -use Slim\Http\Response; use PHPPgAdmin\Decorators\Decorator; use PHPPgAdmin\Traits\ViewsMatviewsTrait; +use Slim\Http\Response; /** * Base controller class. @@ -112,7 +112,7 @@ class ViewsController extends BaseController * * @param mixed $msg */ - public function doDefault($msg = ''): void + public function doDefault($msg = '') { $data = $this->misc->getDatabaseAccessor(); @@ -127,7 +127,7 @@ class ViewsController extends BaseController 'title' => $this->lang['strview'], 'field' => Decorator::field('relname'), 'url' => \containerInstance()->getDestinationWithLastTab('view'), - + 'vars' => [$this->keystring => 'relname'], ], 'owner' => [ @@ -209,7 +209,9 @@ class ViewsController extends BaseController ], ]; - echo $this->printTable($views, $columns, $actions, $this->table_place, $this->lang['strnoviews']); + if (self::isRecordset($views)) { + echo $this->printTable($views, $columns, $actions, $this->table_place, $this->lang['strnoviews']); + } $navlinks = [ 'create' => [ @@ -321,6 +323,7 @@ class ViewsController extends BaseController } elseif (\is_array($_POST['view'])) { $msg = ''; $status = $data->beginTransaction(); + if (0 === $status) { foreach ($_POST['view'] as $s) { $status = $data->dropView($s, isset($_POST['cascade'])); @@ -344,6 +347,7 @@ class ViewsController extends BaseController } } } + if (0 === $data->endTransaction()) { // Everything went fine, back to the Default page.... $this->view->setReloadBrowser(true); @@ -391,7 +395,7 @@ class ViewsController extends BaseController * * @param mixed $msg */ - public function doWizardCreate($msg = ''): void + public function doWizardCreate($msg = '') { $this->printTrail('schema'); $this->printTitle($this->lang['strcreateviewwiz'], 'pg.view.create'); @@ -405,14 +409,14 @@ class ViewsController extends BaseController * * @param mixed $msg */ - public function doCreate($msg = ''): void + public function doCreate($msg = '') { $data = $this->misc->getDatabaseAccessor(); $this->coalesceArr($_REQUEST, 'formView', ''); if (!isset($_REQUEST['formDefinition'])) { - $_REQUEST['formDefinition'] = isset($_SESSION['sqlquery']) ? $_SESSION['sqlquery'] : 'SELECT '; + $_REQUEST['formDefinition'] = $_SESSION['sqlquery'] ?? 'SELECT '; } $this->coalesceArr($_REQUEST, 'formComment', ''); diff --git a/src/database/ADOdbBase.php b/src/database/ADOdbBase.php index 3922f70c..06ccaa6a 100644 --- a/src/database/ADOdbBase.php +++ b/src/database/ADOdbBase.php @@ -1,14 +1,13 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database; use ADODB_postgres9; use Exception; -use PHPPgAdmin\ADORecordSet; use PHPPgAdmin\ContainerUtils; use PHPPgAdmin\Database\Traits\DatabaseTrait; use PHPPgAdmin\Database\Traits\HasTrait; @@ -83,7 +82,7 @@ class ADOdbBase * @param string $table The table to get attributes for * @param array $atts An array of attribute numbers * - * @return array|int An array mapping attnum to attname or error code - -1 $atts must be an array - -2 wrong number of attributes found + * @return array|int * * @psalm-return -2|-1|array */ @@ -187,7 +186,7 @@ class ADOdbBase '"%s".', $f_schema ); - // no break + // no break case 'DATABASE': case 'ROLE': case 'SCHEMA': @@ -296,7 +295,7 @@ class ADOdbBase * * @param string $sql The SQL query to execute * - * @return \the|int|string A recordset or an error code + * @return int|string A recordset or an error code */ public function execute($sql) { @@ -324,7 +323,7 @@ class ADOdbBase * * @param string $sql The SQL statement to be executed * - * @return int|\RecordSet|string A recordset or an error number + * @return \ADORecordSet|bool|int|string A recordset or an error number */ public function selectSet($sql) { @@ -336,17 +335,11 @@ class ADOdbBase } } - /** - * @return \the - */ public function ErrorNo(): int { return $this->conn->ErrorNo(); } - /** - * @return \the - */ public function ErrorMsg(): string { return $this->conn->ErrorMsg(); @@ -386,9 +379,9 @@ class ADOdbBase * @param array $conditions (array) A map of field names to conditions * @param string $schema (optional) The table's schema * - * @return \the|int 0 success + * @return int * - * @psalm-return -2|-1|\the + * @psalm-return -2|-1|0 */ public function delete($table, $conditions, $schema = '') { @@ -411,7 +404,7 @@ class ADOdbBase $this->clean($key); $this->clean($value); - if ($sql !== '') { + if ('' !== $sql) { $sql .= \sprintf( ' AND "%s"=\'%s\'', $key, @@ -493,9 +486,9 @@ class ADOdbBase * @param string $table The table to insert into * @param array $vars (array) A mapping of the field names to the values to be inserted * - * @return \the|int 0 success + * @return int * - * @psalm-return -2|-1|\the + * @psalm-return -2|-1|0 */ public function insert($table, $vars) { @@ -510,7 +503,7 @@ class ADOdbBase $this->clean($key); $this->clean($value); - if ($fields !== '') { + if ('' !== $fields) { $fields .= \sprintf( ', "%s"', $key @@ -523,7 +516,7 @@ class ADOdbBase ); } - if ($values !== '') { + if ('' !== $values) { $values .= \sprintf( ', \'%s\'', $value @@ -561,9 +554,9 @@ class ADOdbBase * @param array $where (array) A mapping of field names to values for the where clause * @param array $nulls (array, optional) An array of fields to be set null * - * @return \the|int 0 success + * @return int * - * @psalm-return -3|-2|-1|\the + * @psalm-return -3|-2|-1|0 */ public function update($table, $vars, $where, $nulls = []) { @@ -579,7 +572,7 @@ class ADOdbBase $this->fieldClean($key); $this->clean($value); - if ($setClause !== '') { + if ('' !== $setClause) { $setClause .= \sprintf( ', "%s"=\'%s\'', $key, @@ -600,7 +593,7 @@ class ADOdbBase foreach ($nulls as $key => $value) { $this->fieldClean($value); - if ($setClause !== '') { + if ('' !== $setClause) { $setClause .= \sprintf( ', "%s"=NULL', $value @@ -620,7 +613,7 @@ class ADOdbBase $this->fieldClean($key); $this->clean($value); - if ($whereClause !== '') { + if ('' !== $whereClause) { $whereClause .= \sprintf( ' AND "%s"=\'%s\'', $key, diff --git a/src/database/Postgres.php b/src/database/Postgres.php index 584255e9..c1ab62c3 100644 --- a/src/database/Postgres.php +++ b/src/database/Postgres.php @@ -1,12 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database; -use PHPPgAdmin\ADORecordSet; use PHPPgAdmin\Database\Traits\AggregateTrait; use PHPPgAdmin\Database\Traits\DatabaseTrait; use PHPPgAdmin\Database\Traits\DomainTrait; @@ -252,7 +251,7 @@ class Postgres extends ADOdbBase * @param string $term The search term * @param string $filter The object type to restrict to ('' means no restriction) * - * @return \RecordSet|int|string A recordset + * @return \ADORecordSet|bool|int|string A recordset */ public function findObject($term, $filter) { @@ -451,7 +450,7 @@ class Postgres extends ADOdbBase * * @param bool $all True to get all languages, regardless of show_system * - * @return \RecordSet|int|string A recordset + * @return \ADORecordSet|bool|int|string A recordset */ public function getLanguages($all = false) { @@ -560,12 +559,12 @@ class Postgres extends ADOdbBase * end of quote if matching non-backslashed character. * backslashes don't count for double quotes, though. */ - if (\mb_substr($line, $i, 1) === $in_quote && - (0 === $bslash_count % 2 || '"' === $in_quote) + if (\mb_substr($line, $i, 1) === $in_quote + && (0 === $bslash_count % 2 || '"' === $in_quote) ) { $in_quote = 0; } - } elseif ($dol_quote !== '') { + } elseif ('' !== $dol_quote) { $this->prtrace('dol_quote', $dol_quote, $line); if (0 === \strncmp(\mb_substr($line, $i), $dol_quote, \mb_strlen($dol_quote))) { @@ -766,7 +765,7 @@ class Postgres extends ADOdbBase * @param null|int $page_size The number of rows per page * @param int $max_pages (return-by-ref) The max number of pages in the relation * - * @return \RecordSet|int|string A recordset on success or an int with error code - -1 transaction error - -2 counting error - -3 page or page_size invalid - -4 unknown type - -5 failed setting transaction read only + * @return \ADORecordSet|bool|int|string A recordset on success or an int with error code - -1 transaction error - -2 counting error - -3 page or page_size invalid - -4 unknown type - -5 failed setting transaction read only */ public function browseQuery($type, $table, $query, $sortkey, $sortdir, $page, $page_size, &$max_pages) { diff --git a/src/database/Postgres10.php b/src/database/Postgres10.php index b283f1a9..93965ec5 100644 --- a/src/database/Postgres10.php +++ b/src/database/Postgres10.php @@ -1,12 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database; -use PHPPgAdmin\ADORecordSet; use PHPPgAdmin\Help\PostgresDoc10; /** @@ -35,7 +34,7 @@ class Postgres10 extends Postgres96 /** * Return all tables in current database (and schema). * - * @return \RecordSet|int|string All tables, sorted alphabetically + * @return \ADORecordSet|bool|int|string All tables, sorted alphabetically */ public function getTables() { diff --git a/src/database/Postgres11.php b/src/database/Postgres11.php index ff790b80..0bc8cab0 100644 --- a/src/database/Postgres11.php +++ b/src/database/Postgres11.php @@ -1,12 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database; -use PHPPgAdmin\ADORecordSet; use PHPPgAdmin\Help\PostgresDoc11; /** @@ -37,7 +36,7 @@ class Postgres11 extends Postgres10 * @param bool $all If true, will find all available functions, if false just those in search path * @param mixed $type If truthy, will return functions of type trigger * - * @return \RecordSet|int|string All functions + * @return \ADORecordSet|bool|int|string All functions */ public function getFunctions($all = false, $type = null) { diff --git a/src/database/Postgres12.php b/src/database/Postgres12.php index 21f311da..e88092bd 100644 --- a/src/database/Postgres12.php +++ b/src/database/Postgres12.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database; @@ -31,7 +31,6 @@ class Postgres12 extends Postgres11 * Checks to see whether or not a table has a unique id column. * * @deprecated this field has been removed of pg_class as of PG 12 - * * @see https://www.postgresql.org/docs/12/catalog-pg-class.html * * @param string $table The table name diff --git a/src/database/Postgres13.php b/src/database/Postgres13.php index 4179ccae..1fad964d 100644 --- a/src/database/Postgres13.php +++ b/src/database/Postgres13.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database; diff --git a/src/database/Postgres90.php b/src/database/Postgres90.php index e368bbb9..af681451 100644 --- a/src/database/Postgres90.php +++ b/src/database/Postgres90.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database; diff --git a/src/database/Postgres91.php b/src/database/Postgres91.php index e61e86e8..679fa4ca 100644 --- a/src/database/Postgres91.php +++ b/src/database/Postgres91.php @@ -1,12 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database; -use PHPPgAdmin\ADORecordSet; use PHPPgAdmin\Help\PostgresDoc91; /** @@ -35,7 +34,7 @@ class Postgres91 extends Postgres92 * * @param null|string $database (optional) Find only connections to specified database * - * @return \RecordSet|int|string A recordset + * @return \ADORecordSet|bool|int|string A recordset */ public function getProcesses($database = null) { @@ -64,7 +63,7 @@ class Postgres91 extends Postgres92 * * @param bool $all Include all tablespaces (necessary when moving objects back to the default space) * - * @return \RecordSet|int|string A recordset + * @return \ADORecordSet|bool|int|string A recordset */ public function getTablespaces($all = false) { @@ -88,7 +87,7 @@ class Postgres91 extends Postgres92 * * @param string $spcname * - * @return \RecordSet|int|string A recordset + * @return \ADORecordSet|bool|int|string A recordset */ public function getTablespace($spcname) { @@ -105,6 +104,7 @@ class Postgres91 extends Postgres92 } // Capabilities + /** * @return false */ diff --git a/src/database/Postgres92.php b/src/database/Postgres92.php index 61b658e3..41410da1 100644 --- a/src/database/Postgres92.php +++ b/src/database/Postgres92.php @@ -1,12 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database; -use PHPPgAdmin\ADORecordSet; use PHPPgAdmin\Help\PostgresDoc92; /** @@ -32,7 +31,7 @@ class Postgres92 extends Postgres93 * * @param null|string $database (optional) Find only connections to specified database * - * @return \RecordSet|int|string A recordset + * @return \ADORecordSet|bool|int|string A recordset */ public function getProcesses($database = null) { @@ -61,7 +60,7 @@ class Postgres92 extends Postgres93 * * @param bool $all Include all tablespaces (necessary when moving objects back to the default space) * - * @return \RecordSet|int|string A recordset + * @return \ADORecordSet|bool|int|string A recordset */ public function getTablespaces($all = false) { @@ -87,7 +86,7 @@ class Postgres92 extends Postgres93 * * @param string $spcname * - * @return \RecordSet|int|string A recordset + * @return \ADORecordSet|bool|int|string A recordset */ public function getTablespace($spcname) { diff --git a/src/database/Postgres93.php b/src/database/Postgres93.php index 425d6100..a8cdecb6 100644 --- a/src/database/Postgres93.php +++ b/src/database/Postgres93.php @@ -1,12 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database; -use PHPPgAdmin\ADORecordSet; use PHPPgAdmin\Help\PostgresDoc93; /** @@ -31,7 +30,7 @@ class Postgres93 extends Postgres94 * @param bool $all If true, will find all available functions, if false just those in search path * @param mixed $type If not null, will find all trigger functions * - * @return \RecordSet|int|string All functions + * @return \ADORecordSet|bool|int|string All functions */ public function getFunctions($all = false, $type = null) { diff --git a/src/database/Postgres94.php b/src/database/Postgres94.php index b1680fa6..c62a33ea 100644 --- a/src/database/Postgres94.php +++ b/src/database/Postgres94.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database; diff --git a/src/database/Postgres95.php b/src/database/Postgres95.php index 05cfca55..69988bf9 100644 --- a/src/database/Postgres95.php +++ b/src/database/Postgres95.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database; diff --git a/src/database/Postgres96.php b/src/database/Postgres96.php index 557f12f8..566d687e 100644 --- a/src/database/Postgres96.php +++ b/src/database/Postgres96.php @@ -1,12 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database; -use PHPPgAdmin\ADORecordSet; use PHPPgAdmin\Help\PostgresDoc96; /** @@ -34,7 +33,7 @@ class Postgres96 extends Postgres * * @param null|string $database (optional) Find only connections to specified database * - * @return \RecordSet|int|string A recordset + * @return \ADORecordSet|bool|int|string A recordset */ public function getProcesses($database = null) { diff --git a/src/database/databasetraits/AggregateTrait.php b/src/database/databasetraits/AggregateTrait.php index 7f0a5195..c13f27af 100644 --- a/src/database/databasetraits/AggregateTrait.php +++ b/src/database/databasetraits/AggregateTrait.php @@ -1,13 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database\Traits; -use PHPPgAdmin\ADORecordSet; - /** * Common trait for aggregates manipulation. */ @@ -25,7 +23,9 @@ trait AggregateTrait * @param string $sortop The sort operator for the aggregate * @param string $comment Aggregate comment * - * @return int 0 success + * @return int + * + * @psalm-return -1|0|1 */ public function createAggregate($name, $basetype, $sfunc, $stype, $ffunc, $initcond, $sortop, $comment) { @@ -130,7 +130,7 @@ trait AggregateTrait * @param string $name The name of the aggregate * @param string $basetype The input data type of the aggregate * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getAggregate($name, $basetype) { @@ -163,7 +163,7 @@ trait AggregateTrait /** * Gets all aggregates. * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getAggregates() { @@ -195,7 +195,9 @@ trait AggregateTrait * @param string $newaggrschema The new schema where the aggregate will belong to * @param string $newaggrcomment The new comment for the aggregate * - * @return int 0 success + * @return int + * + * @psalm-return -4|-3|-2|-1|0|1 */ public function alterAggregate( $aggrname, diff --git a/src/database/databasetraits/ColumnTrait.php b/src/database/databasetraits/ColumnTrait.php index e96cfd8e..3cc8eccb 100644 --- a/src/database/databasetraits/ColumnTrait.php +++ b/src/database/databasetraits/ColumnTrait.php @@ -1,13 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database\Traits; -use PHPPgAdmin\ADORecordSet; - /** * Common trait for column manipulation. */ diff --git a/src/database/databasetraits/DatabaseTrait.php b/src/database/databasetraits/DatabaseTrait.php index c2d2e85d..6cd2fcfc 100644 --- a/src/database/databasetraits/DatabaseTrait.php +++ b/src/database/databasetraits/DatabaseTrait.php @@ -1,13 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database\Traits; -use PHPPgAdmin\ADORecordSet; - /** * Common trait for tables manipulation. */ @@ -89,7 +87,7 @@ trait DatabaseTrait * * @param string $database The name of the database to retrieve * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getDatabase($database) { @@ -107,7 +105,7 @@ trait DatabaseTrait * * @param null|string $currentdatabase database name that should be on top of the resultset * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getDatabases($currentdatabase = null) { @@ -189,7 +187,7 @@ trait DatabaseTrait * * @param string $database the name of the database to get the comment for * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getDatabaseComment($database) { @@ -211,7 +209,7 @@ trait DatabaseTrait * * @param string $database the name of the database to get the owner for * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getDatabaseOwner($database) { @@ -249,7 +247,7 @@ trait DatabaseTrait * @param string $lc_collate * @param string $lc_ctype * - * @return int 0 success + * @return int * * @psalm-return -2|-1|0 */ @@ -347,7 +345,9 @@ trait DatabaseTrait * @param string $newOwner The new owner for the database * @param string $comment * - * @return int 0 success + * @return int + * + * @psalm-return -4|-3|-2|-1|0|1 */ public function alterDatabase($dbName, $newName, $newOwner = '', $comment = '') { @@ -447,7 +447,7 @@ trait DatabaseTrait * * @param null|string $database (optional) Find only prepared transactions executed in a specific database * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getPreparedXacts($database = null) { @@ -470,7 +470,7 @@ trait DatabaseTrait * * @param null|string $database (optional) Find only connections to specified database * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getProcesses($database = null) { @@ -499,7 +499,7 @@ trait DatabaseTrait /** * Returns table locks information in the current database. * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getLocks() { @@ -533,7 +533,7 @@ trait DatabaseTrait * @param int $pid The ID of the backend process * @param string $signal 'CANCEL' or 'KILL' * - * @return int 0 success + * @return int * * @psalm-return -1|0 */ @@ -578,7 +578,7 @@ trait DatabaseTrait * @param bool $full If true, selects "full" vacuum * @param bool $freeze If true, selects aggressive "freezing" of tuples * - * @return (int|string)[] result status and sql sentence + * @return (int|string)[] * * @psalm-return array{0: int|string, 1: string} */ @@ -650,7 +650,7 @@ trait DatabaseTrait /** * Returns all available variable information. * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getVariables() { diff --git a/src/database/databasetraits/DomainTrait.php b/src/database/databasetraits/DomainTrait.php index 9dc55407..b73a5c9b 100644 --- a/src/database/databasetraits/DomainTrait.php +++ b/src/database/databasetraits/DomainTrait.php @@ -1,13 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database\Traits; -use PHPPgAdmin\ADORecordSet; - /** * Common trait for domains manipulation. */ @@ -18,7 +16,7 @@ trait DomainTrait * * @param string $domain The name of the domain to fetch * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getDomain($domain) { @@ -52,7 +50,7 @@ trait DomainTrait /** * Return all domains in current schema. Excludes domain constraints. * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getDomains() { @@ -86,7 +84,7 @@ trait DomainTrait * * @param string $domain The name of the domain whose constraints to fetch * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getDomainConstraints($domain) { @@ -213,7 +211,9 @@ trait DomainTrait * @param bool $domnotnull True for NOT NULL, false otherwise * @param string $domowner The domain owner * - * @return int 0 success + * @return int + * + * @psalm-return -4|-3|-2|-1|0|1 */ public function alterDomain($domain, $domdefault, $domnotnull, $domowner) { diff --git a/src/database/databasetraits/FtsTrait.php b/src/database/databasetraits/FtsTrait.php index a63c3b08..9e191ed1 100644 --- a/src/database/databasetraits/FtsTrait.php +++ b/src/database/databasetraits/FtsTrait.php @@ -1,13 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database\Traits; -use ADORecordSet; - /** * Common trait for full text search manipulation. */ @@ -21,11 +19,13 @@ trait FtsTrait * @param array|string $template The existing FTS configuration to be used as template for the new one * @param string $comment If omitted, defaults to nothing * - * @return int 0 success + * @return int * * @internal param string $locale Locale of the FTS configuration * @internal param string $withmap Should we copy whole map of existing FTS configuration to the new one * @internal param string $makeDefault Should this configuration be the default for locale given + * + * @psalm-return -1|0|1 */ public function createFtsConfiguration($cfgname, $parser = '', $template = '', $comment = '') { @@ -104,7 +104,7 @@ trait FtsTrait * * @param bool $all if false, returns schema qualified FTS confs * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getFtsConfigurations($all = true) { @@ -142,7 +142,7 @@ trait FtsTrait * * @param string $ftscfg Name of the FTS configuration * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getFtsConfigurationMap($ftscfg) { @@ -189,7 +189,7 @@ trait FtsTrait * * @param bool $all if false, return only Parsers from the current schema * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getFtsParsers($all = true) { @@ -222,7 +222,7 @@ trait FtsTrait * * @param bool $all if false, return only Dics from the current schema * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getFtsDictionaries($all = true) { @@ -252,7 +252,7 @@ trait FtsTrait /** * Returns all FTS dictionary templates available. * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getFtsDictionaryTemplates() { @@ -341,7 +341,9 @@ trait FtsTrait * @param string $comment A comment on for the conf * @param string $name The new conf name * - * @return int 0 on success + * @return int + * + * @psalm-return -1|0|1 */ public function updateFtsConfiguration($cfgname, $comment, $name) { @@ -398,7 +400,9 @@ trait FtsTrait * @param string $option Usually, it stores various options required for the dictionary * @param string $comment If omitted, defaults to nothing * - * @return int 0 success + * @return int + * + * @psalm-return -1|0|1 */ public function createFtsDictionary( $dictname, @@ -517,7 +521,9 @@ trait FtsTrait * @param string $comment The comment * @param string $name The new dico's name * - * @return int 0 on success + * @return int + * + * @psalm-return -1|0|1 */ public function updateFtsDictionary($dictname, $comment, $name) { @@ -567,7 +573,7 @@ trait FtsTrait * * @param string $ftsdict The name of the FTS dictionary * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getFtsDictionaryByName($ftsdict) { @@ -662,7 +668,7 @@ trait FtsTrait * @param string $ftscfg The name of the FTS configuration * @param string $mapping The name of the mapping * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getFtsMappingByName($ftscfg, $mapping) { @@ -714,7 +720,7 @@ trait FtsTrait * * @param string $ftscfg The config's name that use the parser * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getFtsMappings($ftscfg) { @@ -735,7 +741,7 @@ trait FtsTrait * * @param string $ftscfg The name of the FTS configuration * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getFtsConfigurationByName($ftscfg) { diff --git a/src/database/databasetraits/FunctionTrait.php b/src/database/databasetraits/FunctionTrait.php index fa12b338..7a12d04a 100644 --- a/src/database/databasetraits/FunctionTrait.php +++ b/src/database/databasetraits/FunctionTrait.php @@ -1,13 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database\Traits; -use PHPPgAdmin\ADORecordSet; - /** * Common trait for full text search manipulation. */ @@ -19,7 +17,7 @@ trait FunctionTrait * @param bool $all If true, will find all available functions, if false just those in search path * @param mixed $type If truthy, will return functions of type trigger * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getFunctions($all = false, $type = null) { @@ -73,7 +71,7 @@ trait FunctionTrait /** * Returns a list of all functions that can be used in triggers. * - * @return int|ADORecordSet Functions that can be used in a trigger + * @return \ADORecordSet|bool|int|string Functions that can be used in a trigger */ public function getTriggerFunctions() { @@ -85,7 +83,7 @@ trait FunctionTrait * * @param array $f The array of data for the function * - * @return int|string[] An array containing the properties, or -1 in case of error + * @return int|string[] * * @psalm-return int|non-empty-list<string> */ @@ -136,7 +134,7 @@ trait FunctionTrait * @param int $rows * @param string $comment The comment on the function * - * @return bool|int 0 success + * @return int 0 success */ public function setFunction( $funcname, @@ -261,7 +259,9 @@ trait FunctionTrait * @param bool $replace (optional) True if OR REPLACE, false for * normal * - * @return int 0 success + * @return int + * + * @psalm-return -4|-3|-1|0|1 */ public function createFunction($funcname, $args, $returns, $definition, $language, $flags, $setof, $cost, $rows, $comment, $replace = false) { @@ -412,7 +412,7 @@ trait FunctionTrait * * @param int $function_oid * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string * * @internal param string The $func name of the function to retrieve */ @@ -454,7 +454,7 @@ trait FunctionTrait * * @param int $function_oid * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getFunctionDef($function_oid) { diff --git a/src/database/databasetraits/HasTrait.php b/src/database/databasetraits/HasTrait.php index 416a9295..c3c1642d 100644 --- a/src/database/databasetraits/HasTrait.php +++ b/src/database/databasetraits/HasTrait.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database\Traits; @@ -656,7 +656,7 @@ trait HasTrait /** * Determines if it has alter database. * - * @return bool true if has alter database, False otherwise + * @return true true if has alter database, False otherwise */ public function hasAlterDatabase() { diff --git a/src/database/databasetraits/IndexTrait.php b/src/database/databasetraits/IndexTrait.php index ca4801e9..9bb944b7 100644 --- a/src/database/databasetraits/IndexTrait.php +++ b/src/database/databasetraits/IndexTrait.php @@ -1,13 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database\Traits; -use PHPPgAdmin\ADORecordSet; - /** * Common trait for indexes and constraints manipulation. */ @@ -55,7 +53,7 @@ trait IndexTrait * @param string $tablespace The tablespaces ('' means none/default) * @param bool $concurrently true to create index concurrently * - * @return (int|string)[] status (0 if operation was successful) and sql sentence + * @return (int|string)[] * * @psalm-return array{0: int|string, 1: string} */ @@ -203,7 +201,7 @@ trait IndexTrait * @param string $table The table the index is on * @param string $index The name of the index * - * @return (int|string)[] 0 if operation was successful + * @return (int|string)[] * * @psalm-return array{0: int|string, 1: string} */ @@ -245,7 +243,7 @@ trait IndexTrait * * @param string $table the table where we are looking for fk * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getConstraintsWithFields($table) { @@ -454,7 +452,9 @@ trait IndexTrait * @param string $table The table from which to drop the check * @param string $name The name of the check to be dropped * - * @return int 0 success + * @return int + * + * @psalm-return -4|-3|-2|0|1 */ public function dropCheckConstraint($table, $name) { @@ -545,8 +545,8 @@ trait IndexTrait * * @return int|string * - * @internal param \PHPPgAdmin\Database\The $target table that contains the target columns - * @internal param \PHPPgAdmin\Database\The $intially initial deferrability (eg. INITIALLY IMMEDIATE) + * @internal param string $targtable table that contains the target columns + * @internal param string $intially initial deferrability (eg. INITIALLY IMMEDIATE) */ public function addForeignKey( $table, @@ -561,8 +561,9 @@ trait IndexTrait $initially, $name = '' ) { - if (!\is_array($sfields) || 0 === \count($sfields) || - !\is_array($tfields) || 0 === \count($tfields)) { + if (!\is_array($sfields) || 0 === \count($sfields) + || !\is_array($tfields) || 0 === \count($tfields) + ) { return -1; } @@ -670,7 +671,7 @@ trait IndexTrait * * @param array $tables multi dimensional assoc array that holds schema and table name * - * @return \RecordSet|int|string recordset of linked tables and columns or -1 if $tables isn't an array + * @return \ADORecordSet|bool|int|string recordset of linked tables and columns or -1 if $tables isn't an array */ public function getLinkingKeys($tables) { @@ -798,7 +799,7 @@ trait IndexTrait * * @param string $table The table to find referrers for * - * @return \RecordSet|int|string A recordset or -1 in case of error + * @return \ADORecordSet|bool|int|string A recordset or -1 in case of error */ public function getReferrers($table) { diff --git a/src/database/databasetraits/OperatorTrait.php b/src/database/databasetraits/OperatorTrait.php index 479844be..2be91f54 100644 --- a/src/database/databasetraits/OperatorTrait.php +++ b/src/database/databasetraits/OperatorTrait.php @@ -1,13 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database\Traits; -use PHPPgAdmin\ADORecordSet; - /** * Common trait for operators manipulation. */ @@ -16,7 +14,7 @@ trait OperatorTrait /** * Returns a list of all operators in the database. * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getOperators() { @@ -90,7 +88,7 @@ trait OperatorTrait * * @param mixed $operator_oid The oid of the operator * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getOperator($operator_oid) { @@ -124,7 +122,7 @@ trait OperatorTrait /** * Gets all opclasses. * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getOpClasses() { diff --git a/src/database/databasetraits/PrivilegesTrait.php b/src/database/databasetraits/PrivilegesTrait.php index 5c395472..af882c02 100644 --- a/src/database/databasetraits/PrivilegesTrait.php +++ b/src/database/databasetraits/PrivilegesTrait.php @@ -1,13 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database\Traits; -use PHPPgAdmin\ADORecordSet; - /** * Common trait for privileges manipulation. */ @@ -21,10 +19,9 @@ trait PrivilegesTrait * @param string $type The type of the object (eg. database, schema, relation, function or language) * @param null|string $table Optional, column's table if type = column * - * @return array|int Privileges array or error code - * - -1 invalid type - * - -2 object not found - * - -3 unknown privilege type + * @return (array|false|null|string)[][]|int Privileges array or error code - -1 invalid type - -2 object not found - -3 unknown privilege type + * + * @psalm-return int|list<array{0: string, 1: false|null|string, 2: list<mixed>, 3: false|string, 4: list<mixed>}> */ public function getPrivileges($object, $type, $table = null) { @@ -158,8 +155,8 @@ trait PrivilegesTrait return -3; } - if (!\is_array($usernames) || !\is_array($groupnames) || - (!$public && 0 === \count($usernames) && 0 === \count($groupnames))) { + if (!\is_array($usernames) || !\is_array($groupnames) + || (!$public && 0 === \count($usernames) && 0 === \count($groupnames))) { return -4; } @@ -337,7 +334,7 @@ trait PrivilegesTrait * * @param string $acl The ACL to parse (of type aclitem[]) * - * @return (array|false|null|string)[][]|int Privileges array or integer with error code + * @return (array|false|null|string)[][]|int * * @internal bool $in_quotes toggles acl in_quotes attribute * diff --git a/src/database/databasetraits/RoleTrait.php b/src/database/databasetraits/RoleTrait.php index 0de70375..fc15a197 100644 --- a/src/database/databasetraits/RoleTrait.php +++ b/src/database/databasetraits/RoleTrait.php @@ -1,13 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database\Traits; -use PHPPgAdmin\ADORecordSet; - /** * Common trait for roles and users manipulation. */ @@ -18,7 +16,7 @@ trait RoleTrait * * @param string $rolename (optional) The role name to exclude from the select * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getRoles($rolename = '') { @@ -56,7 +54,7 @@ trait RoleTrait * * @param string $rolename The name of the role to retrieve * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getRole($rolename) { @@ -88,7 +86,7 @@ trait RoleTrait /** * Returns all users in the database cluster. * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getUsers() { @@ -110,7 +108,7 @@ trait RoleTrait * * @param string $username The username of the user to retrieve * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getUser($username) { @@ -258,7 +256,9 @@ trait RoleTrait * @param string $original_admins Original roles that are admin members of the role, comma separated * @param string $newrolename The new name of the role * - * @return int 0 success + * @return int + * + * @psalm-return -3|-2|-1|0|1 */ public function setRenameRole( $rolename, @@ -363,7 +363,7 @@ trait RoleTrait * @param string $original_members Original roles that are members of the role, comma separated * @param string $original_admins Original roles that are admin members of the role, comma separated * - * @return int 0 if operation was successful + * @return int * * @psalm-return -1|0 */ @@ -566,7 +566,9 @@ trait RoleTrait * @param string $expiry string Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire. * @param string $newname The new name of the user * - * @return int 0 success + * @return int + * + * @psalm-return -3|-2|-1|0|1 */ public function setRenameUser($username, $password, $createdb, $createuser, $expiry, $newname) { @@ -736,7 +738,7 @@ trait RoleTrait * * @param string $rolename The role name * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getMemberOf($rolename) { @@ -764,7 +766,7 @@ trait RoleTrait * @param string $rolename The role name * @param string $admin (optional) Find only admin members * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getMembers($rolename, $admin = 'f') { @@ -811,7 +813,7 @@ trait RoleTrait * * @param string $groname The name of the group * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getGroup($groname) { @@ -831,7 +833,7 @@ trait RoleTrait /** * Returns all groups in the database cluser. * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getGroups() { diff --git a/src/database/databasetraits/RowTrait.php b/src/database/databasetraits/RowTrait.php index 935b1be8..8ec7db35 100644 --- a/src/database/databasetraits/RowTrait.php +++ b/src/database/databasetraits/RowTrait.php @@ -1,13 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database\Traits; -use PHPPgAdmin\ADORecordSet; - /** * Common trait for tables manipulation. */ @@ -19,7 +17,7 @@ trait RowTrait * @param string $table The name of a table * @param array $key The associative array holding the key to retrieve * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function browseRow($table, $key) { @@ -252,7 +250,9 @@ trait RowTrait * @param array $types An array of field types * @param array $keyarr An array mapping column => value to update * - * @return int 0 success + * @return int + * + * @psalm-return -2|-1|0|1 */ public function editRow($table, $vars, $nulls, $format, $types, $keyarr) { @@ -346,7 +346,9 @@ trait RowTrait * @param array $key An array mapping column => value to delete * @param string $schema the schema of the table * - * @return int 0 success + * @return int + * + * @psalm-return -2|-1|0|1 */ public function deleteRow($table, $key, $schema = '') { diff --git a/src/database/databasetraits/SchemaTrait.php b/src/database/databasetraits/SchemaTrait.php index fc2cc407..a99e744c 100644 --- a/src/database/databasetraits/SchemaTrait.php +++ b/src/database/databasetraits/SchemaTrait.php @@ -1,13 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database\Traits; -use PHPPgAdmin\ADORecordSet; - /** * Common trait for tables manipulation. */ @@ -18,7 +16,7 @@ trait SchemaTrait /** * Return all schemas in the current database. * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getSchemas() { @@ -63,7 +61,7 @@ trait SchemaTrait * * @param string $schema The the name of the schema to work in * - * @return int|ADORecordSet 0 if operation was successful + * @return int|string 0 if operation was successful */ public function setSchema($schema) { @@ -85,7 +83,9 @@ trait SchemaTrait /** * Return the current schema search path. * - * @return array array of schema names + * @return (false|string)[] array of schema names + * + * @psalm-return non-empty-list<false|string> */ public function getSearchPath() { @@ -143,7 +143,9 @@ trait SchemaTrait * @param string $authorization (optional) The username to create the schema for * @param string $comment (optional) If omitted, defaults to nothing * - * @return int 0 success + * @return int + * + * @psalm-return -1|0|1 */ public function createSchema($schemaname, $authorization = '', $comment = '') { @@ -203,7 +205,9 @@ trait SchemaTrait * @param string $name new name for this schema * @param string $owner The new owner for this schema * - * @return int 0 success + * @return int + * + * @psalm-return -1|0|1 */ public function updateSchema($schemaname, $comment, $name, $owner) { @@ -268,7 +272,7 @@ trait SchemaTrait * * @param string $schema The name of the schema * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getSchemaByName($schema) { diff --git a/src/database/databasetraits/SequenceTrait.php b/src/database/databasetraits/SequenceTrait.php index 9fd8e146..4db9801c 100644 --- a/src/database/databasetraits/SequenceTrait.php +++ b/src/database/databasetraits/SequenceTrait.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database\Traits; @@ -18,7 +18,7 @@ trait SequenceTrait * * @param bool $all true to get all sequences of all schemas * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getSequences($all = false) { @@ -160,7 +160,7 @@ trait SequenceTrait * * @param string $sequence Sequence name * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getSequence($sequence) { @@ -584,7 +584,7 @@ trait SequenceTrait * @param null|bool $cycledvalue True if cycled, false otherwise * @param int $startvalue The sequence start value when issueing a restart * - * @return int 0 success + * @return int * * @psalm-return -7|-6|-5|-4|-3|0 */ diff --git a/src/database/databasetraits/StatsTrait.php b/src/database/databasetraits/StatsTrait.php index f7b85386..f949d2eb 100644 --- a/src/database/databasetraits/StatsTrait.php +++ b/src/database/databasetraits/StatsTrait.php @@ -1,13 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database\Traits; -use PHPPgAdmin\ADORecordSet; - /** * Common trait to retrieve stats on database objects. */ @@ -18,7 +16,7 @@ trait StatsTrait * * @param string $database The database to fetch stats for * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getStatsDatabase($database) { @@ -37,7 +35,7 @@ trait StatsTrait * * @param string $table The table to fetch stats for * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getStatsTableTuples($table) { @@ -60,7 +58,7 @@ trait StatsTrait * * @param string $table The table to fetch stats for * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getStatsTableIO($table) { @@ -83,7 +81,7 @@ trait StatsTrait * * @param string $table The table to fetch index stats for * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getStatsIndexTuples($table) { @@ -106,7 +104,7 @@ trait StatsTrait * * @param string $table The table to fetch index stats for * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getStatsIndexIO($table) { diff --git a/src/database/databasetraits/TableTrait.php b/src/database/databasetraits/TableTrait.php index 999b96f2..fb4c7d42 100644 --- a/src/database/databasetraits/TableTrait.php +++ b/src/database/databasetraits/TableTrait.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database\Traits; @@ -21,7 +21,7 @@ trait TableTrait /** * Return all tables in current database excluding schemas 'pg_catalog', 'information_schema' and 'pg_toast'. * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getAllTables() { @@ -39,7 +39,7 @@ trait TableTrait /** * Return all tables in current database (and schema). * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getTables() { @@ -81,7 +81,7 @@ trait TableTrait * * @param string $table The table to find the parents for * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getTableParents($table) { @@ -115,7 +115,7 @@ trait TableTrait * * @param string $table The table to find the children for * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getTableChildren($table) { @@ -148,8 +148,6 @@ trait TableTrait * * @param string $table The table to define * @param string $cleanprefix set to '-- ' to avoid issuing DROP statement - * - * @return null|string */ public function getTableDefPrefix($table, $cleanprefix = ''): ?string { @@ -264,7 +262,7 @@ trait TableTrait * * @param string $table The name of the table * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getTable($table) { @@ -303,7 +301,7 @@ trait TableTrait * @param string $table The name of the table * @param string $field (optional) The name of a field to return * - * @return int|\PHPPgAdmin\ADORecordSet All attributes in order + * @return \ADORecordSet|bool|int|string All attributes in order */ public function getTableAttributes($table, $field = '') { @@ -327,7 +325,7 @@ trait TableTrait * * @param string $table The table to find rules for * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getConstraints($table) { @@ -481,7 +479,7 @@ trait TableTrait * @param string $table The name of a table whose indexes to retrieve * @param bool $unique Only get unique/pk indexes * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getIndexes($table = '', $unique = false) { @@ -512,7 +510,7 @@ trait TableTrait * * @param string $table The name of a table whose triggers to retrieve * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getTriggers($table = '') { @@ -547,7 +545,7 @@ trait TableTrait * * @param string $table The table to find rules for * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getRules($table) { @@ -588,7 +586,9 @@ trait TableTrait * @param array $uniquekey An Array indicating the fields that are unique (those indexes that are set) * @param array $primarykey An Array indicating the field used for the primarykey (those indexes that are set) * - * @return int 0 success + * @return int + * + * @psalm-return -1|0|1 */ public function createTable( $name, @@ -818,6 +818,8 @@ trait TableTrait * @param string $tablespace The tablespace name ('' means none/default) * * @return int + * + * @psalm-return -1|0|1 */ public function createTableLike($name, $like, $defaults = false, $constraints = false, $idx = false, $tablespace = '') { @@ -928,9 +930,7 @@ trait TableTrait * Enables or disables the oid system column to a table a table's owner * /!\ this function is called from _alterTable which take care of escaping fields. * - * @param ADORecordSet $tblrs The table RecordSet returned by getTable() - * @param null|string $owner - * @param bool $withoutoids + * @param ADORecordSet $tblrs The table RecordSet returned by getTable() * * @return array{0:int,1:string} [status:0 if successful, change_sql: changed attribute] */ @@ -1177,7 +1177,7 @@ trait TableTrait * Sets up the data object for a dump. eg. Starts the appropriate * transaction, sets variables, etc. * - * @return int 0 success + * @return int * * @psalm-return -1|0 */ @@ -1227,6 +1227,8 @@ trait TableTrait * Ends the data object for a dump. * * @return int 0 success + * + * @psalm-return 0|1 */ public function endDump() { @@ -1241,7 +1243,7 @@ trait TableTrait * @param string $relation The name of a relation * @param bool $oids true to dump also the oids * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function dumpRelation($relation, $oids) { @@ -1511,7 +1513,7 @@ trait TableTrait * @param string $tablespace The new tablespace for the table ('' means leave as is) * @param bool $withoutoids If set to TRUE, will drop oids column * - * @return int 0 success + * @return int * * @psalm-return -7|-6|-5|-4|-3|0 */ @@ -1626,8 +1628,8 @@ trait TableTrait $atts->fields['attname'] ); // Dump SERIAL and BIGSERIAL columns correctly - if ($this->phpBool($atts->fields['attisserial']) && - ('integer' === $atts->fields['type'] || 'bigint' === $atts->fields['type']) + if ($this->phpBool($atts->fields['attisserial']) + && ('integer' === $atts->fields['type'] || 'bigint' === $atts->fields['type']) ) { if ('integer' === $atts->fields['type']) { $sql .= ' SERIAL'; @@ -1962,7 +1964,6 @@ trait TableTrait * @param ADORecordSet $tblfields table fields object * @param string $sql The sql sentence generated so far * @param string $cleanprefix set to '-- ' to avoid issuing DROP statement - * @param mixed $fields * * @return string original $sql plus appended strings */ @@ -2002,7 +2003,7 @@ trait TableTrait * @param string $table The name of the table * @param string $c_schema The name of the schema * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ private function _getTableAttributesAll($table, $c_schema) { @@ -2058,7 +2059,7 @@ trait TableTrait * @param string $c_schema The schema of the table * @param string $field (optional) The name of a field to return * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ private function _getTableAttribute($table, $c_schema, $field) { diff --git a/src/database/databasetraits/TablespaceTrait.php b/src/database/databasetraits/TablespaceTrait.php index cafd4bc3..ba80bc2e 100644 --- a/src/database/databasetraits/TablespaceTrait.php +++ b/src/database/databasetraits/TablespaceTrait.php @@ -1,13 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database\Traits; -use PHPPgAdmin\ADORecordSet; - /** * Common trait for tablespaces manipulation. */ @@ -18,7 +16,7 @@ trait TablespaceTrait * * @param bool $all Include all tablespaces (necessary when moving objects back to the default space) * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getTablespaces($all = false) { @@ -44,7 +42,7 @@ trait TablespaceTrait * * @param string $spcname * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getTablespace($spcname) { @@ -65,7 +63,7 @@ trait TablespaceTrait * @param string $spcloc The directory in which to create the tablespace * @param string $comment * - * @return int 0 success + * @return int * * @psalm-return -2|-1|0 */ @@ -108,7 +106,9 @@ trait TablespaceTrait * @param string $owner The new owner for the tablespace * @param string $comment * - * @return int 0 success + * @return int + * + * @psalm-return -4|-3|-2|-1|0|1 */ public function alterTablespace($spcname, $name, $owner, $comment = '') { diff --git a/src/database/databasetraits/TriggerTrait.php b/src/database/databasetraits/TriggerTrait.php index 8339358d..e89220db 100644 --- a/src/database/databasetraits/TriggerTrait.php +++ b/src/database/databasetraits/TriggerTrait.php @@ -1,13 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database\Traits; -use PHPPgAdmin\ADORecordSet; - /** * Common trait for trigger and rules manipulation. */ @@ -19,7 +17,7 @@ trait TriggerTrait * @param string $table The name of a table whose triggers to retrieve * @param string $trigger The name of the trigger to retrieve * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getTrigger($table, $trigger) { @@ -156,6 +154,7 @@ trait TriggerTrait // Rule functions // Operator Class functions + /** * Edits a rule on a table OR view. * @@ -167,7 +166,7 @@ trait TriggerTrait * @param string $type NOTHING for a do nothing rule, SOMETHING to use given action * @param string $action The action to take * - * @return int|ADORecordSet 0 if operation was successful + * @return int|string 0 if operation was successful */ public function setRule($name, $event, $table, $where, $instead, $type, $action) { diff --git a/src/database/databasetraits/TypeTrait.php b/src/database/databasetraits/TypeTrait.php index 1fb36f80..c21e03de 100644 --- a/src/database/databasetraits/TypeTrait.php +++ b/src/database/databasetraits/TypeTrait.php @@ -1,13 +1,11 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database\Traits; -use ADORecordSet; - /** * Common trait for types manipulation. */ @@ -75,7 +73,7 @@ trait TypeTrait * * @param string $typname The name of the view to retrieve * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getType($typname) { @@ -94,7 +92,7 @@ trait TypeTrait * @param bool $tabletypes If true, will include table types * @param bool $domains If true, will include domains * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getTypes($all = false, $tabletypes = false, $domains = false) { @@ -239,7 +237,9 @@ trait TypeTrait * @param array $values An array of values * @param string $typcomment Type comment * - * @return int 0 success + * @return int + * + * @psalm-return -2|-1|0|1 */ public function createEnumType($name, $values, $typcomment) { @@ -295,7 +295,7 @@ trait TypeTrait * * @param string $name * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getEnumValues($name) { @@ -322,7 +322,9 @@ trait TypeTrait * @param array $colcomment An array of comments * @param string $typcomment Type comment * - * @return int 0 success + * @return int + * + * @psalm-return -1|0|1 */ public function createCompositeType($name, $fields, $field, $type, $array, $length, $colcomment, $typcomment) { @@ -447,7 +449,7 @@ trait TypeTrait /** * Returns a list of all casts in the database. * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getCasts() { @@ -492,7 +494,7 @@ trait TypeTrait /** * Returns a list of all conversions in the database. * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getConversions() { diff --git a/src/database/databasetraits/ViewTrait.php b/src/database/databasetraits/ViewTrait.php index 2081eda7..c22d1650 100644 --- a/src/database/databasetraits/ViewTrait.php +++ b/src/database/databasetraits/ViewTrait.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Database\Traits; @@ -16,7 +16,7 @@ trait ViewTrait /** * Returns a list of all views in the database. * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getViews() { @@ -36,7 +36,7 @@ trait ViewTrait /** * Returns a list of all materialized views in the database. * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getMaterializedViews() { @@ -61,7 +61,7 @@ trait ViewTrait * @param string $comment * @param bool $materialized tells if it's a materialized view or not * - * @return bool|int 0 success + * @return int 0 success */ public function setView($viewname, $definition, $comment, $materialized = false) { @@ -77,7 +77,9 @@ trait ViewTrait * @param string $comment * @param bool $materialized tells if it's a materialized view * - * @return int 0 success + * @return int + * + * @psalm-return -1|0|1 */ public function createView($viewname, $definition, $replace, $comment, $materialized = false) { @@ -165,7 +167,7 @@ trait ViewTrait * * @param string $view The name of the view or materialized to retrieve * - * @return \RecordSet|int|string + * @return \ADORecordSet|bool|int|string */ public function getView($view) { @@ -324,7 +326,7 @@ trait ViewTrait * @param string $schema Schema name * @param string $comment The comment on the view * - * @return int 0 success + * @return int * * @psalm-return -6|-5|-4|-3|0 */ diff --git a/src/decorators/ActionUrlDecorator.php b/src/decorators/ActionUrlDecorator.php index 56ba6c8d..8173a346 100644 --- a/src/decorators/ActionUrlDecorator.php +++ b/src/decorators/ActionUrlDecorator.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Decorators; @@ -9,10 +9,12 @@ namespace PHPPgAdmin\Decorators; class ActionUrlDecorator extends Decorator { public $base; + /** * @var mixed */ public $queryVars; + public function __construct($base, $queryVars = null) { $this->base = $base; @@ -23,6 +25,8 @@ class ActionUrlDecorator extends Decorator } /** + * @param array $fields + * * @return string */ public function value($fields) @@ -49,6 +53,6 @@ class ActionUrlDecorator extends Decorator } } - return \str_replace('.php', '', containerInstance()->subFolder.'/'.$url); + return \str_replace('.php', '', containerInstance()->subFolder . '/' . $url); } } diff --git a/src/decorators/ArrayMergeDecorator.php b/src/decorators/ArrayMergeDecorator.php index 47a59c83..c40e93b5 100644 --- a/src/decorators/ArrayMergeDecorator.php +++ b/src/decorators/ArrayMergeDecorator.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Decorators; @@ -9,12 +9,15 @@ namespace PHPPgAdmin\Decorators; class ArrayMergeDecorator extends Decorator { public $m; + public function __construct($arrays) { $this->m = $arrays; } /** + * @param mixed $fields + * * @return array */ public function value($fields) diff --git a/src/decorators/BranchUrlDecorator.php b/src/decorators/BranchUrlDecorator.php index 49aebeb2..57222690 100644 --- a/src/decorators/BranchUrlDecorator.php +++ b/src/decorators/BranchUrlDecorator.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Decorators; @@ -9,10 +9,12 @@ namespace PHPPgAdmin\Decorators; class BranchUrlDecorator extends Decorator { public $base; + /** * @var mixed */ public $queryVars; + public function __construct($base, $queryVars = null) { $this->base = $base; @@ -23,6 +25,8 @@ class BranchUrlDecorator extends Decorator } /** + * @param mixed $fields + * * @return string */ public function value($fields) @@ -47,13 +51,12 @@ class BranchUrlDecorator extends Decorator } } - $url = \str_replace('/src/views/', '/', $url); - + $url = \str_replace('/src/views/', '/', $url); //if ('' !== containerInstance()->subFolder && (0 === \mb_strpos($url, '/')) && (0 !== \mb_strpos($url, \containerInstance()->subFolder))) { // $url = \str_replace('//', '/', \containerInstance()->subFolder . '/' . $url); //} - return \str_replace('.php', '', containerInstance()->subFolder.'/'.$url); + return \str_replace('.php', '', containerInstance()->subFolder . '/' . $url); } } diff --git a/src/decorators/CallbackDecorator.php b/src/decorators/CallbackDecorator.php index 844c0f94..1f1e93b1 100644 --- a/src/decorators/CallbackDecorator.php +++ b/src/decorators/CallbackDecorator.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Decorators; @@ -14,7 +14,9 @@ class CallbackDecorator extends Decorator * @var \Closure|mixed */ public $fn; + public $p; + public function __construct(Closure $callback, $param = null) { $this->fn = $callback; diff --git a/src/decorators/ConcatDecorator.php b/src/decorators/ConcatDecorator.php index a81edaf6..cd79a134 100644 --- a/src/decorators/ConcatDecorator.php +++ b/src/decorators/ConcatDecorator.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Decorators; @@ -9,12 +9,15 @@ namespace PHPPgAdmin\Decorators; class ConcatDecorator extends Decorator { public $c; + public function __construct($values) { $this->c = $values; } /** + * @param mixed $fields + * * @return string */ public function value($fields) diff --git a/src/decorators/Decorator.php b/src/decorators/Decorator.php index 4eb4a66d..2e6fb824 100644 --- a/src/decorators/Decorator.php +++ b/src/decorators/Decorator.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Decorators; @@ -11,9 +11,10 @@ use PHPPgAdmin\Traits\HelperTrait; class Decorator { - public $val; use HelperTrait; + public $val; + public $container; public function __construct($value) @@ -27,9 +28,7 @@ class Decorator } /** - * @param null|string $esc - * @param scalar $var - * @param array $fields + * @param scalar $var */ public static function get_sanitized_value(&$var, array &$fields, ?string $esc = null) { @@ -60,19 +59,17 @@ class Decorator } /** - * @param Closure $callback * @param ((mixed|string)[]|null) $params * * @return CallbackDecorator */ public static function callback(Closure $callback, ?array $params = null) { - return new CallbackDecorator($callback, $params); + return new CallbackDecorator($callback, $params); } /** * @param scalar $var - * @param array $fields */ public static function value_url(&$var, array &$fields) { @@ -88,9 +85,6 @@ class Decorator } /** - * @param array $params - * @param string $str - * * @return ReplaceDecorator */ public static function replace(string $str, array $params) @@ -99,9 +93,6 @@ class Decorator } /** - * @param null|array $default - * @param string $fieldName - * * @return FieldDecorator */ public static function field(string $fieldName, ?array $default = null) @@ -110,8 +101,7 @@ class Decorator } /** - * @param null|array $vars - * @param mixed $base + * @param mixed $base * * @return BranchUrlDecorator */ @@ -122,7 +112,7 @@ class Decorator // at value evaluation time. if (2 < \func_num_args()) { $urlvalue = \func_get_args(); - \array_shift($urlvalue ); + \array_shift($urlvalue); return new BranchUrlDecorator($base, new ArrayMergeDecorator($urlvalue)); } @@ -131,8 +121,7 @@ class Decorator } /** - * @param null|array $vars - * @param mixed $base + * @param mixed $base * * @return ActionUrlDecorator */ @@ -152,8 +141,7 @@ class Decorator } /** - * @param null|array $vars - * @param mixed $base + * @param mixed $base * * @return RedirectUrlDecorator */ @@ -173,8 +161,7 @@ class Decorator } /** - * @param null|array $vars - * @param mixed $base + * @param mixed $base * * @return UrlDecorator */ @@ -186,15 +173,18 @@ class Decorator if (2 < \func_num_args()) { $urlvalue = \func_get_args(); - $base = \array_shift($urlvalue ); + $base = \array_shift($urlvalue); - return new UrlDecorator($base, new ArrayMergeDecorator($urlvalue )); + return new UrlDecorator($base, new ArrayMergeDecorator($urlvalue)); } return new UrlDecorator($base, $vars); } /** + * @param FieldDecorator $value + * @param null|UrlDecorator $full + * * @return IfEmptyDecorator */ public static function ifempty($value, string $empty, $full = null) diff --git a/src/decorators/FieldDecorator.php b/src/decorators/FieldDecorator.php index 137a24c7..fb4da991 100644 --- a/src/decorators/FieldDecorator.php +++ b/src/decorators/FieldDecorator.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Decorators; @@ -12,7 +12,9 @@ class FieldDecorator extends Decorator * @var mixed|mixed[] */ public $fieldName; + public $defaultValue; + public function __construct($fieldName, $defaultValue = null) { $this->fieldName = $fieldName; diff --git a/src/decorators/IfEmptyDecorator.php b/src/decorators/IfEmptyDecorator.php index 9689825e..794981d6 100644 --- a/src/decorators/IfEmptyDecorator.php +++ b/src/decorators/IfEmptyDecorator.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Decorators; @@ -9,11 +9,14 @@ namespace PHPPgAdmin\Decorators; class IfEmptyDecorator extends Decorator { public $val; + public $empty; + /** * @var mixed */ public $full; + public function __construct($value, $empty, $full = null) { $this->val = $value; @@ -32,6 +35,6 @@ class IfEmptyDecorator extends Decorator return Decorator::get_sanitized_value($this->empty, $fields); } - return property_exists($this, 'full') && $this->full !== null ? Decorator::get_sanitized_value($this->full, $fields) : $val; + return \property_exists($this, 'full') && null !== $this->full ? Decorator::get_sanitized_value($this->full, $fields) : $val; } } diff --git a/src/decorators/RedirectUrlDecorator.php b/src/decorators/RedirectUrlDecorator.php index d9c9a982..c806bf4b 100644 --- a/src/decorators/RedirectUrlDecorator.php +++ b/src/decorators/RedirectUrlDecorator.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Decorators; @@ -9,10 +9,12 @@ namespace PHPPgAdmin\Decorators; class RedirectUrlDecorator extends Decorator { public $base; + /** * @var mixed */ public $queryVars; + public function __construct($base, $queryVars = null) { $this->base = $base; @@ -23,6 +25,8 @@ class RedirectUrlDecorator extends Decorator } /** + * @param mixed $fields + * * @return string */ public function value($fields) @@ -52,8 +56,8 @@ class RedirectUrlDecorator extends Decorator $sep = '&'; } } - - $url = \str_replace('//', '/', containerInstance()->subFolder. '/' . $url); + + $url = \str_replace('//', '/', containerInstance()->subFolder . '/' . $url); return \str_replace('.php', '', $url); } diff --git a/src/decorators/ReplaceDecorator.php b/src/decorators/ReplaceDecorator.php index 846a385f..e487362c 100644 --- a/src/decorators/ReplaceDecorator.php +++ b/src/decorators/ReplaceDecorator.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Decorators; @@ -12,7 +12,9 @@ class ReplaceDecorator extends Decorator * @var mixed */ public $s; + public $p; + public function __construct($str, $params) { $this->s = $str; diff --git a/src/decorators/UrlDecorator.php b/src/decorators/UrlDecorator.php index e34504b5..7f781c8e 100644 --- a/src/decorators/UrlDecorator.php +++ b/src/decorators/UrlDecorator.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Decorators; @@ -9,10 +9,12 @@ namespace PHPPgAdmin\Decorators; class UrlDecorator extends Decorator { public $base; + /** * @var mixed */ public $queryVars; + public function __construct($base, $queryVars = null) { $this->base = $base; @@ -23,6 +25,8 @@ class UrlDecorator extends Decorator } /** + * @param mixed $fields + * * @return string */ public function value($fields) @@ -44,7 +48,6 @@ class UrlDecorator extends Decorator $sep = '&'; } } - return \str_replace('//', '/', \containerInstance()->subFolder . '/' . $url); } diff --git a/src/help/PostgresDoc.php b/src/help/PostgresDoc.php index 27d7ad08..e40fa95d 100644 --- a/src/help/PostgresDoc.php +++ b/src/help/PostgresDoc.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Help; @@ -180,6 +180,9 @@ class PostgresDoc ]; } + /** + * @return string + */ public function getHelpBase() { return \sprintf(\str_replace('http://', 'https://', $this->conf['help_base']), (string) ($this->major_version)); @@ -188,24 +191,20 @@ class PostgresDoc /** * Undocumented function. * - * @param null|string $topic - * * @return null|string|string[] */ public function getHelpTopics(?string $topic = null) { - return $topic ? $this->help_topics[$topic] ?? null : $this->help_topics; + return $topic ? $this->help_topics[$topic] ?? null : $this->help_topics; } /** * Undocumented function. * - * @param string $topic - * * @return null|string|string[] */ public function getHelpTopic(string $topic) { - return $this->help_topics[$topic] ?? null; + return $this->help_topics[$topic] ?? null; } } diff --git a/src/help/PostgresDoc10.php b/src/help/PostgresDoc10.php index 8489e926..24947c23 100644 --- a/src/help/PostgresDoc10.php +++ b/src/help/PostgresDoc10.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Help; diff --git a/src/help/PostgresDoc11.php b/src/help/PostgresDoc11.php index cbb54036..fce4e5bc 100644 --- a/src/help/PostgresDoc11.php +++ b/src/help/PostgresDoc11.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Help; diff --git a/src/help/PostgresDoc12.php b/src/help/PostgresDoc12.php index ba09bd56..da2275e9 100644 --- a/src/help/PostgresDoc12.php +++ b/src/help/PostgresDoc12.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Help; diff --git a/src/help/PostgresDoc90.php b/src/help/PostgresDoc90.php index ce2b45fe..d880ded1 100644 --- a/src/help/PostgresDoc90.php +++ b/src/help/PostgresDoc90.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Help; diff --git a/src/help/PostgresDoc91.php b/src/help/PostgresDoc91.php index 8c517fe0..9578197a 100644 --- a/src/help/PostgresDoc91.php +++ b/src/help/PostgresDoc91.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Help; diff --git a/src/help/PostgresDoc92.php b/src/help/PostgresDoc92.php index 41b5c71b..706404a6 100644 --- a/src/help/PostgresDoc92.php +++ b/src/help/PostgresDoc92.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Help; diff --git a/src/help/PostgresDoc93.php b/src/help/PostgresDoc93.php index fa686032..a1a93869 100644 --- a/src/help/PostgresDoc93.php +++ b/src/help/PostgresDoc93.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Help; diff --git a/src/help/PostgresDoc94.php b/src/help/PostgresDoc94.php index 8ca9575b..f2797591 100644 --- a/src/help/PostgresDoc94.php +++ b/src/help/PostgresDoc94.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Help; diff --git a/src/help/PostgresDoc95.php b/src/help/PostgresDoc95.php index d29a3088..46d40fe9 100644 --- a/src/help/PostgresDoc95.php +++ b/src/help/PostgresDoc95.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Help; diff --git a/src/help/PostgresDoc96.php b/src/help/PostgresDoc96.php index 3be10ff3..deaa30a2 100644 --- a/src/help/PostgresDoc96.php +++ b/src/help/PostgresDoc96.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Help; diff --git a/src/interfaces/RecordSet.php b/src/interfaces/RecordSet.php index a9ae6e6d..5139a72d 100644 --- a/src/interfaces/RecordSet.php +++ b/src/interfaces/RecordSet.php @@ -1,19 +1,15 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Interfaces; -use ADOFieldObject; -use Countable; +use ADOFieldObject; interface RecordSet { - - - /** * Returns the recordCount. */ @@ -24,13 +20,13 @@ interface RecordSet * * @return int number of records in the instance array */ - public function RecordCount():int; + public function RecordCount(): int; + /** * Advance the internal pointer of the instance array * if no more fields are left, marks the instance variable $EOF as true. */ - public function MoveNext(): void; + public function MoveNext(): void; public function FetchField(int $fieldoffset = -1): ADOFieldObject; - } diff --git a/src/lib.inc.php b/src/lib.inc.php index f1470e4b..e1b3dc98 100644 --- a/src/lib.inc.php +++ b/src/lib.inc.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ use PHPPgAdmin\ContainerUtils; @@ -19,7 +19,7 @@ function getAppInstance(): App $subfolder = ''; // Check to see if the configuration file exists, if not, explain if (!\file_exists(\dirname(__DIR__) . '/config.inc.php')) { - die('Configuration error: Copy config.inc.php-dist to config.inc.php and edit appropriately.'); + exit('Configuration error: Copy config.inc.php-dist to config.inc.php and edit appropriately.'); } $conf = []; @@ -57,7 +57,7 @@ function getAppInstance(): App $conf['IN_TEST'] = IN_TEST; // Fetch App and DI Container - $app = ContainerUtils::getAppInstance($conf); + $app = ContainerUtils::getAppInstance($conf); return $app; } @@ -71,12 +71,12 @@ function containerInstance(): ContainerUtils \trigger_error('App Container must be an instance of \\Slim\\Container', \E_USER_ERROR); } - return $container; + return $container; } function requestInstance(): Request { - return \containerInstance()->request; + return \containerInstance()->request; } function responseInstance(): Response diff --git a/src/middleware/Middleware.php b/src/middleware/Middleware.php index d514f4e5..9e99344a 100644 --- a/src/middleware/Middleware.php +++ b/src/middleware/Middleware.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Middleware; diff --git a/src/middleware/PopulateRequestResponse.php b/src/middleware/PopulateRequestResponse.php index 92940334..686b07f7 100644 --- a/src/middleware/PopulateRequestResponse.php +++ b/src/middleware/PopulateRequestResponse.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Middleware; @@ -54,14 +54,14 @@ class PopulateRequestResponse extends Middleware $requestPath = $uri->getPath(); $view->offsetSet('query_string', $query_string); - $path = $requestPath . ($query_string !== '' ? '?' . $query_string : ''); + $path = $requestPath . ('' !== $query_string ? '?' . $query_string : ''); $view->offsetSet('path', $path); $params = $request->getParams(); $viewparams = []; - $viewparams = array_filter($params, 'is_scalar'); + $viewparams = \array_filter($params, 'is_scalar'); $in_test = isset($_COOKIE['IN_TEST']) ? (string) $_COOKIE['IN_TEST'] : '0'; diff --git a/src/router.php b/src/router.php index c3f82c54..6cfa9318 100644 --- a/src/router.php +++ b/src/router.php @@ -1,12 +1,12 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ foreach (['logs', 'sessions', 'twigcache'] as $tempFolder) { if (!\is_writable(\sprintf('%s/temp/%s', \dirname(__DIR__), $tempFolder))) { - die(\sprintf('The folder temp/%s must be writable', $tempFolder)); + exit(\sprintf('The folder temp/%s must be writable', $tempFolder)); } } @@ -36,8 +36,8 @@ $app = getAppInstance(); $container = $app->getContainer(); // If no dump function has been globally declared at this point -// we fill the gap with an empty one to avoid errors -if (!function_exists('dump')) { +// we fill the gap with an empty one to avoid errors +if (!\function_exists('dump')) { function dump(...$args): void { // do nothing @@ -125,13 +125,13 @@ $app->get('/redirect[/{subject}]', function ( array $args ) { $subject = (isset($args['subject'])) ? $args['subject'] : 'root'; - $destinationurl = str_replace($this->subFolder . '/', '', $this->getDestinationWithLastTab($subject)); + $destinationurl = \str_replace($this->subFolder . '/', '', $this->getDestinationWithLastTab($subject)); $cleanDestination = ($this->subFolder . '/' . $destinationurl); return $response->withStatus(302)->withHeader('Location', $cleanDestination); }); -ini_set('display_errors', 'on'); +\ini_set('display_errors', 'on'); $app->get('/{subject:servers|intro|browser}[/{server_id}]', function ( \Slim\Http\Request $request, \Slim\Http\Response $response, @@ -145,7 +145,6 @@ $app->get('/{subject:servers|intro|browser}[/{server_id}]', function ( return $controller->render(); }); - $app->map(['GET', 'POST'], '/src/views/{subject}', function ( \Slim\Http\Request $request, \Slim\Http\Response $response, @@ -154,6 +153,7 @@ $app->map(['GET', 'POST'], '/src/views/{subject}', function ( $subject = $args['subject']; $nextPath = $this->subFolder . '/' . $subject; $query_string = $request->getUri()->getQuery(); + return $response->withStatus(307)->withHeader('Location', $nextPath . ($query_string ? '?' . $query_string : '')); }); @@ -166,6 +166,7 @@ $app->map(['GET', 'POST'], '/{subject:\w+}[/{server_id}]', function ( $subject = $args['subject'] ?? 'intro'; $server_id = $args['server_id'] ?? $request->getQueryParam('server'); $_server_info = $this->misc->getServerInfo(); + if (!isset($_server_info['username'])) { $subject = 'login'; } @@ -177,6 +178,7 @@ $app->map(['GET', 'POST'], '/{subject:\w+}[/{server_id}]', function ( $this->view->offsetSet('includeJsTree', true); $className = $this->view->getControllerClassName($subject); $controller = new $className($this); + return $controller->render(); }); @@ -189,15 +191,16 @@ $app->get('/', function ( $query_string = $request->getUri()->getQuery(); $className = $this->view->getControllerClassName($subject); $controller = new $className($this); + return $controller->render(); }); -$app->get('[/{path:.*}]', function ( +$app->get('[/{path:.*}]', function ( \Slim\Http\Request $request, \Slim\Http\Response $response, array $args ) { - return $response->write(sprintf("We couldn't find a route matching %s", $args['path'] ? $args['path'] : 'index')); + return $response->write(\sprintf("We couldn't find a route matching %s", $args['path'] ?: 'index')); }); // Run app diff --git a/src/traits/AdminTrait.php b/src/traits/AdminTrait.php index ea97a1f3..d4f438be 100644 --- a/src/traits/AdminTrait.php +++ b/src/traits/AdminTrait.php @@ -1,11 +1,12 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Traits; +use IteratorAggregate; use PHPPgAdmin\Decorators\Decorator; /** @@ -577,6 +578,8 @@ trait AdminTrait * perform actual vacuum. * * @param mixed $type + * + * @return null|string */ public function doVacuum($type) { @@ -633,8 +636,6 @@ trait AdminTrait * persist changes in autovacuum settings. * * @param mixed $type - * @param mixed $confirm - * @param mixed $msg */ public function doEditAutovacuum($type): void { @@ -790,6 +791,12 @@ trait AdminTrait $this->_printAutoVacuumConf($data, $type); } + /** + * @param mixed $action + * @param mixed $type + * + * @return bool + */ public function adminActions($action, $type) { if ('database' === $type) { @@ -886,8 +893,17 @@ trait AdminTrait abstract public function printTabs(string $tabs, string $activetab, bool $do_print = true); - abstract public function printTable(&$tabledata, &$columns, &$actions, $place, $nodata = '', $pre_fn = null); + abstract public function printTable(IteratorAggregate &$tabledata, &$columns, &$actions, $place, $nodata = '', $pre_fn = null); + /** + * @psalm-return array{0: string, 1: string} + * + * @param mixed $data + * @param mixed $type + * @param mixed $table_hidden_inputs + * + * @return string[] + */ private function _getReclusterConf($data, $type, $table_hidden_inputs) { if (!$data->hasRecluster()) { @@ -936,7 +952,7 @@ trait AdminTrait echo '<p>' . (('on' === $defaults['autovacuum']) ? $this->lang['strturnedon'] : $this->lang['strturnedoff']) . '</p>'; echo "<p class=\"message\">{$this->lang['strnotdefaultinred']}</p>"; - $enlight = static function ($f, $p) { + $enlight = static function ($f, $p): string { if (isset($f[$p[0]]) && ($f[$p[0]] !== $p[1])) { return '<span style="color:#F33;font-weight:bold">' . \htmlspecialchars($f[$p[0]]) . '</span>'; } diff --git a/src/traits/ExportTrait.php b/src/traits/ExportTrait.php index 430941ea..0bf9bc94 100644 --- a/src/traits/ExportTrait.php +++ b/src/traits/ExportTrait.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Traits; diff --git a/src/traits/FormTrait.php b/src/traits/FormTrait.php index 85d7f54f..bb4ccd3c 100644 --- a/src/traits/FormTrait.php +++ b/src/traits/FormTrait.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Traits; @@ -20,6 +20,8 @@ trait FormTrait * @param string $table value for table input * @param string $add text for add button * @param string $cancel text for cancel button + * + * @return string */ public function getActionTableAndButtons($action, $table, $add, $cancel) { @@ -38,6 +40,8 @@ trait FormTrait * @param array $inputs array of inputs with their name, type and value * @param array $buttons array of buttons with their name, type and value * @param array $cheboxes array of cheboxes with their name, id, checked state, type and text for label + * + * @return string */ public function getFormInputsAndButtons($inputs, $buttons, $cheboxes = []) { diff --git a/src/traits/HelperTrait.php b/src/traits/HelperTrait.php index 0610572c..c4df1e9f 100644 --- a/src/traits/HelperTrait.php +++ b/src/traits/HelperTrait.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Traits; @@ -33,6 +33,13 @@ trait HelperTrait throw new \Slim\Exception\SlimException(\requestInstance(), \responseInstance()); } + /** + * @psalm-return array{class: mixed, type: mixed, function: mixed, spacer4: string, line: mixed} + * + * @param mixed $offset + * + * @return (mixed|string)[] + */ public static function getBackTrace($offset = 0) { $i0 = $offset; @@ -62,7 +69,9 @@ trait HelperTrait * @param \ADORecordSet $set The set * @param string $field optionally the field to query for * - * @return array the parsed array + * @return (\ADORecordSet|mixed)[] the parsed array + * + * @psalm-return list<\ADORecordSet|mixed> */ public static function recordSetToArray($set, $field = '') { diff --git a/src/traits/InsertEditRowTrait.php b/src/traits/InsertEditRowTrait.php index b44fece4..a79b424b 100644 --- a/src/traits/InsertEditRowTrait.php +++ b/src/traits/InsertEditRowTrait.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Traits; @@ -23,7 +23,7 @@ trait InsertEditRowTrait * * @param string $table The table to retrieve FK contraints from * - * @return array{byconstr:array, byfield:array, code:string}|bool the array of FK definition: + * @return (array[]|string)[]|false * * @example * ``` @@ -44,6 +44,8 @@ trait InsertEditRowTrait * 'code' => 'HTML/js code to include in the page for auto-completion', * ]; * ``` + * + * @psalm-return array{byconstr: array<array-key, array{confrelid: mixed, f_table: mixed, f_schema: mixed, pattnums: list<mixed>, pattnames: list<mixed>, fattnames: list<mixed>}>, byfield: array<array-key, list<mixed>>, code: string}|false */ public function getAutocompleteFKProperties($table) { @@ -133,6 +135,11 @@ trait InsertEditRowTrait return $fksprops; } + /** + * @return (array[]|string)[]|false + * + * @psalm-return array{byconstr: array<array-key, array{confrelid: mixed, f_table: mixed, f_schema: mixed, pattnums: list<mixed>, pattnames: list<mixed>, fattnames: list<mixed>}>, byfield: array<array-key, list<mixed>>, code: string}|false + */ private function _getFKProps() { if (('disable' !== $this->conf['autocomplete'])) { diff --git a/src/traits/MiscTrait.php b/src/traits/MiscTrait.php index 7fcd3ee2..ad47129c 100644 --- a/src/traits/MiscTrait.php +++ b/src/traits/MiscTrait.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Traits; @@ -19,6 +19,13 @@ use PHPPgAdmin\Decorators\Decorator; */ trait MiscTrait { + /** + * @psalm-return array{params?: array{subject: string, server?: mixed, action?: string, rolename?: mixed, database?: mixed, schema?: mixed, table?: mixed, view?: mixed, matview?: mixed, ftscfg?: mixed, function?: mixed, function_oid?: mixed, aggrname?: mixed, aggrtype?: mixed, column?: mixed}, url: string}|false + * + * @param mixed $subject + * + * @return ((mixed|string)[]|string)[]|false + */ public function getSubjectParams($subject) { $vars = []; @@ -166,7 +173,7 @@ trait MiscTrait } if (containerInstance()->subFolder . '/redirect' === $vars['url'] && isset($vars['params']['subject'])) { - $vars['url'] = \containerInstance()->getDestinationWithLastTab( $vars['params']['subject']); + $vars['url'] = \containerInstance()->getDestinationWithLastTab($vars['params']['subject']); unset($vars['params']['subject']); } @@ -192,6 +199,15 @@ trait MiscTrait return $str; } + /** + * @psalm-return array{0: mixed|string, 1: null|string, 2: mixed|string} + * + * @param mixed $type + * @param mixed $str + * @param mixed $params + * + * @return (mixed|null|string)[] + */ public function printBoolean($type, &$str, $params) { $lang = $this->lang; @@ -381,7 +397,9 @@ trait MiscTrait * * @param \PHPPgAdmin\Database\ADOdbBase $data The database accesor instance * - * @return array The tabs for root view + * @return (mixed|string)[][] The tabs for root view + * + * @psalm-return array{intro: array{title: mixed, url: string, icon: string}, servers: array{title: mixed, url: string, icon: string}} */ public function getTabsRoot($data) { @@ -406,7 +424,9 @@ trait MiscTrait * * @param \PHPPgAdmin\Database\ADOdbBase $data The database accesor instance * - * @return array The tabs for server view + * @return (bool|mixed|string|string[])[][] The tabs for server view + * + * @psalm-return array{databases: array{title: mixed, url: string, urlvars: array{subject: string}, help: string, icon: string}, users: array{title: mixed, url: string, urlvars: array{subject: string}, hide: false, help: string, icon: string}, groups?: array{title: mixed, url: string, urlvars: array{subject: string}, hide: bool, help: string, icon: string}, roles?: array{title: mixed, url: string, urlvars: array{subject: string}, hide: false, help: string, icon: string}, account: array{title: mixed, url: string, urlvars: array{subject: string, action: string}, hide: bool, help: string, icon: string}, tablespaces: array{title: mixed, url: string, urlvars: array{subject: string}, hide: bool, help: string, icon: string}, export: array{title: mixed, url: string, urlvars: array{subject: string, action: string}, hide: bool, icon: string}} */ public function getTabsServer($data) { @@ -492,7 +512,9 @@ trait MiscTrait * * @param \PHPPgAdmin\Database\ADOdbBase $data The database accesor instance * - * @return array The tabs for database view + * @return ((int|string)[]|bool|mixed|string)[][] The tabs for database view + * + * @psalm-return array{schemas: array{title: mixed, url: string, urlvars: array{subject: string}, help: string, icon: string}, sql: array{title: mixed, url: string, urlvars: array{subject: string, action: string, new: int}, help: string, tree: false, icon: string}, find: array{title: mixed, url: string, urlvars: array{subject: string, action: string}, tree: false, icon: string}, variables: array{title: mixed, url: string, urlvars: array{subject: string, action: string}, help: string, tree: false, icon: string}, processes: array{title: mixed, url: string, urlvars: array{subject: string, action: string}, help: string, tree: false, icon: string}, locks: array{title: mixed, url: string, urlvars: array{subject: string, action: string}, help: string, tree: false, icon: string}, admin: array{title: mixed, url: string, urlvars: array{subject: string, action: string}, tree: false, icon: string}, privileges: array{title: mixed, url: string, urlvars: array{subject: string}, hide: bool, help: string, tree: false, icon: string}, languages: array{title: mixed, url: string, urlvars: array{subject: string}, hide: bool, help: string, icon: string}, casts: array{title: mixed, url: string, urlvars: array{subject: string}, hide: bool, help: string, icon: string}, export: array{title: mixed, url: string, urlvars: array{subject: string, action: string}, hide: bool, tree: false, icon: string}} */ public function getTabsDatabase($data) { @@ -589,6 +611,13 @@ trait MiscTrait ]; } + /** + * @psalm-return array{tables: array{title: mixed, url: string, urlvars: array{subject: string}, help: string, icon: string}, views: array{title: mixed, url: string, urlvars: array{subject: string}, help: string, icon: string}, matviews: array{title: string, url: string, urlvars: array{subject: string}, help: string, icon: string}, sequences: array{title: mixed, url: string, urlvars: array{subject: string}, help: string, icon: string}, functions: array{title: mixed, url: string, urlvars: array{subject: string}, help: string, icon: string}, fulltext?: array{title: mixed, url: string, urlvars: array{subject: string}, help: string, tree: true, icon: string}, domains: array{title: mixed, url: string, urlvars: array{subject: string}, help: string, icon: string}, aggregates: array{title: mixed, url: string, urlvars: array{subject: string}, hide: bool, help: string, icon: string}, types: array{title: mixed, url: string, urlvars: array{subject: string}, hide: bool, help: string, icon: string}, operators: array{title: mixed, url: string, urlvars: array{subject: string}, hide: bool, help: string, icon: string}, opclasses: array{title: mixed, url: string, urlvars: array{subject: string}, hide: bool, help: string, icon: string}, conversions: array{title: mixed, url: string, urlvars: array{subject: string}, hide: bool, help: string, icon: string}, privileges: array{title: mixed, url: string, urlvars: array{subject: string}, help: string, tree: false, icon: string}, export: array{title: mixed, url: string, urlvars: array{subject: string, action: string}, hide: bool, tree: false, icon: string}} + * + * @param mixed $data + * + * @return (bool|mixed|string|string[])[][] + */ public function getTabsSchema($data) { $lang = $this->lang; @@ -709,6 +738,13 @@ trait MiscTrait return $tabs; } + /** + * @psalm-return array{columns: array{title: mixed, url: string, urlvars: array{subject: string, table: \PHPPgAdmin\Decorators\FieldDecorator}, icon: string, branch: true}, browse: array{title: mixed, icon: string, url: string, urlvars: array{subject: string, table: \PHPPgAdmin\Decorators\FieldDecorator}, return: string, branch: true}, select: array{title: mixed, icon: string, url: string, urlvars: array{subject: string, table: \PHPPgAdmin\Decorators\FieldDecorator, action: string}, help: string}, insert: array{title: mixed, url: string, urlvars: array{action: string, table: \PHPPgAdmin\Decorators\FieldDecorator}, help: string, icon: string}, indexes: array{title: mixed, url: string, urlvars: array{subject: string, table: \PHPPgAdmin\Decorators\FieldDecorator}, help: string, icon: string, branch: true}, constraints: array{title: mixed, url: string, urlvars: array{subject: string, table: \PHPPgAdmin\Decorators\FieldDecorator}, help: string, icon: string, branch: true}, triggers: array{title: mixed, url: string, urlvars: array{subject: string, table: \PHPPgAdmin\Decorators\FieldDecorator}, help: string, icon: string, branch: true}, rules: array{title: mixed, url: string, urlvars: array{subject: string, table: \PHPPgAdmin\Decorators\FieldDecorator}, help: string, icon: string, branch: true}, admin: array{title: mixed, url: string, urlvars: array{subject: string, table: \PHPPgAdmin\Decorators\FieldDecorator, action: string}, icon: string}, info: array{title: mixed, url: string, urlvars: array{subject: string, table: \PHPPgAdmin\Decorators\FieldDecorator}, icon: string}, privileges: array{title: mixed, url: string, urlvars: array{subject: string, table: \PHPPgAdmin\Decorators\FieldDecorator}, help: string, icon: string}, import: array{title: mixed, url: string, urlvars: array{subject: string, table: \PHPPgAdmin\Decorators\FieldDecorator, action: string}, icon: string, hide: false}, export: array{title: mixed, url: string, urlvars: array{subject: string, table: \PHPPgAdmin\Decorators\FieldDecorator, action: string}, icon: string, hide: false}} + * + * @param mixed $data + * + * @return ((\PHPPgAdmin\Decorators\FieldDecorator|string)[]|bool|mixed|string)[][] + */ public function getTabsTable($data) { $lang = $this->lang; @@ -814,6 +850,13 @@ trait MiscTrait ]; } + /** + * @psalm-return array{columns: array{title: mixed, url: string, urlvars: array{subject: string, view: \PHPPgAdmin\Decorators\FieldDecorator}, icon: string, branch: true}, browse: array{title: mixed, icon: string, url: string, urlvars: array{action: string, return: string, subject: string, view: \PHPPgAdmin\Decorators\FieldDecorator}, branch: true}, select: array{title: mixed, icon: string, url: string, urlvars: array{action: string, view: \PHPPgAdmin\Decorators\FieldDecorator}, help: string}, definition: array{title: mixed, url: string, urlvars: array{subject: string, view: \PHPPgAdmin\Decorators\FieldDecorator, action: string}, icon: string}, rules: array{title: mixed, url: string, urlvars: array{subject: string, view: \PHPPgAdmin\Decorators\FieldDecorator}, help: string, icon: string, branch: true}, privileges: array{title: mixed, url: string, urlvars: array{subject: string, view: \PHPPgAdmin\Decorators\FieldDecorator}, help: string, icon: string}, export: array{title: mixed, url: string, urlvars: array{subject: string, view: \PHPPgAdmin\Decorators\FieldDecorator, action: string}, icon: string, hide: false}} + * + * @param mixed $data + * + * @return ((\PHPPgAdmin\Decorators\FieldDecorator|string)[]|bool|mixed|string)[][] + */ public function getTabsView($data) { $lang = $this->lang; @@ -876,6 +919,13 @@ trait MiscTrait ]; } + /** + * @psalm-return array{columns: array{title: mixed, url: string, urlvars: array{subject: string, matview: \PHPPgAdmin\Decorators\FieldDecorator}, icon: string, branch: true}, browse: array{title: mixed, icon: string, url: string, urlvars: array{action: string, return: string, subject: string, matview: \PHPPgAdmin\Decorators\FieldDecorator}, branch: true}, select: array{title: mixed, icon: string, url: string, urlvars: array{action: string, matview: \PHPPgAdmin\Decorators\FieldDecorator}, help: string}, definition: array{title: mixed, url: string, urlvars: array{subject: string, matview: \PHPPgAdmin\Decorators\FieldDecorator, action: string}, icon: string}, indexes: array{title: mixed, url: string, urlvars: array{subject: string, matview: \PHPPgAdmin\Decorators\FieldDecorator}, help: string, icon: string, branch: true}, rules: array{title: mixed, url: string, urlvars: array{subject: string, matview: \PHPPgAdmin\Decorators\FieldDecorator}, help: string, icon: string, branch: true}, privileges: array{title: mixed, url: string, urlvars: array{subject: string, matview: \PHPPgAdmin\Decorators\FieldDecorator}, help: string, icon: string}, export: array{title: mixed, url: string, urlvars: array{subject: string, matview: \PHPPgAdmin\Decorators\FieldDecorator, action: string}, icon: string, hide: false}} + * + * @param mixed $data + * + * @return ((\PHPPgAdmin\Decorators\FieldDecorator|string)[]|bool|mixed|string)[][] + */ public function getTabsMatview($data) { $lang = $this->lang; @@ -955,6 +1005,13 @@ trait MiscTrait ]; } + /** + * @psalm-return array{definition: array{title: mixed, url: string, urlvars: array{subject: string, function: \PHPPgAdmin\Decorators\FieldDecorator, function_oid: \PHPPgAdmin\Decorators\FieldDecorator, action: string}, icon: string}, privileges: array{title: mixed, url: string, urlvars: array{subject: string, function: \PHPPgAdmin\Decorators\FieldDecorator, function_oid: \PHPPgAdmin\Decorators\FieldDecorator}, icon: string}, show: array{title: string, url: string, urlvars: array{subject: string, function: \PHPPgAdmin\Decorators\FieldDecorator, function_oid: \PHPPgAdmin\Decorators\FieldDecorator, action: string}, icon: string}} + * + * @param mixed $data + * + * @return ((\PHPPgAdmin\Decorators\FieldDecorator|string)[]|mixed|string)[][] + */ public function getTabsFunction($data) { $lang = $this->lang; @@ -995,6 +1052,13 @@ trait MiscTrait ]; } + /** + * @psalm-return array{definition: array{title: mixed, url: string, urlvars: array{subject: string, aggrname: \PHPPgAdmin\Decorators\FieldDecorator, aggrtype: \PHPPgAdmin\Decorators\FieldDecorator, action: string}, icon: string}} + * + * @param mixed $data + * + * @return ((\PHPPgAdmin\Decorators\FieldDecorator|string)[]|mixed|string)[][] + */ public function getTabsAggregate($data) { $lang = $this->lang; @@ -1014,6 +1078,13 @@ trait MiscTrait ]; } + /** + * @psalm-return array{definition: array{title: mixed, url: string, urlvars: array{subject: string, rolename: \PHPPgAdmin\Decorators\FieldDecorator, action: string}, icon: string}} + * + * @param mixed $data + * + * @return ((\PHPPgAdmin\Decorators\FieldDecorator|string)[]|mixed|string)[][] + */ public function getTabsRole($data) { $lang = $this->lang; @@ -1032,6 +1103,13 @@ trait MiscTrait ]; } + /** + * @psalm-return array{sql: array{title: mixed, url: string, urlvars: array{action: string, subject: string}, help: string, icon: string}, find: array{title: mixed, url: string, urlvars: array{action: string, subject: string}, icon: string}} + * + * @param mixed $data + * + * @return (mixed|string|string[])[][] + */ public function getTabsPopup($data) { $lang = $this->lang; @@ -1053,6 +1131,13 @@ trait MiscTrait ]; } + /** + * @psalm-return array{properties: array{title: mixed, url: string, urlvars: array{subject: string, table: \PHPPgAdmin\Decorators\FieldDecorator, view: \PHPPgAdmin\Decorators\FieldDecorator, column: \PHPPgAdmin\Decorators\FieldDecorator}, icon: string}, privileges: array{title: mixed, url: string, urlvars: array{subject: string, table: \PHPPgAdmin\Decorators\FieldDecorator, view: \PHPPgAdmin\Decorators\FieldDecorator, column: \PHPPgAdmin\Decorators\FieldDecorator}, help: string, icon: string}} + * + * @param mixed $data + * + * @return ((\PHPPgAdmin\Decorators\FieldDecorator|string)[]|mixed|string)[][] + */ public function getTabsColumn($data) { $lang = $this->lang; @@ -1093,6 +1178,13 @@ trait MiscTrait return $tabs; } + /** + * @psalm-return array{ftsconfigs: array{title: mixed, url: string, urlvars: array{subject: string}, hide: bool, help: string, tree: true, icon: string}, ftsdicts: array{title: mixed, url: string, urlvars: array{subject: string, action: string}, hide: bool, help: string, tree: true, icon: string}, ftsparsers: array{title: mixed, url: string, urlvars: array{subject: string, action: string}, hide: bool, help: string, tree: true, icon: string}} + * + * @param mixed $data + * + * @return (bool|mixed|string|string[])[][] + */ public function getTabsFulltext($data) { $lang = $this->lang; diff --git a/src/traits/ServersTrait.php b/src/traits/ServersTrait.php index 93c42c37..ec5ecd75 100644 --- a/src/traits/ServersTrait.php +++ b/src/traits/ServersTrait.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Traits; @@ -20,6 +20,8 @@ trait ServersTrait * @param mixed $group a group name to filter the returned servers using $this->conf[srv_groups] * * @return array|\PHPPgAdmin\ArrayRecordSet either an array or a Recordset suitable for HTMLTableController::printTable + * + * @psalm-return \PHPPgAdmin\ArrayRecordSet|array<string, mixed> */ public function getServers($recordset = false, $group = false) { @@ -95,6 +97,8 @@ trait ServersTrait * * @param string $the_action an action identifying the purpose of this snipper sql|find|history * @param mixed $do_print + * + * @return null|string */ public function printConnection($the_action, $do_print = true) { @@ -135,9 +139,9 @@ trait ServersTrait $connection_html .= '</td><td class="popup_select2" style="text-align: right">' . \PHP_EOL; - if (1 === \count($servers) && - isset($servers[$server_id]['useonlydefaultdb']) && - true === $servers[$server_id]['useonlydefaultdb'] + if (1 === \count($servers) + && isset($servers[$server_id]['useonlydefaultdb']) + && true === $servers[$server_id]['useonlydefaultdb'] ) { $connection_html .= '<input type="hidden" name="database" value="' . \htmlspecialchars($servers[$server_id]['defaultdb']) . '" />' . \PHP_EOL; } else { diff --git a/src/traits/ViewsMatViewsPropertiesTrait.php b/src/traits/ViewsMatViewsPropertiesTrait.php index be52e53f..57364c80 100644 --- a/src/traits/ViewsMatViewsPropertiesTrait.php +++ b/src/traits/ViewsMatViewsPropertiesTrait.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Traits; diff --git a/src/traits/ViewsMatviewsTrait.php b/src/traits/ViewsMatviewsTrait.php index f839aecf..f8f12cad 100644 --- a/src/traits/ViewsMatviewsTrait.php +++ b/src/traits/ViewsMatviewsTrait.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Traits; @@ -498,6 +498,11 @@ trait ViewsMatviewsTrait // if field already exist, just ignore this one } + /** + * @return (array|int)[] + * + * @psalm-return array{0: list<mixed>, 1: 0|positive-int} + */ private function _getArrLinks() { $arrLinks = []; diff --git a/src/translations/AbstractLang.php b/src/translations/AbstractLang.php index 27f9f656..e55cbe85 100644 --- a/src/translations/AbstractLang.php +++ b/src/translations/AbstractLang.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; @@ -16,9 +16,6 @@ abstract class AbstractLang */ protected $lang = []; - /** - * @return array - */ public function getLang(): array { return $this->lang; diff --git a/src/translations/Afrikaans.php b/src/translations/Afrikaans.php index eadb8fc3..de4e1ef0 100644 --- a/src/translations/Afrikaans.php +++ b/src/translations/Afrikaans.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/Arabic.php b/src/translations/Arabic.php index 219d3908..b1181e54 100644 --- a/src/translations/Arabic.php +++ b/src/translations/Arabic.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/Catalan.php b/src/translations/Catalan.php index 571d07c6..624e3f9d 100644 --- a/src/translations/Catalan.php +++ b/src/translations/Catalan.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/ChineseSim.php b/src/translations/ChineseSim.php index 7fd1f59f..c2f057df 100644 --- a/src/translations/ChineseSim.php +++ b/src/translations/ChineseSim.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/ChineseTr.php b/src/translations/ChineseTr.php index e84ec640..d15c39b0 100644 --- a/src/translations/ChineseTr.php +++ b/src/translations/ChineseTr.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/ChineseUtf8ZhCn.php b/src/translations/ChineseUtf8ZhCn.php index d8fada44..75a69edd 100644 --- a/src/translations/ChineseUtf8ZhCn.php +++ b/src/translations/ChineseUtf8ZhCn.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/ChineseUtf8ZhTw.php b/src/translations/ChineseUtf8ZhTw.php index 96f60c65..250364cf 100644 --- a/src/translations/ChineseUtf8ZhTw.php +++ b/src/translations/ChineseUtf8ZhTw.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/Czech.php b/src/translations/Czech.php index 4e23abed..c6fafb73 100644 --- a/src/translations/Czech.php +++ b/src/translations/Czech.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/Danish.php b/src/translations/Danish.php index 65cdc5c5..c2d32399 100644 --- a/src/translations/Danish.php +++ b/src/translations/Danish.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/Dutch.php b/src/translations/Dutch.php index ce1cbc2c..cd04f9be 100644 --- a/src/translations/Dutch.php +++ b/src/translations/Dutch.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/English.php b/src/translations/English.php index 450c1ddf..ccd011af 100644 --- a/src/translations/English.php +++ b/src/translations/English.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/French.php b/src/translations/French.php index 8950216f..5b72ad02 100644 --- a/src/translations/French.php +++ b/src/translations/French.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/Galician.php b/src/translations/Galician.php index 294763fb..3b75fc9a 100644 --- a/src/translations/Galician.php +++ b/src/translations/Galician.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/German.php b/src/translations/German.php index b7a45905..104a5d15 100644 --- a/src/translations/German.php +++ b/src/translations/German.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/Greek.php b/src/translations/Greek.php index e48cdd49..94642f43 100644 --- a/src/translations/Greek.php +++ b/src/translations/Greek.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/Hebrew.php b/src/translations/Hebrew.php index 413a7af4..d9f320ec 100644 --- a/src/translations/Hebrew.php +++ b/src/translations/Hebrew.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/Hungarian.php b/src/translations/Hungarian.php index 0fa567a6..93a094af 100644 --- a/src/translations/Hungarian.php +++ b/src/translations/Hungarian.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/Italian.php b/src/translations/Italian.php index e3991ee2..3722a2a4 100644 --- a/src/translations/Italian.php +++ b/src/translations/Italian.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/Japanese.php b/src/translations/Japanese.php index 807b4bad..5fbac5e9 100644 --- a/src/translations/Japanese.php +++ b/src/translations/Japanese.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/Lithuanian.php b/src/translations/Lithuanian.php index 840171c0..d31b02e7 100644 --- a/src/translations/Lithuanian.php +++ b/src/translations/Lithuanian.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/Mongol.php b/src/translations/Mongol.php index a0bb1119..61445af3 100644 --- a/src/translations/Mongol.php +++ b/src/translations/Mongol.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/Polish.php b/src/translations/Polish.php index f85a013f..00737572 100644 --- a/src/translations/Polish.php +++ b/src/translations/Polish.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/PortugueseBr.php b/src/translations/PortugueseBr.php index f26c3d6f..388f0fac 100644 --- a/src/translations/PortugueseBr.php +++ b/src/translations/PortugueseBr.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/PortuguesePt.php b/src/translations/PortuguesePt.php index c713dcf7..807ad8ef 100644 --- a/src/translations/PortuguesePt.php +++ b/src/translations/PortuguesePt.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/Romanian.php b/src/translations/Romanian.php index d3233d04..a604fcec 100644 --- a/src/translations/Romanian.php +++ b/src/translations/Romanian.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/Russian.php b/src/translations/Russian.php index 3a61b037..4fa2d83e 100644 --- a/src/translations/Russian.php +++ b/src/translations/Russian.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/RussianUtf8.php b/src/translations/RussianUtf8.php index 74d1abff..83360c83 100644 --- a/src/translations/RussianUtf8.php +++ b/src/translations/RussianUtf8.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/Slovak.php b/src/translations/Slovak.php index eed0c99f..6d18d409 100644 --- a/src/translations/Slovak.php +++ b/src/translations/Slovak.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/Spanish.php b/src/translations/Spanish.php index 6998b5eb..a39c3b6c 100644 --- a/src/translations/Spanish.php +++ b/src/translations/Spanish.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/Swedish.php b/src/translations/Swedish.php index 0fb41e08..be3e205f 100644 --- a/src/translations/Swedish.php +++ b/src/translations/Swedish.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/Turkish.php b/src/translations/Turkish.php index 56be0436..f2009944 100644 --- a/src/translations/Turkish.php +++ b/src/translations/Turkish.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/translations/Ukrainian.php b/src/translations/Ukrainian.php index 5e8a5534..b8ba7c2f 100644 --- a/src/translations/Ukrainian.php +++ b/src/translations/Ukrainian.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\Translations; diff --git a/src/xhtml/HTMLController.php b/src/xhtml/HTMLController.php index 7063ac72..2e08a8d1 100644 --- a/src/xhtml/HTMLController.php +++ b/src/xhtml/HTMLController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\XHtml; @@ -104,7 +104,7 @@ class HTMLController if (!isset($link['fields'])) { $link['fields'] = $_REQUEST; } - $from = $from ? $from : __METHOD__; + $from = $from ?: __METHOD__; $tag = '<a '; foreach ($link['attr'] as $attr => $value) { @@ -136,9 +136,9 @@ class HTMLController * @return string with the generated HTML select box * * @internal param $ (optional) $bBlankEntry bool to specify whether or not we want a blank selection - * @internal param $ (optional) $szDefault string to specify the default VALUE selected * @internal param $ (optional) $bMultiple bool to specify whether or not we want a multi select combo box * @internal param $ (optional) $iSize int to specify the size IF a multi select combo + * @internal param $ (optional) $szDefault string to specify the default VALUE selected */ public static function printCombo( &$arrOptions, @@ -195,7 +195,7 @@ class HTMLController */ protected function getActionUrl(&$action, &$fields, $from = null) { - $from = $from ? $from : __METHOD__; + $from = $from ?: __METHOD__; $url = Decorator::get_sanitized_value($action['url'], $fields); diff --git a/src/xhtml/HTMLFooterController.php b/src/xhtml/HTMLFooterController.php index b232fb69..7abdc493 100644 --- a/src/xhtml/HTMLFooterController.php +++ b/src/xhtml/HTMLFooterController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\XHtml; @@ -67,10 +67,11 @@ class HTMLFooterController extends HTMLController $this->view->offsetSet('reload', $reload_param); $this->view->offsetSet('footer_template', $template); $this->view->offsetSet('print_bottom_link', !$this->_no_bottom_link); + if (!$this->view->offsetExists('excludeJsTree')) { $this->view->offsetSet('excludeJsTree', false); } - $template = $this->view->offsetGet('excludeJsTree') === true && $template === 'footer_sqledit.twig' ? $template : 'footer.twig'; + $template = $this->view->offsetGet('excludeJsTree') === true && 'footer_sqledit.twig' === $template ? $template : 'footer.twig'; $footer_html = $this->view->fetch($template); if ($doBody) { @@ -120,6 +121,8 @@ class HTMLFooterController extends HTMLController * and 'browse' is the place inside that code (doBrowse). * @param bool $do_print if true, print html, if false, return html * @param mixed $from can either be null, false or the method calling this one + * + * @return null|string */ public function printNavLinks($navlinks, $place, $env, $do_print, $from) { diff --git a/src/xhtml/HTMLHeaderController.php b/src/xhtml/HTMLHeaderController.php index dd1a6a6d..eeaf5440 100644 --- a/src/xhtml/HTMLHeaderController.php +++ b/src/xhtml/HTMLHeaderController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\XHtml; @@ -50,7 +50,7 @@ class HTMLHeaderController extends HTMLController $viewVars['dir'] = (0 !== \strcasecmp($lang['applangdir'], 'ltr')) ? ' dir="' . \htmlspecialchars($lang['applangdir']) . '"' : ''; $viewVars['headertemplate'] = $template; - $viewVars['headerFlags'][str_replace('.twig', '', basename($template))] = 1; + $viewVars['headerFlags'][\str_replace('.twig', '', \basename($template))] = 1; $viewVars['includeJsTree'] = true; //$viewVars['excludeJsTree']=$template==='header_sqledit.twig'; $viewVars['title'] = ('' !== $title) ? ' - ' . $title : ''; @@ -58,6 +58,7 @@ class HTMLHeaderController extends HTMLController $viewVars['appName'] = \htmlspecialchars($this->appName); $reload_param = 'none'; + if ($this->view->getReloadBrowser()) { $reload_param = 'other'; } elseif ($this->_reload_drop_database) { @@ -65,10 +66,11 @@ class HTMLHeaderController extends HTMLController } $viewVars['reload'] = $reload_param; $viewVars['script'] = $script; + if (!$this->view->offsetExists('excludeJsTree')) { $this->view->offsetSet('excludeJsTree', false); } - $template = $this->view->offsetGet('excludeJsTree') === true && $template === 'header_sqledit.twig' ? $template : 'header.twig'; + $template = $this->view->offsetGet('excludeJsTree') === true && 'header_sqledit.twig' === $template ? $template : 'header.twig'; $header_html = $this->view->fetch($template, $viewVars); /*$plugins_head = []; @@ -91,9 +93,9 @@ class HTMLHeaderController extends HTMLController /** * Prints the page body. * - * @param bool $doBody True to output body tag, false to return - * @param string $bodyClass - name of body class - * @param bool $onloadInit - if true, call init() on body load event + * @param bool $doBody True to output body tag, false to return + * @param string $bodyClass - name of body class + * @param bool $onloadInit - if true, call init() on body load event * @param bool $includeJsTree - if true, include the jstree section * * @return string the parsed template @@ -104,13 +106,12 @@ class HTMLHeaderController extends HTMLController $onloadInit = false, $includeJsTree = true ) { - // $includeJsTree=$includeJsTree||( $this->view->offsetExists('includeJsTree')?$this->view->offsetGet('includeJsTree'):false); $viewVars = [ 'bodyClass' => $this->lang['applangdir'] . ' ' . \htmlspecialchars($bodyClass) . ' ' . $includeJsTree ? 'flexbox_body' : '', 'onload' => ($onloadInit ? 'onload="init();" ' : ''), 'controller_name' => $this->controller_name, - 'includeJsTree' => $includeJsTree + 'includeJsTree' => $includeJsTree, ]; $bodyHtml = $this->view->fetch('components/common_body.twig', $viewVars); diff --git a/src/xhtml/HTMLNavbarController.php b/src/xhtml/HTMLNavbarController.php index a96dad03..e355945a 100644 --- a/src/xhtml/HTMLNavbarController.php +++ b/src/xhtml/HTMLNavbarController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\XHtml; @@ -24,7 +24,7 @@ class HTMLNavbarController extends HTMLController */ public function printTrail($trail = [], $do_print = true, $from = null) { - $from = $from ? $from : __METHOD__; + $from = $from ?: __METHOD__; $trail_html = $this->printTopbar(false, $from); @@ -44,9 +44,13 @@ class HTMLNavbarController extends HTMLController 'crumbs' => $crumbs, 'controller_name' => $this->controller_name, ]; - $viewVars = $this->_getSearchPathsCrumbs($crumbs, $viewVars); + $containerInstance = $this->getContainer(); + $requestVars = $containerInstance->getAllRequestVars(); + + $viewVars = $this->_getSearchPathsCrumbs($crumbs, $viewVars, $requestVars); + + $trail_html .= $containerInstance->view->fetch('components/trail.twig', $viewVars); - $trail_html .= $this->getContainer()->view->fetch('components/trail.twig', $viewVars); if ($do_print) { echo $trail_html; @@ -90,7 +94,7 @@ class HTMLNavbarController extends HTMLController */ public function printTabs($alltabs, $activetab, $do_print = true, $from = null) { - $from = $from ? $from : __METHOD__; + $from = $from ?: __METHOD__; $this->misc = $this->misc; $_SESSION['webdbLastTab'] = $_SESSION['webdbLastTab'] ?? []; @@ -146,9 +150,11 @@ class HTMLNavbarController extends HTMLController } /** - * @return (mixed|string)[][] - * * @psalm-return array<array-key, array{url: string, iconalt?: mixed|string, title?: mixed, icon?: string, text?: mixed, helpurl?: string}> + * + * @param mixed $trail + * + * @return (mixed|string)[][] */ private function _getCrumbs($trail) { @@ -182,11 +188,10 @@ class HTMLNavbarController extends HTMLController /** * @param mixed $crumbs - * @param array $viewVars * * @return array */ - private function _getSearchPathsCrumbs($crumbs, array $viewVars) + private function _getSearchPathsCrumbs($crumbs, array $viewVars, array $requestVars = []) { $data = $this->misc->getDatabaseAccessor(); $lang = $this->lang; @@ -197,7 +202,7 @@ class HTMLNavbarController extends HTMLController $search_paths = $data->getSearchPath(); foreach ($search_paths as $schema) { - $destination = $this->container->getDestinationWithLastTab('database'); + $destination = $this->container->getDestinationWithLastTab('database', $requestVars); $search_path_crumbs[$schema] = [ 'title' => $lang['strschema'], 'text' => $schema, @@ -222,7 +227,7 @@ class HTMLNavbarController extends HTMLController */ private function printTopbar($do_print = true, $from = null): ?string { - $from = $from ? $from : __METHOD__; + $from = $from ?: __METHOD__; $lang = $this->lang; @@ -234,7 +239,7 @@ class HTMLNavbarController extends HTMLController $server_id = $this->misc->getServerId(); $reqvars = $this->misc->getRequestVars('table'); - $topbar_html = '<div class="topbar" data-controller="' . $this->controller_name . '"><table style="width: 100%"><tr><td>'; + $topbar_html = '<div class="topbar" data-controller="' . $this->controller_name . '"><div class="platform">'; if ($server_info && isset($server_info['platform'], $server_info['username'])) { // top left informations when connected @@ -246,7 +251,7 @@ class HTMLNavbarController extends HTMLController '<span class="username">' . \htmlspecialchars($server_info['username']) . '</span>' ); - $topbar_html .= '</td>'; + $topbar_html .= '</div>'; // top right informations when connected @@ -275,7 +280,6 @@ class HTMLNavbarController extends HTMLController ]), ], 'id' => 'toplink_history', - ], 'content' => $lang['strhistory'], ], @@ -313,36 +317,39 @@ class HTMLNavbarController extends HTMLController 'toplinks' => &$toplinks, ]; - $topbar_html .= '<td style="text-align: right">'; - $toplinks = $this->printLinksList($toplinks, 'toplink', false, $from); + $topbar_html .= '<div class="toplinks">'; + $toplinks_html = ''; - if (strpos($toplinks, 'toplink_popup') !== false) { - $topbar_html .= str_replace( - [ - '<li>', - '</li>', '<a', '/a>', + foreach ($toplinks as $link) { + $toplinks_html .= \str_replace('.php', '', $this->printLink($link, false, $from)) . \PHP_EOL; + } + if (\mb_strpos($toplinks_html, 'toplink_popup') !== false) { + $topbar_html .= \str_replace( + [ + '<a', + '/a>', 'id="toplink_logout" href', 'class="toplink_popup" href', - 'src/views/', 'target="sqledit"' + 'src/views/', + 'target="sqledit"', ], [ - '', '', '<button', '/button>', 'id="toplink_logout" rel', - - 'class="toplink_popup" rel', '', 'target="_blank" ' + 'class="toplink_popup" rel', + '', + 'target="_blank" ', ], - $toplinks + $toplinks_html ); } - $topbar_html .= '</td>'; } else { $topbar_html .= "<span class=\"appname\">{$appName}</span> <span class=\"version\">{$appVersion}</span>"; } - $topbar_html .= '</tr></table></div>' . \PHP_EOL; + $topbar_html .= '</div></div>' . \PHP_EOL; if ($do_print) { echo $topbar_html; @@ -369,7 +376,9 @@ class HTMLNavbarController extends HTMLController * * @param null|string $subject sunkect of the trail * - * @return array the trail array + * @return (mixed|null|string)[][] the trail array + * + * @psalm-return array<array-key, array<array-key, mixed|null|string>> */ private function _getTrail($subject = null) { @@ -505,6 +514,13 @@ class HTMLNavbarController extends HTMLController return $trail; } + /** + * @param (mixed|string)[][] $trail + * + * @return (mixed|null|string)[][] + * + * @psalm-return array<array-key, array<array-key, mixed|null|string>> + */ private function _getLastTrailPart(string $subject, $trail) { $lang = $this->lang; diff --git a/src/xhtml/HTMLTableController.php b/src/xhtml/HTMLTableController.php index 8a6f2e9e..e4ce2194 100644 --- a/src/xhtml/HTMLTableController.php +++ b/src/xhtml/HTMLTableController.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\XHtml; @@ -96,6 +96,9 @@ class HTMLTableController extends HTMLController } /** + * @param mixed $turn_into_datatable + * @param mixed $with_body + * * @return string */ public function printTable($turn_into_datatable = true, $with_body = true) @@ -153,7 +156,7 @@ class HTMLTableController extends HTMLController foreach ($columns as $column_id => $column) { // Handle cases where no class has been passed - + $class = (isset($column['class']) && '' !== $column['class']) ? $column['class'] : ''; switch ($column_id) { @@ -165,7 +168,7 @@ class HTMLTableController extends HTMLController break; default: - $thead_html .= '<th class="data' . $class . ' '.$column_id.'">'; + $thead_html .= '<th class="data' . $class . ' ' . $column_id . '">'; if (isset($column['help'])) { $thead_html .= $this->view->printHelp($column['title'], $column['help'], false); @@ -348,18 +351,19 @@ class HTMLTableController extends HTMLController if (null !== $val) { $type = $column['type'] ?? null; $params = $column['params'] ?? []; - $parsedValue= $this->misc->printVal($val, $type, $params); + $parsedValue = $this->misc->printVal($val, $type, $params); + if (isset($column['url'])) { - $column['url']=str_replace(sprintf('%s%s',$this->container->subFolder,$this->container->subFolder),$this->container->subFolder.'/',$column['url']??''); - $parsedurl=parse_url($column['url']); - $parsedVars=implode('&',[$parsedurl['query']??null,$this->printUrlVars($column['vars'], $tabledata->fields, false)]); - $column['url']=$parsedurl['path']??'/'; + $column['url'] = \str_replace(\sprintf('%s%s', $this->container->subFolder, $this->container->subFolder), $this->container->subFolder . '/', $column['url'] ?? ''); + $parsedurl = \parse_url($column['url']); + $parsedVars = \implode('&', [$parsedurl['query'] ?? null, $this->printUrlVars($column['vars'], $tabledata->fields, false)]); + $column['url'] = $parsedurl['path'] ?? '/'; $tbody_html .= "<a href=\"{$column['url']}?"; $tbody_html .= $parsedVars; $tbody_html .= '">'; - // d($parsedurl,$parsedVars,$parsedValue); + // d($parsedurl,$parsedVars,$parsedValue); } - $tbody_html .=$parsedValue; + $tbody_html .= $parsedValue; if (isset($column['url'])) { $tbody_html .= '</a>'; @@ -392,6 +396,9 @@ class HTMLTableController extends HTMLController } /** + * @param mixed $vars + * @param mixed $fields + * * @return null|string */ private function printUrlVars(&$vars, &$fields, bool $do_print = true) diff --git a/src/xhtml/XHtmlButton.php b/src/xhtml/XHtmlButton.php index 66980924..4c2de918 100644 --- a/src/xhtml/XHtmlButton.php +++ b/src/xhtml/XHtmlButton.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\XHtml; diff --git a/src/xhtml/XHtmlElement.php b/src/xhtml/XHtmlElement.php index dcd600eb..a31b49d5 100644 --- a/src/xhtml/XHtmlElement.php +++ b/src/xhtml/XHtmlElement.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\XHtml; @@ -31,12 +31,10 @@ class XHtmlElement extends XHtmlSimpleElement /** * Adds an xhtml child to element. - * - * @param XHtmlOption $object */ public function add(XHtmlOption &$object): void { - \array_push($this->_siblings, $object); + $this->_siblings[] = $object; } /** @@ -51,6 +49,9 @@ class XHtmlElement extends XHtmlSimpleElement } } + /** + * @return string + */ public function fetch() { return $this->_html(); diff --git a/src/xhtml/XHtmlOption.php b/src/xhtml/XHtmlOption.php index 0c721fca..3ff9f953 100644 --- a/src/xhtml/XHtmlOption.php +++ b/src/xhtml/XHtmlOption.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\XHtml; diff --git a/src/xhtml/XHtmlSelect.php b/src/xhtml/XHtmlSelect.php index e59e608d..c7a6c72a 100644 --- a/src/xhtml/XHtmlSelect.php +++ b/src/xhtml/XHtmlSelect.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\XHtml; diff --git a/src/xhtml/XHtmlSimpleElement.php b/src/xhtml/XHtmlSimpleElement.php index 769b113f..6df8bd5a 100644 --- a/src/xhtml/XHtmlSimpleElement.php +++ b/src/xhtml/XHtmlSimpleElement.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin 6.1.3 + * PHPPgAdmin6 */ namespace PHPPgAdmin\XHtml; @@ -80,6 +80,8 @@ class XHtmlSimpleElement /** * Returns xhtml code. + * + * @return string */ public function fetch() { diff --git a/tests/Feature/ViewTest.php b/tests/Feature/ViewTest.php index 6807194c..3c01fa0a 100644 --- a/tests/Feature/ViewTest.php +++ b/tests/Feature/ViewTest.php @@ -1,65 +1,68 @@ <?php + +/** + * PHPPgAdmin6 + */ + namespace Tests\Feature; -beforeEach(function() { - $this->container=containerInstance(); - $this->container->get('misc')->setNoDBConnection(true); - +beforeEach(function () { + $this->container = containerInstance(); + $this->container->get('misc')->setNoDBConnection(true); }); - -test('view snippet renders the right controller',function($viewName,$methodName,$controller_name) { +test('view snippet renders the right controller', function ($viewName, $methodName, $controller_name) { $_container = $this->container; - require dirname(__DIR__,2) . sprintf('/tests/views/%s.php',$viewName); - @ob_start(); + + require \dirname(__DIR__, 2) . \sprintf('/tests/views/%s.php', $viewName); + \ob_start(); $controller = $methodName($_container); $output = \ob_get_clean(); expect($controller->controller_name)->toBe($controller_name); })->with([ - ['acinsert','acinsertFactory','AcinsertController'], - ['aggregates','aggregatesFactory','AggregatesController'], - ['casts','castsFactory','CastsController'], - ['conversions','conversionsFactory','ConversionsController'], - ['domains','domainsFactory','DomainsController'], - ['fulltext','fulltextFactory','FulltextController'], - ['functions','functionsFactory','FunctionsController'], - ['languages','languagesFactory','LanguagesController'], - ['opclasses','opclassesFactory','OpclassesController'], - ['operators','operatorsFactory','OperatorsController'], - ['rules','rulesFactory','RulesController'], - ['triggers','triggersFactory','TriggersController'], - ['types','typesFactory','TypesController'], - ['dataexport','dataexportFactory','DataexportController'], -['dataimport','dataimportFactory','DataimportController'], -['dbexport','dbexportFactory','DbexportController'], -['display','displayFactory','DisplayController'], -['alldb', 'alldbFactory', 'AlldbController'], -['browser', 'browserFactory', 'BrowserController'], -['database', 'databaseFactory', 'DatabaseController'], -['help', 'helpFactory', 'HelpController'], -['history', 'historyFactory', 'HistoryController'], -['info', 'infoFactory', 'InfoController'], -['intro', 'introFactory', 'IntroController'], -['login', 'loginFactory', 'LoginController'], -['schemas', 'schemasFactory', 'SchemasController'], -['servers', 'serversFactory', 'ServersController'], -['sql', 'sqlFactory', 'SqlController'], -['sqledit', 'sqleditFactory', 'SqleditController'], -['tablespaces','tablespacesFactory', 'TablespacesController'], -['materializedviewproperties','materializedviewpropertiesFactory', 'MaterializedviewpropertiesController'], -['materializedviews','materializedviewsFactory', 'MaterializedviewsController'], -['tables','tablesFactory', 'TablesController'], -['colproperties','colpropertiesFactory', 'ColpropertiesController'], -['constraints','constraintsFactory', 'ConstraintsController'], -['sequences','sequencesFactory', 'SequencesController'], -['indexes','indexesFactory', 'IndexesController'], -['tblproperties','tblpropertiesFactory', 'TblpropertiesController'], -['viewproperties','viewpropertiesFactory', 'ViewpropertiesController'], -['views','viewsFactory', 'ViewsController'], -['groups', 'groupsFactory','GroupsController'], -['privileges', 'privilegesFactory','PrivilegesController'], -['roles', 'rolesFactory','RolesController'], -['users', 'usersFactory','UsersController'] + ['acinsert', 'acinsertFactory', 'AcinsertController'], + ['aggregates', 'aggregatesFactory', 'AggregatesController'], + ['casts', 'castsFactory', 'CastsController'], + ['conversions', 'conversionsFactory', 'ConversionsController'], + ['domains', 'domainsFactory', 'DomainsController'], + ['fulltext', 'fulltextFactory', 'FulltextController'], + ['functions', 'functionsFactory', 'FunctionsController'], + ['languages', 'languagesFactory', 'LanguagesController'], + ['opclasses', 'opclassesFactory', 'OpclassesController'], + ['operators', 'operatorsFactory', 'OperatorsController'], + ['rules', 'rulesFactory', 'RulesController'], + ['triggers', 'triggersFactory', 'TriggersController'], + ['types', 'typesFactory', 'TypesController'], + ['dataexport', 'dataexportFactory', 'DataexportController'], + ['dataimport', 'dataimportFactory', 'DataimportController'], + ['dbexport', 'dbexportFactory', 'DbexportController'], + ['display', 'displayFactory', 'DisplayController'], + ['alldb', 'alldbFactory', 'AlldbController'], + ['browser', 'browserFactory', 'BrowserController'], + ['database', 'databaseFactory', 'DatabaseController'], + ['help', 'helpFactory', 'HelpController'], + ['history', 'historyFactory', 'HistoryController'], + ['info', 'infoFactory', 'InfoController'], + ['intro', 'introFactory', 'IntroController'], + ['login', 'loginFactory', 'LoginController'], + ['schemas', 'schemasFactory', 'SchemasController'], + ['servers', 'serversFactory', 'ServersController'], + ['sql', 'sqlFactory', 'SqlController'], + ['sqledit', 'sqleditFactory', 'SqleditController'], + ['tablespaces', 'tablespacesFactory', 'TablespacesController'], + ['materializedviewproperties', 'materializedviewpropertiesFactory', 'MaterializedviewpropertiesController'], + ['materializedviews', 'materializedviewsFactory', 'MaterializedviewsController'], + ['tables', 'tablesFactory', 'TablesController'], + ['colproperties', 'colpropertiesFactory', 'ColpropertiesController'], + ['constraints', 'constraintsFactory', 'ConstraintsController'], + ['sequences', 'sequencesFactory', 'SequencesController'], + ['indexes', 'indexesFactory', 'IndexesController'], + ['tblproperties', 'tblpropertiesFactory', 'TblpropertiesController'], + ['viewproperties', 'viewpropertiesFactory', 'ViewpropertiesController'], + ['views', 'viewsFactory', 'ViewsController'], + ['groups', 'groupsFactory', 'GroupsController'], + ['privileges', 'privilegesFactory', 'PrivilegesController'], + ['roles', 'rolesFactory', 'RolesController'], + ['users', 'usersFactory', 'UsersController'], ]); - diff --git a/tests/Pest.php b/tests/Pest.php index dc4abeed..1de830fa 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -1,15 +1,8 @@ <?php -/* -|-------------------------------------------------------------------------- -| Test Case -|-------------------------------------------------------------------------- -| -| The closure you provide to your test functions is always bound to a specific PHPUnit test -| case class. By default, that class is "PHPUnit\Framework\TestCase". Of course, you may -| need to change it using the "uses()" function to bind a different classes or traits. -| -*/ +/** + * PHPPgAdmin6 + */ // uses(Tests\TestCase::class)->in('Feature'); @@ -22,9 +15,8 @@ | "expect()" function gives you access to a set of "expectations" methods that you can use | to assert different things. Of course, you may extend the Expectation API at any time. | -*/ + */ - expect()->extend('toBeOne', function () { return $this->toBe(1); }); @@ -38,4 +30,4 @@ expect()->extend('toBeOne', function () { | project that you don't want to repeat in every file. Here you can also expose helpers as | global functions to help you to reduce the number of lines of code in your test files. | -*/ + */ diff --git a/tests/Unit/ContainerTest.php b/tests/Unit/ContainerTest.php index 6f86a19a..c23af327 100644 --- a/tests/Unit/ContainerTest.php +++ b/tests/Unit/ContainerTest.php @@ -1,4 +1,9 @@ <?php + +/** + * PHPPgAdmin6 + */ + namespace Tests\Unit; use PHPPgAdmin\ContainerUtils; @@ -6,33 +11,23 @@ use PHPPgAdmin\Misc; use Psr\Container\ContainerInterface; use Slim\Views\Twig; -beforeEach(function() { - $this->container=containerInstance(); +beforeEach(function () { + $this->container = containerInstance(); $this->container->get('misc')->setNoDBConnection(true); - - }); - - - - it('Ensures container is instance of Slim ContainerInterface',function() { - expect( $this->container)->toBeInstanceOf(ContainerInterface::class); + it('Ensures container is instance of Slim ContainerInterface', function () { + expect($this->container)->toBeInstanceOf(ContainerInterface::class); }); - - it('Ensures container is instance of ContainerUtils',function() { - expect( $this->container)->toBeInstanceOf(ContainerUtils::class); + it('Ensures container is instance of ContainerUtils', function () { + expect($this->container)->toBeInstanceOf(ContainerUtils::class); }); - - it('Ensures container->misc is instance of PHPPgAdmin\Misc',function() { - expect( $this->container->misc)->toBeInstanceOf( Misc::class); + it('Ensures container->misc is instance of PHPPgAdmin\Misc', function () { + expect($this->container->misc)->toBeInstanceOf(Misc::class); }); - - it('Ensures container->view is an instance of Slim\Views\Twig',function() { - expect( $this->container->view)->toBeInstanceOf( Twig::class); + it('Ensures container->view is an instance of Slim\Views\Twig', function () { + expect($this->container->view)->toBeInstanceOf(Twig::class); }); - -
\ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index a0355d1e..9ca23d81 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,10 +11,30 @@ //"emitDeclarationOnly": true, "noEmit": true, + "lib": [ + "WebWorker", + "es6", "dom", "dom.iterable" + ], + "types": [ + "jstree", + "jquery", + "datatables.net", + "codemirror", + "select2", + "workbox-sw" + ], + "typeRoots": ["assets/types"] + }, - "include": ["assets"], + "exclude": ["node_modules"], + "include": [ + "assets/*.ts", + "assets/js/*.js", + "assets/**/*.ts" + + ] -} +}
\ No newline at end of file @@ -950,6 +950,27 @@ dependencies: "@hapi/hoek" "^8.3.0" +"@nodelib/fs.scandir@2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz#d4b3549a5db5de2683e0c1071ab4f140904bbf69" + integrity sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA== + dependencies: + "@nodelib/fs.stat" "2.0.4" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.4", "@nodelib/fs.stat@^2.0.2": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz#a3f2dd61bab43b8db8fa108a121cfffe4c676655" + integrity sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz#cce9396b30aa5afe9e3756608f5831adcb53d063" + integrity sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow== + dependencies: + "@nodelib/fs.scandir" "2.1.4" + fastq "^1.6.0" + "@rollup/plugin-babel@^5.2.0": version "5.2.2" resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-5.2.2.tgz#e5623a01dd8e37e004ba87f2de218c611727d9b2" @@ -1007,11 +1028,37 @@ dependencies: defer-to-connect "^1.0.1" +"@types/codemirror@^0.0.108": + version "0.0.108" + resolved "https://registry.yarnpkg.com/@types/codemirror/-/codemirror-0.0.108.tgz#e640422b666bf49251b384c390cdeb2362585bde" + integrity sha512-3FGFcus0P7C2UOGCNUVENqObEb4SFk+S8Dnxq7K6aIsLVs/vDtlangl3PEO0ykaKXyK56swVF6Nho7VsA44uhw== + dependencies: + "@types/tern" "*" + +"@types/datatables.net@^1.10.19": + version "1.10.19" + resolved "https://registry.yarnpkg.com/@types/datatables.net/-/datatables.net-1.10.19.tgz#17c5f94433f761086131c6c8dc055a0e1099d1f9" + integrity sha512-WuzgytEmsIpVYZbkce+EvK1UqBI7/cwcC/WgYeAtXdq2zi+yWzJwMT5Yb6irAiOi52DBjeAEeRt3bYzFYvHWCQ== + dependencies: + "@types/jquery" "*" + +"@types/estree@*": + version "0.0.46" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.46.tgz#0fb6bfbbeabd7a30880504993369c4bf1deab1fe" + integrity sha512-laIjwTQaD+5DukBZaygQ79K1Z0jb1bPEMRrkXSLjtCcZm+abyp5YbrqpSLzD42FwWW6gK/aS4NYpJ804nG2brg== + "@types/estree@0.0.39": version "0.0.39" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== +"@types/jquery@*": + version "3.5.5" + resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.5.5.tgz#2c63f47c9c8d96693d272f5453602afd8338c903" + integrity sha512-6RXU9Xzpc6vxNrS6FPPapN1SxSHgQ336WC6Jj/N8q30OiaBZ00l1GBgeP7usjVZPivSkGUfL1z/WW6TX989M+w== + dependencies: + "@types/sizzle" "*" + "@types/jquery@^3.5.1": version "3.5.1" resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.5.1.tgz#cebb057acf5071c40e439f30e840c57a30d406c3" @@ -1019,6 +1066,18 @@ dependencies: "@types/sizzle" "*" +"@types/json-schema@^7.0.3": + version "7.0.7" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" + integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== + +"@types/jstree@^3.3.40": + version "3.3.40" + resolved "https://registry.yarnpkg.com/@types/jstree/-/jstree-3.3.40.tgz#835737a262ea2572df9ffafc68c08633f4554aa4" + integrity sha512-+6mdAX+vaj962NSd1nnzSLBWD2obUQf5+1yxR+4/g+abpEIQFsI+CcqP4l+cS6H9P07sTONMbR3Z09bPpDzkNg== + dependencies: + "@types/jquery" "*" + "@types/minimist@^1.2.0": version "1.2.1" resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.1.tgz#283f669ff76d7b8260df8ab7a4262cc83d988256" @@ -1041,11 +1100,190 @@ dependencies: "@types/node" "*" +"@types/select2@^4.0.53": + version "4.0.53" + resolved "https://registry.yarnpkg.com/@types/select2/-/select2-4.0.53.tgz#1eef6cd44179fc2329ced2cc5ab8260ad38ce989" + integrity sha512-5+HxxtKgyR954mFL61pNvKenx55gYinkYfSG5tVeItvmHhc2h+yRiGXNTYSwcrAcrUJ2ewLgOxG3STZRsPEnag== + dependencies: + "@types/jquery" "*" + "@types/sizzle@*": version "2.3.2" resolved "https://registry.yarnpkg.com/@types/sizzle/-/sizzle-2.3.2.tgz#a811b8c18e2babab7d542b3365887ae2e4d9de47" integrity sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg== +"@types/tern@*": + version "0.23.3" + resolved "https://registry.yarnpkg.com/@types/tern/-/tern-0.23.3.tgz#4b54538f04a88c9ff79de1f6f94f575a7f339460" + integrity sha512-imDtS4TAoTcXk0g7u4kkWqedB3E4qpjXzCpD2LU5M5NAXHzCDsypyvXSaG7mM8DKYkCRa7tFp4tS/lp/Wo7Q3w== + dependencies: + "@types/estree" "*" + +"@types/workbox-background-sync@*": + version "4.3.1" + resolved "https://registry.yarnpkg.com/@types/workbox-background-sync/-/workbox-background-sync-4.3.1.tgz#fcde451d654f207f2a402ed92e793b884ae2f369" + integrity sha512-AIsG/+W15Li31mzYe0vRk/zVFgFwc7bJRq05d5cXcxour9XITyWrzgLhpntKFOUD2i51LRvf3I1MmNQJdH9OTw== + dependencies: + "@types/workbox-core" "*" + +"@types/workbox-broadcast-update@*": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@types/workbox-broadcast-update/-/workbox-broadcast-update-4.3.0.tgz#b908a8b6776058e0e1c5e760db066462acb569d2" + integrity sha512-YSaXuGLknt1Apl/fZUMAB9BwKqpzZCi/HmpSJ/McTM9UihXzz+MFbv5Pxy+hFhKnu/YFxblAZvH6x2pOeylJFA== + dependencies: + "@types/workbox-core" "*" + +"@types/workbox-cacheable-response@*": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@types/workbox-cacheable-response/-/workbox-cacheable-response-4.3.0.tgz#506a37bc67809607f50dc785a06dd20d74e73a85" + integrity sha512-zY6dLWlmbIf6mQvUOR8qD8gz2EfmJ+/KjGQl/NMcsk3OBwLGCRnxVlOAiUrFsHRZSnUMo6gip1lwLOEvUjPIRQ== + dependencies: + "@types/workbox-core" "*" + +"@types/workbox-core@*": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@types/workbox-core/-/workbox-core-4.3.0.tgz#c2f2a2caad4785f6ccdbef539477d49de6cc9160" + integrity sha512-0Tn2bbwYu+Exsp4L3lBA2voRi/7m+6qjgGIs4Lw3Hdm8+7caxAVRra6imkd9Wl3DmK0tKPHinKuo+ElXuqUvlg== + +"@types/workbox-expiration@*": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@types/workbox-expiration/-/workbox-expiration-4.3.0.tgz#a442335f262a54aa87cdb37099005dd2899e8a03" + integrity sha512-fxPC5w+LNAn6ddQXKe84j9+C7bwNcMplw/QvnHjzAuTFW/oHC/8geHKTs4aoIMjUdRJrtFND5/lthivBynWwJw== + dependencies: + "@types/workbox-core" "*" + +"@types/workbox-google-analytics@*": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@types/workbox-google-analytics/-/workbox-google-analytics-4.3.0.tgz#5531c27b5d3556b9aa9abb548acba3f449a63b9c" + integrity sha512-0XEhUYRh4WLVKYkGaLZhwM7rDZjy2RqxYfJr2b7OuRLadRgiK2XPso1uwGi1l4oXqlt8Ya3alyFDfKt54pm3QQ== + +"@types/workbox-navigation-preload@*": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@types/workbox-navigation-preload/-/workbox-navigation-preload-4.3.0.tgz#4d0b56d9186d9cb983e8891bc6fcbb41eb548dd2" + integrity sha512-yv4iMch2cM1rW2GTFjtEHAmUJfYtWnHENdR9TrjziO47czDSulLU/UzflmS/L9alQNP7GyHpegDWBJwtKad/Mg== + +"@types/workbox-precaching@*": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@types/workbox-precaching/-/workbox-precaching-4.3.0.tgz#c04b5b6c9f77690b0b58cf87c6f8ef632661f8e1" + integrity sha512-nnnFemK7X6kfJi7u3cZ2qkHCsWFJn+AUtBgBb8UJB7VxongJsBK/QTVbmMGhvIXBb/xkRpoa52VI2rtZLoB3hA== + dependencies: + "@types/workbox-core" "*" + +"@types/workbox-range-requests@*": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@types/workbox-range-requests/-/workbox-range-requests-4.3.0.tgz#fb56ec7322ea1bf93c2b73114c6e9878ae9c36f8" + integrity sha512-IlZcWZtGlpT4OhEdCdWeMkHHOO5yVwDqmuJq1WtgtjyIwm/mwwVPYGLVeVOE62m8sQ2L9Ziqfem2h9UmabBDmg== + dependencies: + "@types/workbox-core" "*" + +"@types/workbox-routing@*": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@types/workbox-routing/-/workbox-routing-4.3.0.tgz#617e00b18806630cffff550b3d2ab09866f89411" + integrity sha512-op5P/f6n+9g5X4a+sYONp9EALnNxpoU3oXuB/BjeQv9d+k0bNE4LYSF06K6tXYL4PeCIZVJOi4yMCUCOi2NaqQ== + +"@types/workbox-strategies@*": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@types/workbox-strategies/-/workbox-strategies-4.3.0.tgz#5fde9a05db2874500221d3bb8d35c80dc998f41a" + integrity sha512-QTQQOZK2qNy24jXLt83SlqEmuEaQcubQ23515OFDBUpyVow2cYpxF2vzH3fEx7kIXQO/OS1UFNriTEitCHyxyA== + dependencies: + "@types/workbox-core" "*" + "@types/workbox-routing" "*" + +"@types/workbox-streams@*": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@types/workbox-streams/-/workbox-streams-4.3.0.tgz#eaae51894b9943fb44e726e35afd3d98e83edcb6" + integrity sha512-PYI7eAOQ9Dj/cu/WcROOfSsn29pC9gjCudK+hQBSWgAaxfHBmNFQGh7EvtZ3BzOJhjj3O0pEV5l6aA55oBRxBQ== + dependencies: + "@types/workbox-routing" "*" + +"@types/workbox-sw@^4.3.1": + version "4.3.1" + resolved "https://registry.yarnpkg.com/@types/workbox-sw/-/workbox-sw-4.3.1.tgz#93d8f95d352c63614debfbe3ac46d34bf2c60089" + integrity sha512-QCO7qBZLKOauTTUqQEwsMMsV0A2Sv4oDaIqu6B19NHTjMERQrKdZXAqGHrpkHtNPmXsORSig1woQxqQmt6AAuA== + dependencies: + "@types/workbox-background-sync" "*" + "@types/workbox-broadcast-update" "*" + "@types/workbox-cacheable-response" "*" + "@types/workbox-core" "*" + "@types/workbox-expiration" "*" + "@types/workbox-google-analytics" "*" + "@types/workbox-navigation-preload" "*" + "@types/workbox-precaching" "*" + "@types/workbox-range-requests" "*" + "@types/workbox-routing" "*" + "@types/workbox-strategies" "*" + "@types/workbox-streams" "*" + +"@typescript-eslint/eslint-plugin@^4.19.0": + version "4.19.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.19.0.tgz#56f8da9ee118fe9763af34d6a526967234f6a7f0" + integrity sha512-CRQNQ0mC2Pa7VLwKFbrGVTArfdVDdefS+gTw0oC98vSI98IX5A8EVH4BzJ2FOB0YlCmm8Im36Elad/Jgtvveaw== + dependencies: + "@typescript-eslint/experimental-utils" "4.19.0" + "@typescript-eslint/scope-manager" "4.19.0" + debug "^4.1.1" + functional-red-black-tree "^1.0.1" + lodash "^4.17.15" + regexpp "^3.0.0" + semver "^7.3.2" + tsutils "^3.17.1" + +"@typescript-eslint/experimental-utils@4.19.0": + version "4.19.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.19.0.tgz#9ca379919906dc72cb0fcd817d6cb5aa2d2054c6" + integrity sha512-9/23F1nnyzbHKuoTqFN1iXwN3bvOm/PRIXSBR3qFAYotK/0LveEOHr5JT1WZSzcD6BESl8kPOG3OoDRKO84bHA== + dependencies: + "@types/json-schema" "^7.0.3" + "@typescript-eslint/scope-manager" "4.19.0" + "@typescript-eslint/types" "4.19.0" + "@typescript-eslint/typescript-estree" "4.19.0" + eslint-scope "^5.0.0" + eslint-utils "^2.0.0" + +"@typescript-eslint/parser@^4.19.0": + version "4.19.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.19.0.tgz#4ae77513b39f164f1751f21f348d2e6cb2d11128" + integrity sha512-/uabZjo2ZZhm66rdAu21HA8nQebl3lAIDcybUoOxoI7VbZBYavLIwtOOmykKCJy+Xq6Vw6ugkiwn8Js7D6wieA== + dependencies: + "@typescript-eslint/scope-manager" "4.19.0" + "@typescript-eslint/types" "4.19.0" + "@typescript-eslint/typescript-estree" "4.19.0" + debug "^4.1.1" + +"@typescript-eslint/scope-manager@4.19.0": + version "4.19.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.19.0.tgz#5e0b49eca4df7684205d957c9856f4e720717a4f" + integrity sha512-GGy4Ba/hLXwJXygkXqMzduqOMc+Na6LrJTZXJWVhRrSuZeXmu8TAnniQVKgj8uTRKe4igO2ysYzH+Np879G75g== + dependencies: + "@typescript-eslint/types" "4.19.0" + "@typescript-eslint/visitor-keys" "4.19.0" + +"@typescript-eslint/types@4.19.0": + version "4.19.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.19.0.tgz#5181d5d2afd02e5b8f149ebb37ffc8bd7b07a568" + integrity sha512-A4iAlexVvd4IBsSTNxdvdepW0D4uR/fwxDrKUa+iEY9UWvGREu2ZyB8ylTENM1SH8F7bVC9ac9+si3LWNxcBuA== + +"@typescript-eslint/typescript-estree@4.19.0": + version "4.19.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.19.0.tgz#8a709ffa400284ab72df33376df085e2e2f61147" + integrity sha512-3xqArJ/A62smaQYRv2ZFyTA+XxGGWmlDYrsfZG68zJeNbeqRScnhf81rUVa6QG4UgzHnXw5VnMT5cg75dQGDkA== + dependencies: + "@typescript-eslint/types" "4.19.0" + "@typescript-eslint/visitor-keys" "4.19.0" + debug "^4.1.1" + globby "^11.0.1" + is-glob "^4.0.1" + semver "^7.3.2" + tsutils "^3.17.1" + +"@typescript-eslint/visitor-keys@4.19.0": + version "4.19.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.19.0.tgz#cbea35109cbd9b26e597644556be4546465d8f7f" + integrity sha512-aGPS6kz//j7XLSlgpzU2SeTqHPsmRYxFztj2vPuMMFJXZudpRSehE3WCV+BaxwZFvfAqMoSd86TEuM0PQ59E/A== + dependencies: + "@typescript-eslint/types" "4.19.0" + eslint-visitor-keys "^2.0.0" + acorn-jsx@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" @@ -1117,7 +1355,7 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.1.0: +ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== @@ -1164,6 +1402,11 @@ array-slice@^1.0.0: resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.1.0.tgz#e368ea15f89bc7069f7ffb89aec3a6c7d4ac22d4" integrity sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w== +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + array-unique@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" @@ -1174,6 +1417,11 @@ arrify@^1.0.1: resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" @@ -1375,6 +1623,13 @@ braces@^2.3.1, braces@^2.3.2: split-string "^3.0.2" to-regex "^3.0.1" +braces@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + browserslist@^4.14.5, browserslist@^4.15.0: version "4.16.0" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.0.tgz#410277627500be3cb28a1bfe037586fbedf9488b" @@ -1464,6 +1719,18 @@ caniuse-lite@^1.0.30001165: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001171.tgz#3291e11e02699ad0a29e69b8d407666fc843eba7" integrity sha512-5Alrh8TTYPG9IH4UkRqEBZoEToWRLvPbSQokvzSz0lii8/FOWKG4keO1HoYfPWs8IF/NH/dyNPg1cmJGvV3Zlg== +chai@^4.2.0: + version "4.3.4" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.4.tgz#b55e655b31e1eac7099be4c08c21964fce2e6c49" + integrity sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA== + dependencies: + assertion-error "^1.1.0" + check-error "^1.0.2" + deep-eql "^3.0.1" + get-func-name "^2.0.0" + pathval "^1.1.1" + type-detect "^4.0.5" + chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" @@ -1505,6 +1772,11 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== +check-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" + integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= + chokidar@^2.0.0: version "2.1.8" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" @@ -1561,6 +1833,15 @@ cli-width@^3.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + clone-response@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" @@ -1635,6 +1916,21 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= +concurrently@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-6.0.0.tgz#c1a876dd99390979c71f8c6fe6796882f3a13199" + integrity sha512-Ik9Igqnef2ONLjN2o/OVx1Ow5tymVvvEwQeYCQdD/oV+CN9oWhxLk7ibcBdOtv0UzBqHCEKRwbKceYoTK8t3fQ== + dependencies: + chalk "^4.1.0" + date-fns "^2.16.1" + lodash "^4.17.20" + read-pkg "^5.2.0" + rxjs "^6.6.3" + spawn-command "^0.0.2-1" + supports-color "^8.1.0" + tree-kill "^1.2.2" + yargs "^16.2.0" + configstore@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/configstore/-/configstore-5.0.1.tgz#d365021b5df4b98cdd187d6a3b0e3f6a7cc5ed96" @@ -1698,6 +1994,11 @@ crypto-random-string@^2.0.0: resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== +date-fns@^2.16.1: + version "2.19.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.19.0.tgz#65193348635a28d5d916c43ec7ce6fbd145059e1" + integrity sha512-X3bf2iTPgCAQp9wvjOQytnf5vO5rESYRXlPIVcgSbtT5OTScPcsf9eZU+B/YIkKAtYr5WeCii58BgATrNitlWg== + debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -1744,6 +2045,13 @@ decompress-response@^3.3.0: dependencies: mimic-response "^1.0.0" +deep-eql@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" + integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== + dependencies: + type-detect "^4.0.0" + deep-extend@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" @@ -1800,6 +2108,13 @@ define-property@^2.0.2: is-descriptor "^1.0.2" isobject "^3.0.1" +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + doctrine@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" @@ -1887,12 +2202,10 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -eslint-config-prettier@^6.11.0: - version "6.11.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz#f6d2238c1290d01c859a8b5c1f7d352a0b0da8b1" - integrity sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA== - dependencies: - get-stdin "^6.0.0" +eslint-config-prettier@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-7.2.0.tgz#f4a4bd2832e810e8cc7c1411ec85b3e85c0c53f9" + integrity sha512-rV4Qu0C3nfJKPOAhFujFxB7RMP+URFyQqqOZW9DMRD7ZDTFyjaIlETU3xzHELt++4ugC0+Jm084HQYkkJe+Ivg== eslint-plugin-prettier@^3.1.4: version "3.1.4" @@ -1901,7 +2214,7 @@ eslint-plugin-prettier@^3.1.4: dependencies: prettier-linter-helpers "^1.0.0" -eslint-scope@^5.1.0: +eslint-scope@^5.0.0, eslint-scope@^5.1.0: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== @@ -1909,7 +2222,7 @@ eslint-scope@^5.1.0: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-utils@^2.1.0: +eslint-utils@^2.0.0, eslint-utils@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== @@ -1921,6 +2234,11 @@ eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3 resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== +eslint-visitor-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" + integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== + eslint@^7.8.1: version "7.8.1" resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.8.1.tgz#e59de3573fb6a5be8ff526c791571646d124a8fa" @@ -2078,6 +2396,18 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== +fast-glob@^3.1.1: + version "3.2.5" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.5.tgz#7939af2a656de79a4f1901903ee8adcaa7cb9661" + integrity sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.0" + merge2 "^1.3.0" + micromatch "^4.0.2" + picomatch "^2.2.1" + fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -2088,6 +2418,13 @@ fast-levenshtein@^2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= +fastq@^1.6.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.11.0.tgz#bb9fb955a07130a918eb63c1f5161cc32a5d0858" + integrity sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g== + dependencies: + reusify "^1.0.4" + figures@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" @@ -2117,6 +2454,13 @@ fill-range@^4.0.0: repeat-string "^1.6.1" to-regex-range "^2.1.0" +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -2201,6 +2545,16 @@ gensync@^1.0.0-beta.1: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-func-name@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" + integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= + get-intrinsic@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.0.2.tgz#6820da226e50b24894e08859469dc68361545d49" @@ -2215,11 +2569,6 @@ get-own-enumerable-property-symbols@^3.0.0: resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" integrity sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g== -get-stdin@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" - integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== - get-stream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -2254,6 +2603,13 @@ glob-parent@^5.0.0: dependencies: is-glob "^4.0.1" +glob-parent@^5.1.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + glob-watcher@^5.0.5: version "5.0.5" resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-5.0.5.tgz#aa6bce648332924d9a8489be41e3e5c52d4186dc" @@ -2311,6 +2667,18 @@ globals@^9.18.0: resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== +globby@^11.0.1: + version "11.0.3" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.3.tgz#9b1f0cb523e171dd1ad8c7b2a9fb4b644b9593cb" + integrity sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.1.1" + ignore "^5.1.4" + merge2 "^1.3.0" + slash "^3.0.0" + got@^9.6.0: version "9.6.0" resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" @@ -2435,6 +2803,11 @@ ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== +ignore@^5.1.4: + version "5.1.8" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" + integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== + image-size@~0.5.0: version "0.5.5" resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c" @@ -2670,6 +3043,11 @@ is-number@^3.0.0: dependencies: kind-of "^3.0.2" +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + is-obj@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" @@ -2758,6 +3136,11 @@ jest-worker@^26.2.1: merge-stream "^2.0.0" supports-color "^7.0.0" +jquery@>=1.9.1: + version "3.6.0" + resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.0.tgz#c72a09f15c1bdce142f49dbf1170bdf8adac2470" + integrity sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw== + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -2822,6 +3205,13 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" +jstree@^3.3.11: + version "3.3.11" + resolved "https://registry.yarnpkg.com/jstree/-/jstree-3.3.11.tgz#da2f12bcab6af61839586c81db46e8f2e19160aa" + integrity sha512-9ZJKroPjCyjb6JLPuAbBrLJKT6pS1f4m5gkwoEagG5oQWtvzm0IiDsntXTxeFtz7AmqrKfij+gLfF9MgWriNxg== + dependencies: + jquery ">=1.9.1" + just-debounce@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/just-debounce/-/just-debounce-1.0.0.tgz#87fccfaeffc0b68cd19d55f6722943f929ea35ea" @@ -2941,6 +3331,11 @@ lodash@^4.12.0, lodash@^4.15.0, lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.2 resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== +lodash@^4.17.15: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + log-symbols@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920" @@ -3090,6 +3485,11 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== +merge2@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" @@ -3109,6 +3509,14 @@ micromatch@^3.1.10, micromatch@^3.1.4: snapdragon "^0.8.1" to-regex "^3.0.2" +micromatch@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" + integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== + dependencies: + braces "^3.0.1" + picomatch "^2.0.5" + mime@^1.4.1: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" @@ -3435,7 +3843,17 @@ path-parse@^1.0.6: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== -picomatch@^2.2.2: +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +pathval@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== + +picomatch@^2.0.5, picomatch@^2.2.1, picomatch@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== @@ -3535,6 +3953,11 @@ pupa@^2.0.1: dependencies: escape-goat "^2.0.0" +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + quick-lru@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" @@ -3659,7 +4082,7 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexpp@^3.1.0: +regexpp@^3.0.0, regexpp@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== @@ -3717,6 +4140,11 @@ repeat-string@^1.6.1: resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" @@ -3762,6 +4190,11 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + rimraf@2.6.3: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" @@ -3791,6 +4224,13 @@ run-async@^2.4.0: resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + rxjs@^6.6.0: version "6.6.3" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552" @@ -3798,6 +4238,13 @@ rxjs@^6.6.0: dependencies: tslib "^1.9.0" +rxjs@^6.6.3: + version "6.6.6" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.6.tgz#14d8417aa5a07c5e633995b525e1e3c0dec03b70" + integrity sha512-/oTwee4N4iWzAMAL9xdGKjkEHmIwupR3oXbQjCKywF1BeFohswF3vZdogbmEF6pZkOsXTzWkrZszrWpQTByYVg== + dependencies: + tslib "^1.9.0" + safe-buffer@^5.1.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -3849,6 +4296,13 @@ semver@^7.2.1: dependencies: lru-cache "^6.0.0" +semver@^7.3.2: + version "7.3.5" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== + dependencies: + lru-cache "^6.0.0" + serialize-javascript@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" @@ -3899,6 +4353,11 @@ signal-exit@^3.0.2: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + slice-ansi@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" @@ -3982,6 +4441,11 @@ sourcemap-codec@^1.4.4: resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== +spawn-command@^0.0.2-1: + version "0.0.2-1" + resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2-1.tgz#62f5e9466981c1b796dc5929937e11c9c6921bd0" + integrity sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A= + spdx-correct@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" @@ -4051,6 +4515,15 @@ string-width@^4.0.0, string-width@^4.1.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" +string-width@^4.2.0: + version "4.2.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" + integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -4136,6 +4609,13 @@ supports-color@^7.0.0, supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +supports-color@^8.1.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + table@^5.2.3: version "5.4.6" resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" @@ -4222,6 +4702,13 @@ to-regex-range@^2.1.0: is-number "^3.0.0" repeat-string "^1.6.1" +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + to-regex@^3.0.1, to-regex@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" @@ -4232,6 +4719,11 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" +tree-kill@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" + integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== + trim-newlines@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.0.tgz#79726304a6a898aa8373427298d54c2ee8b1cb30" @@ -4242,7 +4734,7 @@ tslib@^1.10.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== -tslib@^1.9.0: +tslib@^1.8.1, tslib@^1.9.0: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -4252,6 +4744,13 @@ tslib@^2.0.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.1.tgz#410eb0d113e5b6356490eec749603725b021b43e" integrity sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ== +tsutils@^3.17.1: + version "3.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== + dependencies: + tslib "^1.8.1" + type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" @@ -4259,6 +4758,11 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" +type-detect@^4.0.0, type-detect@^4.0.5: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + type-fest@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" @@ -4619,6 +5123,15 @@ workbox-window@^6.0.2: dependencies: workbox-core "^6.0.2" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -4646,6 +5159,11 @@ xdg-basedir@^4.0.0: resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13" integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== +y18n@^5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18" + integrity sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg== + yallist@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" @@ -4658,3 +5176,21 @@ yargs-parser@^18.1.3: dependencies: camelcase "^5.0.0" decamelize "^1.2.0" + +yargs-parser@^20.2.2: + version "20.2.7" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a" + integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw== + +yargs@^16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" |