Skip to content

Commit

Permalink
Fix cs
Browse files Browse the repository at this point in the history
  • Loading branch information
odan committed Sep 9, 2023
1 parent 6d9ebff commit b667cc0
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 71 deletions.
6 changes: 5 additions & 1 deletion .cs.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
79 changes: 39 additions & 40 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -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'
28 changes: 1 addition & 27 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,8 @@
<file>./src</file>
<file>./tests</file>
<file>./config</file>
<file>./public/index.php</file>

<rule ref="PSR2"></rule>
<!-- <rule ref="PSR12"></rule> -->

<!--
<rule ref="Squiz.Commenting.ClassComment">
<exclude name="Squiz.Commenting.ClassComment.TagNotAllowed"/>
<type>warning</type>
<exclude-pattern>*/tests/</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.ClassComment.Missing">
<type>warning</type>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.Missing">
<type>warning</type>
<exclude-pattern>*/config/</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.MissingParamTag">
<type>warning</type>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.MissingParamComment">
<type>warning</type>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.ParamCommentNotCapital">
<type>warning</type>
</rule>
-->
<rule ref="PSR12"></rule>

<rule ref="Generic.Metrics.CyclomaticComplexity">
<properties>
Expand Down
3 changes: 0 additions & 3 deletions src/Factory/QueryFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Cake\Database\Connection;
use Cake\Database\Query;
use RuntimeException;

/**
* Factory.
Expand All @@ -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
Expand Down

0 comments on commit b667cc0

Please sign in to comment.