‪TYPO3CMS  ‪main
MethodArgumentDroppedMatcherFixture.php
Go to the documentation of this file.
1 <?php
2 
3 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 
19 
24 {
25  public function ‪aMethod(): void
26  {
27  // Match: euc_char_mapping() shouldn't be called with more than 2 args
28  $foo->euc_char_mapping('arg1', 'arg2', 'arg3');
29 
30  // No match: Two args is ok
31  $foo->euc_char_mapping('arg1', 'arg2');
32  // No match: Static call
33  $foo::euc_char_mapping('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->euc_char_mapping(...‪$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->euc_char_mapping(...$args1, ...$args2, ...$args3);
42  // No match: Only 2 args given is ok
43  $foo->euc_char_mapping('arg1', 'arg2');
44  // @extensionScannerIgnoreLine
45  $foo->euc_char_mapping('arg1', 'arg2', 'arg3');
46  }
47 }
‪TYPO3\CMS\Install\Tests\Unit\ExtensionScanner\Php\Matcher\Fixtures\MethodArgumentDroppedMatcherFixture\aMethod
‪aMethod()
Definition: MethodArgumentDroppedMatcherFixture.php:25
‪TYPO3\CMS\Install\Tests\Unit\ExtensionScanner\Php\Matcher\Fixtures\MethodArgumentDroppedMatcherFixture
Definition: MethodArgumentDroppedMatcherFixture.php:24
‪TYPO3\CMS\Install\Tests\Unit\ExtensionScanner\Php\Matcher\Fixtures
Definition: AbstractCoreMatcherFixture.php:18
‪$args
‪$args
Definition: validateRstFiles.php:258