Skip to content

Commit

Permalink
Merge branch 'master' into feature/improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
mambax7 authored Oct 31, 2023
2 parents b132a7d + 92a66fb commit b38cbf8
Show file tree
Hide file tree
Showing 39 changed files with 879 additions and 64 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/pr_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on: [push, pull_request]

jobs:
phpunit:
phpunit-7-1:
strategy:
fail-fast: false
matrix:
Expand All @@ -20,5 +20,25 @@ jobs:
with:
php-version: ${{ matrix.php_version }}
coverage: xdebug
- name: Unit Tests
run: vendor/bin/phpunit --stderr
- name: Unit Tests with PHPUnit 7.1
run: vendor/bin/phpunit --stderr --version 7.1

phpunit-9-6:
strategy:
fail-fast: false
matrix:
php_version: ["8.1"]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: php-actions/composer@v6
with:
php_version: "7.4"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
coverage: xdebug
- name: Unit Tests with PHPUnit 9.6
run: vendor/bin/phpunit --stderr --version 9.6
6 changes: 3 additions & 3 deletions docs/gpl-3.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

Expand All @@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
<https://www.gnu.org/licenses/>.

The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<https://www.gnu.org/philosophy/why-not-lgpl.html>.
2 changes: 1 addition & 1 deletion docs/license.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ Some portions of this work are licensed under the GNU Lesser General Public Lice

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License, and the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License, and the GNU Lesser General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

