diff --git a/.cs.php b/.cs.php index f231ea683..657c8e2cf 100644 --- a/.cs.php +++ b/.cs.php @@ -46,12 +46,16 @@ 'declare_strict_types' => false, 'blank_line_between_import_groups' => true, 'fully_qualified_strict_types' => true, - 'global_namespace_import' => false, 'no_null_property_initialization' => false, 'operator_linebreak' => [ 'only_booleans' => true, 'position' => 'beginning', ], + 'global_namespace_import' => [ + 'import_classes' => true, + 'import_constants' => null, + 'import_functions' => null + ] ] ) ->setFinder( diff --git a/.editorconfig b/.editorconfig index 4d65ca913..0a6abeec5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,6 +8,15 @@ end_of_line = lf [composer.json] indent_size = 4 +[*.js] +indent_size = 4 + [*.neon] indent_size = 4 indent_style = tab + +[*.xml] +indent_size = 4 + +[*.yml] +indent_size = 4 diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 9abaa8dc5..78824e95a 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -1,47 +1,46 @@ filter: - paths: [ "src/*" ] - excluded_paths: [ "vendor/*", "tests/*", "resources/", "public/" ] + paths: [ "src/*" ] + excluded_paths: [ "vendor/*", "tests/*", "resources/", "public/" ] checks: - php: - code_rating: true - duplication: true + php: + code_rating: true + duplication: true tools: - external_code_coverage: false + external_code_coverage: false build: - services: - mysql: 5.7 - environment: - php: - version: 8.1.2 - ini: - xdebug.mode: coverage - mysql: 5.7 - node: false - postgresql: false - mongodb: false - elasticsearch: false - redis: false - memcached: false - neo4j: false - rabbitmq: false - variables: - APP_ENV: 'scrutinizer' - nodes: - analysis: - tests: - override: - - php-scrutinizer-run - dependencies: - before: - - composer self-update - - composer install --no-interaction --prefer-dist --no-progress - - mysql -u root -e "CREATE DATABASE IF NOT EXISTS slim_skeleton_test CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" - tests: - before: - - command: composer test:coverage - coverage: - file: 'build/logs/clover.xml' - format: 'clover' + services: + mysql: 5.7 + environment: + php: + version: 8.1.2 + ini: + xdebug.mode: coverage + mysql: 5.7 + node: false + postgresql: false + mongodb: false + elasticsearch: false + redis: false + memcached: false + neo4j: false + rabbitmq: false + variables: + APP_ENV: 'scrutinizer' + nodes: + analysis: + tests: + override: + - php-scrutinizer-run + dependencies: + before: + - composer self-update + - mysql -u root -e "CREATE DATABASE IF NOT EXISTS slim_skeleton_test CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" + tests: + before: + - command: composer test:coverage + coverage: + file: 'build/logs/clover.xml' + format: 'clover' diff --git a/phpcs.xml b/phpcs.xml index 73d5fb02f..ba87b1fe6 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -10,34 +10,8 @@ ./src ./tests ./config - ./public/index.php - - - - + diff --git a/src/Factory/QueryFactory.php b/src/Factory/QueryFactory.php index 0cbfa10af..9db6bde38 100644 --- a/src/Factory/QueryFactory.php +++ b/src/Factory/QueryFactory.php @@ -4,7 +4,6 @@ use Cake\Database\Connection; use Cake\Database\Query; -use RuntimeException; /** * Factory. @@ -28,8 +27,6 @@ public function __construct(Connection $connection) * * @param string $table The table name * - * @throws RuntimeException - * * @return Query A new select query */ public function newSelect(string $table): Query