-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply Doctrine Coding Standard #77
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
89e0254
Requiring doctrine/coding-standard
VolCh dc1e314
Fix phpcs SlevomatCodingStandard.Commenting.ForbiddenAnnotations
VolCh 299be4b
Fix phpcs SlevomatCodingStandard.TypeHints.TypeHintDeclaration.Useles…
VolCh 34b507c
Fix phpcs SlevomatCodingStandard.Commenting.RequireOneLinePropertyDoc…
VolCh 53b3ae5
Fix phpcs SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly
VolCh a0cc1ea
Fix phpcs SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses
VolCh 2fffaf4
Fix phpcs Generic.Formatting.MultipleStatementAlignment
VolCh c1dd8c3
Fix phpcs Squiz.Commenting.FunctionComment
VolCh a2eb0ef
Fix phpcs SlevomatCodingStandard.ControlStructures.DisallowYodaCompar…
VolCh 700f365
Fix phpcs SlevomatCodingStandard.ControlStructures.NewWithParentheses
VolCh 64a5420
Fix phpcs SlevomatCodingStandard.ControlStructures.AssignmentInCondition
VolCh 5c76ecc
Fix phpcs SlevomatCodingStandard.Namespaces.UnusedUses
VolCh e4530b0
Fix few phpcs violations
VolCh 7bfeba9
Ignore phpcs SlevomatCodingStandard.Classes.UnusedPrivateElements in …
VolCh 1f3c06a
Using Doctrine Coding Standard in Scrutinizer
VolCh ebb9bf8
Using Doctrine Coding Standard in Travis CI
VolCh 50e58e8
Fix phpcs SlevomatCodingStandard.TypeHints.TypeHintDeclaration (PHP7.…
VolCh febabcc
Fix phpcs SlevomatCodingStandard.TypeHints.DeclareStrictTypes
VolCh d999871
Apply Doctrine Coding Standard to benchmarks
VolCh afe5255
Drop PHP 7.0 & 7.1 support
VolCh 9e86078
Fix phpcs SlevomatCodingStandard.TypeHints.TypeHintDeclaration
VolCh e65acc1
Fix few phpcs violations
VolCh 163a747
[BC] Fix phpcs SlevomatCodingStandard.Classes
VolCh 6bb0807
[BC] Fix phpcs SlevomatCodingStandard.Classes
VolCh 8e064b9
Fix ClassWithPrivateProperties::getProperty0 return type
VolCh e093a65
Fix few phpdocs format
VolCh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace GeneratedHydratorBenchmark; | ||
|
||
/** | ||
* Class that contains only private properties | ||
*/ | ||
class AllPrivateClass | ||
{ | ||
//phpcs:disable SlevomatCodingStandard.Classes.UnusedPrivateElements.UnusedProperty | ||
/** @var mixed */ | ||
private $foo; | ||
/** @var mixed */ | ||
private $bar; | ||
/** @var mixed */ | ||
private $baz; | ||
/** @var mixed */ | ||
private $someFooProperty; | ||
/** @var mixed */ | ||
private $someBarProperty; | ||
/** @var mixed */ | ||
private $someBazProperty; | ||
//phpcs:enable | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace GeneratedHydratorBenchmark; | ||
|
||
/** | ||
* Class that contains only protected properties | ||
*/ | ||
class AllProtectedClass | ||
{ | ||
/** @var mixed */ | ||
protected $foo; | ||
/** @var mixed */ | ||
protected $bar; | ||
/** @var mixed */ | ||
protected $baz; | ||
/** @var mixed */ | ||
protected $someFooProperty; | ||
/** @var mixed */ | ||
protected $someBarProperty; | ||
/** @var mixed */ | ||
protected $someBazProperty; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace GeneratedHydratorBenchmark; | ||
|
||
/** | ||
* Class that contains only public properties | ||
*/ | ||
class AllPublicClass | ||
{ | ||
/** @var mixed */ | ||
public $foo; | ||
/** @var mixed */ | ||
public $bar; | ||
/** @var mixed */ | ||
public $baz; | ||
/** @var mixed */ | ||
public $someFooProperty; | ||
/** @var mixed */ | ||
public $someBarProperty; | ||
/** @var mixed */ | ||
public $someBazProperty; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
benchmarks/GeneratedHydratorBenchmark/InheritanceClass.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace GeneratedHydratorBenchmark; | ||
|
||
/** | ||
* Class that contains mixed inherited properties | ||
*/ | ||
class InheritanceClass extends MixedClass | ||
{ | ||
//phpcs:disable SlevomatCodingStandard.Classes.UnusedPrivateElements.UnusedProperty | ||
/** @var mixed */ | ||
private $foo1; | ||
/** @var mixed */ | ||
protected $bar1; | ||
/** @var mixed */ | ||
public $baz1; | ||
/** @var mixed */ | ||
private $someFooProperty1; | ||
/** @var mixed */ | ||
protected $someBarProperty1; | ||
/** @var mixed */ | ||
public $someBazProperty1; | ||
//phpcs:enable | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
benchmarks/GeneratedHydratorBenchmark/InheritanceDeepClass.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace GeneratedHydratorBenchmark; | ||
|
||
/** | ||
* Class that contains mixed deeply inherited properties | ||
*/ | ||
class InheritanceDeepClass extends InheritanceClass | ||
{ | ||
//phpcs:disable SlevomatCodingStandard.Classes.UnusedPrivateElements.UnusedProperty | ||
/** @var mixed */ | ||
private $foo2; | ||
/** @var mixed */ | ||
protected $bar2; | ||
/** @var mixed */ | ||
public $baz2; | ||
/** @var mixed */ | ||
private $someFooProperty2; | ||
/** @var mixed */ | ||
protected $someBarProperty2; | ||
/** @var mixed */ | ||
public $someBazProperty2; | ||
//phpcs:enable | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say it's preferable to do file-level excludes in phpcs.xml.dist rather than using inline comments.