‪TYPO3CMS  9.5
MethodArgumentUnusedMatcherFixture.php
Go to the documentation of this file.
1 <?php
2 declare(strict_types = 1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
22 {
23  public function ‪aMethod()
24  {
25  // Match: RTE_transform() should have arg2 as null if given
26  $foo->RTE_transform('arg1', 'arg2');
27  $foo->RTE_transform('arg1', 'arg2', 'arg3');
28 
29  // No match: null is ok
30  $foo->RTE_transform('arg1', null);
31  $foo->RTE_transform('arg1', null, 'arg3');
32  // No match: Static call
33  $foo::RTE_transform('arg1', 'arg2', 'arg3');
34  // No match: With argument unpacking we don't know how many args are actually given
35  ‪$args = [ 'arg1', 'arg2', 'arg3' ];
36  $foo->RTE_transform(...‪$args);
37  // No match: Too many args, but with argument unpacking we don't know about empty arrays
38  $args1 = [ 'arg1', 'arg2', 'arg3' ];
39  $args2 = [ 'arg4', 'arg5', 'arg6' ];
40  $args3 = [ 'arg7', 'arg8', 'arg9' ];
41  $foo->RTE_transform(...$args1, ...$args2, ...$args3);
42  // @extensionScannerIgnoreLine
43  $foo->RTE_transform('arg1', 'arg2');
44  }
45 }
‪$args
‪$args
Definition: checkIntegrityCsvFixtures.php:230
‪TYPO3\CMS\Install\Tests\Unit\ExtensionScanner\Php\Matcher\Fixtures\MethodArgumentUnusedMatcherFixture
Definition: MethodArgumentUnusedMatcherFixture.php:22
‪TYPO3\CMS\Install\Tests\Unit\ExtensionScanner\Php\Matcher\Fixtures
Definition: ArrayDimensionMatcherFixture.php:3
‪TYPO3\CMS\Install\Tests\Unit\ExtensionScanner\Php\Matcher\Fixtures\MethodArgumentUnusedMatcherFixture\aMethod
‪aMethod()
Definition: MethodArgumentUnusedMatcherFixture.php:23