You may contact the copyright holder through XOOPS Project: <https://xoops.org>
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?php
header("HTTP/1.0 404 Not Found");
header('HTTP/1.0 404 Not Found');
2 changes: 1 addition & 1 deletion src/Assert.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @package Xmf
* @author Richard Griffith <[email protected]>
* @copyright 2017 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @link https://xoops.org
*/
class Assert extends BaseAssertion
Expand Down
6 changes: 3 additions & 3 deletions src/Database/TableLoad.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @package Xmf
* @author Richard Griffith <[email protected]>
* @copyright 2013-2018 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @link https://xoops.org
*/
class TableLoad
Expand Down Expand Up @@ -130,7 +130,7 @@ public static function countRows($table, $criteria = null)
$prefixedTable = $db->prefix($table);
$sql = 'SELECT COUNT(*) as `count` FROM ' . $prefixedTable . ' ';
if (isset($criteria) && is_subclass_of($criteria, '\CriteriaElement')) {
/* @var \CriteriaCompo $criteria */
/** @var \CriteriaCompo $criteria */
$sql .= $criteria->renderWhere();
}
$result = $db->query($sql);
Expand All @@ -157,7 +157,7 @@ public static function extractRows($table, $criteria = null, $skipColumns = arra
$prefixedTable = $db->prefix($table);
$sql = 'SELECT * FROM ' . $prefixedTable . ' ';
if (isset($criteria) && is_subclass_of($criteria, '\CriteriaElement')) {
/* @var \CriteriaCompo $criteria */
/** @var \CriteriaCompo $criteria */
$sql .= $criteria->renderWhere();
}
$rows = array();
Expand Down
4 changes: 2 additions & 2 deletions src/Database/Tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ public function delete($table, $criteria)
if (is_scalar($criteria)) {
$where = $criteria;
} elseif (is_object($criteria)) {
/* @var \CriteriaCompo $criteria */
/** @var \CriteriaCompo $criteria */
$where = $criteria->renderWhere();
}
$this->queue[] = "DELETE FROM `{$tableDef['name']}` {$where}";
Expand Down Expand Up @@ -685,7 +685,7 @@ public function update($table, $columns, $criteria, $quoteValue = true)
if (is_scalar($criteria)) {
$where = $criteria;
} elseif (is_object($criteria)) {
/* @var \CriteriaCompo $criteria */
/** @var \CriteriaCompo $criteria */
$where = $criteria->renderWhere();
}
$colSql = '';
Expand Down
2 changes: 1 addition & 1 deletion src/Database/index.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?php
header("HTTP/1.0 404 Not Found");
header('HTTP/1.0 404 Not Found');
2 changes: 1 addition & 1 deletion src/Debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @author trabis <[email protected]>
* @author Richard Griffith <[email protected]>
* @copyright 2011-2021 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @link https://xoops.org
*/
class Debug extends \Kint
Expand Down
2 changes: 1 addition & 1 deletion src/Highlighter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @package Xmf
* @author Richard Griffith <[email protected]>
* @copyright 2011-2018 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @link https://xoops.org
*/
class Highlighter
Expand Down
2 changes: 1 addition & 1 deletion src/IPAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @package Xmf
* @author trabis <[email protected]>
* @copyright 2018-2021 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @link https://xoops.org
*/
class IPAddress
Expand Down
2 changes: 1 addition & 1 deletion src/Jwt/JsonWebToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @package Xmf
* @author Richard Griffith <[email protected]>
* @copyright 2018-2023 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @link https://xoops.org
*/
class JsonWebToken
Expand Down
2 changes: 1 addition & 1 deletion src/Jwt/KeyFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @package Xmf
* @author Richard Griffith <[email protected]>
* @copyright 2016-2018 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @link https://xoops.org
*/
class KeyFactory
Expand Down
2 changes: 1 addition & 1 deletion src/Jwt/TokenFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @package Xmf
* @author Richard Griffith <[email protected]>
* @copyright 2016-2018 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @link https://xoops.org
*/
class TokenFactory
Expand Down
2 changes: 1 addition & 1 deletion src/Jwt/TokenReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @package Xmf
* @author Richard Griffith <[email protected]>
* @copyright 2016-2018 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @link https://xoops.org
*/
class TokenReader
Expand Down
2 changes: 1 addition & 1 deletion src/Jwt/index.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?php
header("HTTP/1.0 404 Not Found");
header('HTTP/1.0 404 Not Found');
2 changes: 1 addition & 1 deletion src/Key/ArrayStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @package Xmf
* @author Richard Griffith <[email protected]>
* @copyright 2018 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @link https://xoops.org
*/
class ArrayStorage extends \ArrayObject implements StorageInterface
Expand Down
2 changes: 1 addition & 1 deletion src/Key/Basic.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @package Xmf
* @author Richard Griffith <[email protected]>
* @copyright 2018-2023 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @link https://xoops.org
*/
class Basic extends KeyAbstract
Expand Down
2 changes: 1 addition & 1 deletion src/Key/FileStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @package Xmf
* @author Richard Griffith <[email protected]>
* @copyright 2016-2018 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @link https://xoops.org
*/
class FileStorage implements StorageInterface
Expand Down
2 changes: 1 addition & 1 deletion src/Key/KeyAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @package Xmf
* @author Richard Griffith <[email protected]>
* @copyright 2018-2023 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @link https://xoops.org
*/
abstract class KeyAbstract
Expand Down
2 changes: 1 addition & 1 deletion src/Key/StorageInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @package Xmf
* @author Richard Griffith <[email protected]>
* @copyright 2018 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @link https://xoops.org
*/
interface StorageInterface
Expand Down
2 changes: 1 addition & 1 deletion src/Key/index.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?php
header("HTTP/1.0 404 Not Found");
header('HTTP/1.0 404 Not Found');
2 changes: 1 addition & 1 deletion src/Language.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @package Xmf
* @author trabis <[email protected]>
* @copyright 2011-2018 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @link https://xoops.org
*/
class Language
Expand Down
4 changes: 2 additions & 2 deletions src/Metagen.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @author Richard Griffith <[email protected]>
* @author trabis <[email protected]>
* @copyright 2011-2018 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @link https://xoops.org
*/
class Metagen
Expand Down Expand Up @@ -59,7 +59,7 @@ public static function assignTitle($title)
*/
public static function assignKeywords($keywords)
{
if (!empty($keywords) && is_array($keywords)) {
if (!empty($keywords) && \is_array($keywords)) {
$keyword_tag = implode(', ', $keywords);
static::assignThemeMeta('keywords', $keyword_tag);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Module/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @author trabis <[email protected]>
* @author Richard Griffith <[email protected]>
* @copyright 2011-2023 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @link https://xoops.org
*/
class Helper extends GenericHelper
Expand Down
4 changes: 2 additions & 2 deletions src/Module/Helper/AbstractHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @author trabis <[email protected]>
* @author Richard Griffith <[email protected]>
* @copyright 2016-2018 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @link https://xoops.org
*/
abstract class AbstractHelper
Expand Down Expand Up @@ -67,7 +67,7 @@ public function __construct($dirname = null)
if (isset($xoops)) {
$moduleHandler = $xoops->getHandlerModule();
} else {
/* @var \XoopsModuleHandler $moduleHandler */
/** @var \XoopsModuleHandler $moduleHandler */
$moduleHandler = xoops_getHandler('module');
}
$this->module = $moduleHandler->getByDirname($dirname);
Expand Down
2 changes: 1 addition & 1 deletion src/Module/Helper/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @author trabis <[email protected]>
* @author Richard Griffith <[email protected]>
* @copyright 2011-2018 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @link https://xoops.org
*/
class Cache extends AbstractHelper
Expand Down
6 changes: 3 additions & 3 deletions src/Module/Helper/GenericHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @author trabis <[email protected]>
* @author Richard Griffith <[email protected]>
* @copyright 2016-2023 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @link https://xoops.org
*/
abstract class GenericHelper extends AbstractHelper
Expand Down Expand Up @@ -141,7 +141,7 @@ protected function initObject()
) {
$this->module = $xoopsModule;
} else {
/* @var \XoopsModuleHandler $module_handler */
/** @var \XoopsModuleHandler $module_handler */
$module_handler = xoops_getHandler('module');
$this->module = $module_handler->getByDirname($this->dirname);
}
Expand All @@ -163,7 +163,7 @@ protected function initConfig()
global $xoopsModuleConfig;
$this->configs = $xoopsModuleConfig;
} else {
/* @var \XoopsConfigHandler $config_handler */
/** @var \XoopsConfigHandler $config_handler */
$config_handler = xoops_getHandler('config');
$this->configs = $config_handler->getConfigsByCat(0, $this->getModule()->getVar('mid'));
}
Expand Down
4 changes: 2 additions & 2 deletions src/Module/Helper/Permission.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @author trabis <[email protected]>
* @author Richard Griffith <[email protected]>
* @copyright 2011-2023 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @link https://xoops.org
*/
class Permission extends AbstractHelper
Expand Down Expand Up @@ -50,7 +50,7 @@ public function init()
{
$this->mid = $this->module->getVar('mid');
$this->dirname = $this->module->getVar('dirname');
/* @var $this->permissionHandler XoopsGroupPermHandler */
/** @var $this->permissionHandler XoopsGroupPermHandler */
$this->permissionHandler = xoops_getHandler('groupperm');
}

Expand Down
2 changes: 1 addition & 1 deletion src/Module/Helper/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @author trabis <[email protected]>
* @author Richard Griffith <[email protected]>
* @copyright 2011-2018 XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @link https://xoops.org
*/
class Session extends AbstractHelper
Expand Down
2 changes: 1 addition & 1 deletion src/Module/Helper/index.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?php
header("HTTP/1.0 404 Not Found");
header('HTTP/1.0 404 Not Found');
2 changes: 1 addition & 1 deletion src/Module/index.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?php
header("HTTP/1.0 404 Not Found");
header('HTTP/1.0 404 Not Found');
Loading

0 comments on commit b38cbf8

Please sign in to comment.