- Affected version
- 2.2.8 Patch 1
It looks like
Given this code;
I've seen it generate;
or
If a non-whitelisted function is in the 'use function' list it strips it out, and can generate undesired code;
Results in;
xf-dev:class-use-function
gets confused if there are comments before the namespace declaration, and when non-white listed functions are in an existing 'use function' statement.Given this code;
PHP:
<?php
/**
* @noinspection PhpMissingReturnTypeInspection
*/
namespace SV\Example;
use \XF\App;
I've seen it generate;
PHP:
<?php
const USE_FUNCTION_PLACEHOLDER = true;
/**
* @noinspection PhpMissingReturnTypeInspection
*/
namespace SV\Example;
use \XF\App;
PHP:
<?php
use function count;
/**
* @noinspection PhpMissingReturnTypeInspection
*/
namespace SV\Example;
use \XF\App;
If a non-whitelisted function is in the 'use function' list it strips it out, and can generate undesired code;
PHP:
<?php
namespace SV\Example;
use \XF\App;
use function is_callable;
Results in;
PHP:
<?php
namespace SV\Example;
use \XF\App;
const USE_FUNCTION_PLACEHOLDER = true;