Unverified Commit 05a71ed6 authored by Klaus Purer's avatar Klaus Purer Committed by GitHub
Browse files

refactor(phpstan): Fix PHPStan reports for test base class (#3104477)

parent 6516b060
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -16,9 +16,9 @@ class ArrayUnitTest extends CoderSniffUnitTest
     *
     * @param string $testFile The name of the file being tested.
     *
     * @return array(int => int)
     * @return array<int, int>
     */
    public function getErrorList($testFile=null)
    protected function getErrorList(string $testFile)
    {
        switch ($testFile) {
        case 'ArrayUnitTest.inc':
@@ -49,9 +49,9 @@ class ArrayUnitTest extends CoderSniffUnitTest
     *
     * @param string $testFile The name of the file being tested.
     *
     * @return array(int => int)
     * @return array<int, int>
     */
    public function getWarningList($testFile=null)
    protected function getWarningList(string $testFile)
    {
        switch ($testFile) {
        case 'ArrayUnitTest.inc':
+6 −4
Original line number Diff line number Diff line
@@ -16,9 +16,9 @@ class DisallowLongArraySyntaxUnitTest extends CoderSniffUnitTest
     *
     * @param string $testFile The name of the file being tested.
     *
     * @return array(int => int)
     * @return array<int, int>
     */
    public function getErrorList($testFile=null)
    protected function getErrorList(string $testFile)
    {
        switch ($testFile) {
        case 'DisallowLongArraySyntaxUnitTest.2.inc':
@@ -37,9 +37,11 @@ class DisallowLongArraySyntaxUnitTest extends CoderSniffUnitTest
     * The key of the array should represent the line number and the value
     * should represent the number of warnings that should occur on that line.
     *
     * @return array(int => int)
     * @param string $testFile The name of the file being tested.
     *
     * @return array<int, int>
     */
    public function getWarningList()
    protected function getWarningList(string $testFile)
    {
        return [];

+8 −4
Original line number Diff line number Diff line
@@ -14,9 +14,11 @@ class ClassCreateInstanceUnitTest extends CoderSniffUnitTest
     * The key of the array should represent the line number and the value
     * should represent the number of errors that should occur on that line.
     *
     * @return array(int => int)
     * @param string $testFile The name of the file being tested.
     *
     * @return array<int, int>
     */
    public function getErrorList()
    protected function getErrorList(string $testFile)
    {
        return [
            3  => 1,
@@ -43,9 +45,11 @@ class ClassCreateInstanceUnitTest extends CoderSniffUnitTest
     * The key of the array should represent the line number and the value
     * should represent the number of warnings that should occur on that line.
     *
     * @return array(int => int)
     * @param string $testFile The name of the file being tested.
     *
     * @return array<int, int>
     */
    public function getWarningList()
    protected function getWarningList(string $testFile)
    {
        return [];

+8 −4
Original line number Diff line number Diff line
@@ -14,9 +14,11 @@ class ClassDeclarationUnitTest extends CoderSniffUnitTest
     * The key of the array should represent the line number and the value
     * should represent the number of errors that should occur on that line.
     *
     * @return array(int => int)
     * @param string $testFile The name of the file being tested.
     *
     * @return array<int, int>
     */
    public function getErrorList()
    protected function getErrorList(string $testFile)
    {
        return [
            11 => 1,
@@ -33,9 +35,11 @@ class ClassDeclarationUnitTest extends CoderSniffUnitTest
     * The key of the array should represent the line number and the value
     * should represent the number of warnings that should occur on that line.
     *
     * @return array(int => int)
     * @param string $testFile The name of the file being tested.
     *
     * @return array<int, int>
     */
    public function getWarningList()
    protected function getWarningList(string $testFile)
    {
        return [];

+6 −4
Original line number Diff line number Diff line
@@ -16,9 +16,9 @@ class ClassFileNameUnitTest extends CoderSniffUnitTest
     *
     * @param string $testFile The name of the file being tested.
     *
     * @return array(int => int)
     * @return array<int, int>
     */
    public function getErrorList($testFile=null)
    protected function getErrorList(string $testFile)
    {
        switch ($testFile) {
        case 'ClassFileNameUnitTest.php':
@@ -36,9 +36,11 @@ class ClassFileNameUnitTest extends CoderSniffUnitTest
     * The key of the array should represent the line number and the value
     * should represent the number of warnings that should occur on that line.
     *
     * @return array(int => int)
     * @param string $testFile The name of the file being tested.
     *
     * @return array<int, int>
     */
    public function getWarningList()
    protected function getWarningList(string $testFile)
    {
        return [];

Loading