Skip to content

Commit

Permalink
Import all global functions and constants
Browse files Browse the repository at this point in the history
  • Loading branch information
emodric committed Apr 24, 2020
1 parent 5345095 commit 0d9024e
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .php_cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ return PhpCsFixer\Config::create()
'concat_space' => ['spacing' => 'one'],
'method_chaining_indentation' => false,
'multiline_whitespace_before_semicolons' => false,
'native_function_invocation' => false,
'native_function_invocation' => ['include' => ['@all']],
'no_superfluous_phpdoc_tags' => false,
'ordered_imports' => ['imports_order' => ['class', 'function', 'const']],
'php_unit_internal_class' => false,
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
'php_unit_test_class_requires_covers' => false,
Expand All @@ -24,8 +25,14 @@ return PhpCsFixer\Config::create()
// Additional rules
'date_time_immutable' => true,
'declare_strict_types' => true,
'global_namespace_import' => [
'import_classes' => null,
'import_constants' => true,
'import_functions' => true,
],
'list_syntax' => ['syntax' => 'short'],
'mb_str_functions' => true,
'native_constant_invocation' => true,
'static_lambda' => true,
'ternary_to_null_coalescing' => true,
])
Expand Down
2 changes: 2 additions & 0 deletions Core/FieldType/ContentTypeList/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
use eZ\Publish\Core\FieldType\FieldType;
use eZ\Publish\Core\FieldType\Value as BaseValue;
use eZ\Publish\SPI\FieldType\Value as SPIValue;
use function is_array;
use function is_string;

final class Type extends FieldType
{
Expand Down
1 change: 1 addition & 0 deletions Core/FieldType/ContentTypeList/Value.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Netgen\Bundle\ContentTypeListBundle\Core\FieldType\ContentTypeList;

use eZ\Publish\Core\FieldType\Value as BaseValue;
use function implode;

final class Value extends BaseValue
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue;
use eZ\Publish\SPI\Persistence\Content\FieldValue;
use eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition;
use function explode;
use function implode;
use function trim;

final class ContentTypeListConverter implements Converter
{
Expand Down
1 change: 1 addition & 0 deletions DependencyInjection/NetgenContentTypeListExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\Yaml\Yaml;
use function file_get_contents;

final class NetgenContentTypeListExtension extends Extension implements PrependExtensionInterface
{
Expand Down
1 change: 1 addition & 0 deletions Tests/Core/FieldType/ContentTypeList/TypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Netgen\Bundle\ContentTypeListBundle\Core\FieldType\ContentTypeList\Type;
use Netgen\Bundle\ContentTypeListBundle\Core\FieldType\ContentTypeList\Value;
use PHPUnit\Framework\TestCase;
use function implode;

final class TypeTest extends TestCase
{
Expand Down

0 comments on commit 0d9024e

Please sign in to comment.