Skip to content

Commit

Permalink
Merge 68e2d50 into 5c0213c
Browse files Browse the repository at this point in the history
  • Loading branch information
simonschaufi committed Mar 5, 2022
2 parents 5c0213c + 68e2d50 commit 13d958e
Show file tree
Hide file tree
Showing 177 changed files with 589 additions and 54 deletions.
93 changes: 48 additions & 45 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

/*
* This file is part of TYPO3 Surf.
*
Expand All @@ -15,12 +17,12 @@
// Define in which folders to search and which folders to exclude
// Exclude some directories that are excluded by Git anyways to speed up the sniffing
$finder = PhpCsFixer\Finder::create()
->exclude('var')
->exclude('.github')
->exclude('Configuration')
->exclude('Documentation')
->exclude('vendor')
->in(__DIR__);
->exclude('var')
->exclude('.github')
->exclude('Configuration')
->exclude('Documentation')
->exclude('vendor')
->in(__DIR__);

// Return a Code Sniffing configuration using
// all sniffers needed for PSR-2
Expand All @@ -32,42 +34,43 @@
// - Ensure Concatenation to have at least one whitespace around
// - Remove trailing whitespace at the end of blank lines.
return (new Config())
->setUsingCache(true)
->setRiskyAllowed(true)
->setRules(array(
'@PSR2' => true,
'no_leading_import_slash' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_unused_imports' => true,
'concat_space' => ['spacing' => 'one'],
'no_whitespace_in_blank_line' => true,
'ordered_imports' => true,
'single_quote' => true,
'no_empty_statement' => true,
'no_extra_blank_lines' => true,
'phpdoc_no_package' => true,
'phpdoc_scalar' => true,
'no_blank_lines_after_phpdoc' => true,
'array_syntax' => ['syntax' => 'short'],
'whitespace_after_comma_in_array' => true,
'function_typehint_space' => true,
'single_line_comment_style' => true,
'no_alias_functions' => true,
'lowercase_cast' => true,
'no_leading_namespace_whitespace' => true,
'native_function_casing' => true,
'no_short_bool_cast' => true,
'no_unneeded_control_parentheses' => true,
'phpdoc_no_empty_return' => true,
'phpdoc_trim' => true,
'no_superfluous_elseif' => true,
'no_useless_else' => true,
'phpdoc_types' => true,
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'alpha'],
'return_type_declaration' => ['space_before' => 'none'],
'cast_spaces' => ['space' => 'none'],
'declare_equal_normalize' => ['space' => 'single'],
'dir_constant' => true,
))
->setFinder($finder);
->setUsingCache(true)
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'no_leading_import_slash' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_unused_imports' => true,
'concat_space' => ['spacing' => 'one'],
'no_whitespace_in_blank_line' => true,
'ordered_imports' => true,
'single_quote' => true,
'no_empty_statement' => true,
'no_extra_blank_lines' => true,
'phpdoc_no_package' => true,
'phpdoc_scalar' => true,
'no_blank_lines_after_phpdoc' => true,
'array_syntax' => ['syntax' => 'short'],
'whitespace_after_comma_in_array' => true,
'function_typehint_space' => true,
'single_line_comment_style' => true,
'no_alias_functions' => true,
'lowercase_cast' => true,
'no_leading_namespace_whitespace' => true,
'native_function_casing' => true,
'no_short_bool_cast' => true,
'no_unneeded_control_parentheses' => true,
'phpdoc_no_empty_return' => true,
'phpdoc_trim' => true,
'no_superfluous_elseif' => true,
'no_useless_else' => true,
'phpdoc_types' => true,
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'alpha'],
'return_type_declaration' => ['space_before' => 'none'],
'cast_spaces' => ['space' => 'none'],
'declare_equal_normalize' => ['space' => 'single'],
'dir_constant' => true,
'declare_strict_types' => true,
])
->setFinder($finder);
101 changes: 100 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions ruleset.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0"?>
<ruleset name="surf">
<!-- relative path from PHPCS source location -->
<config name="installed_paths" value="vendor/slevomat/coding-standard"/>

<!-- include all sniffs in the PSR2 standard -->
<rule ref="PSR2"/>

<rule ref="vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Namespaces/AlphabeticallySortedUsesSniff.php">
<properties>
<property name="caseSensitive" value="true"/>
</properties>
</rule>

<!-- specific sniffs to include -->
<rule ref="vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/TypeHints/DeclareStrictTypesSniff.php">
<properties>
<property name="newlinesCountBetweenOpenTagAndDeclare" value="2"/>
<property name="newlinesCountAfterDeclare" value="2"/>
<property name="spacesCountAroundEqualsSign" value="0"/>
</properties>
</rule>
</ruleset>
2 changes: 2 additions & 0 deletions src/Application/BaseApplication.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace TYPO3\Surf\Application;

/*
Expand Down
3 changes: 3 additions & 0 deletions src/Application/Neos/Flow.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php

declare(strict_types = 1);

namespace TYPO3\Surf\Application\Neos;

/*
Expand Down
3 changes: 3 additions & 0 deletions src/Application/Neos/Neos.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php

declare(strict_types = 1);

namespace TYPO3\Surf\Application\Neos;

/*
Expand Down
3 changes: 3 additions & 0 deletions src/Application/TYPO3/CMS.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php

declare(strict_types = 1);

namespace TYPO3\Surf\Application\TYPO3;

/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types = 1);

namespace TYPO3\Surf\Cli\Symfony\CompilerPasses;
Expand Down
3 changes: 3 additions & 0 deletions src/Cli/Symfony/ConsoleApplication.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php

declare(strict_types = 1);

namespace TYPO3\Surf\Cli\Symfony;

/*
Expand Down
1 change: 1 addition & 0 deletions src/Cli/Symfony/ConsoleOutputFactory.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types = 1);

namespace TYPO3\Surf\Cli\Symfony;
Expand Down
3 changes: 3 additions & 0 deletions src/Cli/Symfony/Logger/ConsoleFormatter.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php

declare(strict_types = 1);

namespace TYPO3\Surf\Cli\Symfony\Logger;

/*
Expand Down
3 changes: 3 additions & 0 deletions src/Cli/Symfony/Logger/ConsoleHandler.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php

declare(strict_types = 1);

namespace TYPO3\Surf\Cli\Symfony\Logger;

/*
Expand Down
1 change: 1 addition & 0 deletions src/Cli/Symfony/Logger/LoggerFactory.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types = 1);

namespace TYPO3\Surf\Cli\Symfony\Logger;
Expand Down
2 changes: 2 additions & 0 deletions src/Command/DeployCommand.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace TYPO3\Surf\Command;

/*
Expand Down
2 changes: 2 additions & 0 deletions src/Command/DescribeCommand.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace TYPO3\Surf\Command;

/*
Expand Down
2 changes: 2 additions & 0 deletions src/Command/RollbackCommand.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace TYPO3\Surf\Command;

/*
Expand Down
2 changes: 2 additions & 0 deletions src/Command/SelfUpdateCommand.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace TYPO3\Surf\Command;

/*
Expand Down
3 changes: 3 additions & 0 deletions src/Command/ShowCommand.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php

declare(strict_types = 1);

namespace TYPO3\Surf\Command;

/*
Expand Down
2 changes: 2 additions & 0 deletions src/Command/SimulateCommand.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace TYPO3\Surf\Command;

/*
Expand Down
2 changes: 2 additions & 0 deletions src/DeprecationMessageFactory.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace TYPO3\Surf;

/*
Expand Down
2 changes: 2 additions & 0 deletions src/Domain/Clock/ClockException.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace TYPO3\Surf\Domain\Clock;

/*
Expand Down
2 changes: 2 additions & 0 deletions src/Domain/Clock/ClockInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace TYPO3\Surf\Domain\Clock;

/*
Expand Down

0 comments on commit 13d958e

Please sign in to comment.