This repository has been archived by the owner on Dec 3, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CodingStandard] allow more errors, add test with 2 @Inject properites
- Loading branch information
1 parent
ea56890
commit 96dbd05
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
...Standard/tests/Refactorer/NetteDI/InjectToConstructorInjection/wrong/wrong5-fixed.php.inc
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
|
||
class SomePresenter | ||
{ | ||
/** | ||
* @var stdClass | ||
* @inject | ||
*/ | ||
public $stdClass; | ||
|
||
/** | ||
* @var DateTime | ||
* @inject | ||
*/ | ||
public $dateTime; | ||
} |
25 changes: 25 additions & 0 deletions
25
...CodingStandard/tests/Refactorer/NetteDI/InjectToConstructorInjection/wrong/wrong5.php.inc
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
|
||
class SomePresenter | ||
{ | ||
/** | ||
* @var stdClass | ||
*/ | ||
private $stdClass; | ||
|
||
/** | ||
* @var DateTime | ||
*/ | ||
private $dateTime; | ||
|
||
public function inject(stdClass $stdClass) | ||
{ | ||
$this->stdClass = $stdClass; | ||
} | ||
|
||
public function __construct(DateTime $dateTime) | ||
{ | ||
$this->dateTime = $dateTime; | ||
} | ||
} |