Skip to content

Commit

Permalink
Add src/function.php to Composer's autoload
Browse files Browse the repository at this point in the history
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Mar 9, 2023
1 parent eec177a commit 7e94143
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
3 changes: 2 additions & 1 deletion composer.json
Expand Up @@ -43,7 +43,8 @@
"autoload": {
"psr-4": {
"PhpMyAdmin\\MoTranslator\\": "src"
}
},
"files": ["src/functions.php"]
},
"autoload-dev": {
"psr-4": {
Expand Down
4 changes: 0 additions & 4 deletions phpcs.xml.dist
Expand Up @@ -23,10 +23,6 @@
</properties>
</rule>

<rule ref="Squiz.Functions.GlobalFunction.Found">
<exclude-pattern>src/functions.php</exclude-pattern>
</rule>

<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint">
<severity>3</severity>
</rule>
Expand Down
2 changes: 2 additions & 0 deletions src/functions.php
Expand Up @@ -26,6 +26,8 @@

use PhpMyAdmin\MoTranslator\Loader;

// phpcs:disable Squiz.Functions.GlobalFunction

/**
* Sets a requested locale.
*
Expand Down
14 changes: 14 additions & 0 deletions tests/FunctionsTest.php
Expand Up @@ -7,6 +7,20 @@
use PhpMyAdmin\MoTranslator\Loader;
use PHPUnit\Framework\TestCase;

use function __;
use function _bind_textdomain_codeset;
use function _bindtextdomain;
use function _dgettext;
use function _dngettext;
use function _dnpgettext;
use function _dpgettext;
use function _gettext;
use function _ngettext;
use function _npgettext;
use function _pgettext;
use function _setlocale;
use function _textdomain;

/**
* Test for functions.
*/
Expand Down

0 comments on commit 7e94143

Please sign in to comment.