| Conditions | 1 |
| Paths | 1 |
| Total Lines | 55 |
| Code Lines | 36 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php |
||
| 45 | public static function testSetProvider() |
||
| 46 | { // @codingStandardsIgnoreStart |
||
| 47 | return [ |
||
| 48 | [HmacValidator::SHA512, false, ';lkjlkjlkj', 'lkjlkjhlkjh'], |
||
| 49 | [ |
||
| 50 | HmacValidator::SHA512, |
||
| 51 | true, |
||
| 52 | 'fcgtvbhjnkmlijhuiygftdrse53aes64d75f68g7u8hijohugyiftudr', |
||
| 53 | hex2bin('a527da4bd11a4be4c2c40173abca314633dee5fd106dac0ecdfdb7e341b483fb5eb480504b3292f7dfddc32838e99440a3c1ef6b5d3deb8575e49197ee4da45a') |
||
| 54 | ], |
||
| 55 | [ |
||
| 56 | HmacValidator::SHA512, |
||
| 57 | true, |
||
| 58 | 'bhyuf76fhgyuftydxcfgxh', |
||
| 59 | hex2bin('ebc146f2241440452459d149d94ad9cb31d0da2a27cbcf1aef10470576b726a0de710cc0d752d2730273039fb329ffd63705fef9df37d3a7a5d6277696a49c29') |
||
| 60 | ], |
||
| 61 | [ |
||
| 62 | HmacValidator::SHA512, |
||
| 63 | false, |
||
| 64 | '1hyuf76fhgyuftydxcfgxh', |
||
| 65 | hex2bin('a527da4bd11a4be4c2c40173abca314633dee5fd106dac0ecdfdb7e341b483fb5eb480504b3292f7dfddc32838e99440a3c1ef6b5d3deb8575e49197ee4da45a') |
||
| 66 | ], |
||
| 67 | [ |
||
| 68 | HmacValidator::SHA512, |
||
| 69 | false, |
||
| 70 | 'fcgtvbhjnkmlijhuiygftdrse53aes64d75f68g7u8hijohugyiftud1', |
||
| 71 | hex2bin('ebc146f2241440452459d149d94ad9cb31d0da2a27cbcf1aef10470576b726a0de710cc0d752d2730273039fb329ffd63705fef9df37d3a7a5d6277696a49c29') |
||
| 72 | ], |
||
| 73 | [HmacValidator::SHA256, false, ';lkjlkjlkj', 'lkjlkjhlkjh'], |
||
| 74 | [ |
||
| 75 | HmacValidator::SHA256, |
||
| 76 | true, |
||
| 77 | 'fcgtvbhjnkmlijhuiygftdrse53aes64d75f68g7u8hijohugyiftudr', |
||
| 78 | hex2bin('8e2ed246e3b0bf02fbd3746f6992e9e5237d72269e3df436019ac3c494db4613') |
||
| 79 | ], |
||
| 80 | [ |
||
| 81 | HmacValidator::SHA256, |
||
| 82 | true, |
||
| 83 | 'bhyuf76fhgyuftydxcfgxh', |
||
| 84 | hex2bin('fc086d830f0191838f310f3ed3d254b356bcff5d158ebdb69f20581d48210e45') |
||
| 85 | ], |
||
| 86 | [ |
||
| 87 | HmacValidator::SHA256, |
||
| 88 | false, |
||
| 89 | '1hyuf76fhgyuftydxcfgxh', |
||
| 90 | hex2bin('fc086d830f0191838f310f3ed3d254b356bcff5d158ebdb69f20581d48210e45') |
||
| 91 | ], |
||
| 92 | [ |
||
| 93 | HmacValidator::SHA256, |
||
| 94 | false, |
||
| 95 | 'fcgtvbhjnkmlijhuiygftdrse53aes64d75f68g7u8hijohugyiftud1', |
||
| 96 | hex2bin('8a3a90de37b15bf8667e6f69170973087d4673bd99e15ca8a67791187c224d19') |
||
| 97 | ], |
||
| 98 | ]; |
||
| 99 | }// @codingStandardsIgnoreEnd |
||
| 100 | } |
||
| 101 |