-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #336 from cakephp/type-code
Convert use of token type to code
- Loading branch information
Showing
8 changed files
with
111 additions
and
28 deletions.
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
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
namespace Beakman; | ||
|
||
class Foo | ||
{ | ||
/** | ||
* @return $this | ||
*/ | ||
public function correct() | ||
{ | ||
} | ||
|
||
/** | ||
* @return $this | ||
*/ | ||
public function incorrect(): Foo | ||
{ | ||
} | ||
|
||
/** | ||
* @return $this | ||
*/ | ||
public function incorrectSelf(): self | ||
{ | ||
} | ||
} |
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,28 @@ | ||
<?php | ||
|
||
namespace CakePHP\Tests\Classes; | ||
|
||
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; | ||
|
||
class ReturnTypeHintUnitTest extends AbstractSniffUnitTest | ||
{ | ||
/** | ||
* @inheritDoc | ||
*/ | ||
public function getErrorList() | ||
{ | ||
return [ | ||
16 => 1, | ||
23 => 1, | ||
]; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function getWarningList() | ||
{ | ||
return [ | ||
]; | ||
} | ||
} |
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,29 @@ | ||
<?php | ||
namespace Beakman; | ||
|
||
use Other\Crap; | ||
use Other\Error as OtherError; | ||
|
||
class Foo | ||
{ | ||
/** | ||
* @return $this | ||
*/ | ||
public function correct() | ||
{ | ||
} | ||
|
||
/** | ||
* @return $this | ||
*/ | ||
public function incorrect(): Foo | ||
{ | ||
} | ||
|
||
/** | ||
* @return $this | ||
*/ | ||
public function incorrectSelf() | ||
{ | ||
} | ||
} |