| Conditions | 1 |
| Paths | 1 |
| Total Lines | 133 |
| Code Lines | 73 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 6 | ||
| Bugs | 0 | Features | 2 |
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 |
||
| 28 | public function validConfigurationProvider() { |
||
| 29 | return [ |
||
| 30 | [ |
||
| 31 | [ |
||
| 32 | 'backend' => 'api', |
||
| 33 | 'api' => [ |
||
| 34 | 'url' => 'http://www.wikidata.org/w/api.php' |
||
| 35 | ] |
||
| 36 | ], |
||
| 37 | [ |
||
| 38 | 'backend' => 'api', |
||
| 39 | 'api' => [ |
||
| 40 | 'url' => 'http://www.wikidata.org/w/api.php' |
||
| 41 | ], |
||
| 42 | 'options' => [] |
||
| 43 | ] |
||
| 44 | ], |
||
| 45 | [ |
||
| 46 | [ |
||
| 47 | 'backend' => 'api', |
||
| 48 | 'api' => [ |
||
| 49 | 'url' => 'http://www.wikidata.org/w/api.php', |
||
| 50 | 'wikidataquery-url' => 'http://wdq.wmflabs.org/api' |
||
| 51 | ] |
||
| 52 | ], |
||
| 53 | [ |
||
| 54 | 'backend' => 'api', |
||
| 55 | 'api' => [ |
||
| 56 | 'url' => 'http://www.wikidata.org/w/api.php', |
||
| 57 | 'wikidataquery_url' => 'http://wdq.wmflabs.org/api' |
||
| 58 | ], |
||
| 59 | 'options' => [] |
||
| 60 | ] |
||
| 61 | ], |
||
| 62 | [ |
||
| 63 | [ |
||
| 64 | 'backend' => 'mongodb', |
||
| 65 | 'mongodb' => [ |
||
| 66 | 'server' => '' |
||
| 67 | ] |
||
| 68 | ], |
||
| 69 | [ |
||
| 70 | 'backend' => 'mongodb', |
||
| 71 | 'mongodb' => [ |
||
| 72 | 'server' => '', |
||
| 73 | 'database' => 'wikibase' |
||
| 74 | ], |
||
| 75 | 'options' => [] |
||
| 76 | ] |
||
| 77 | ], |
||
| 78 | [ |
||
| 79 | [ |
||
| 80 | 'backend' => 'api', |
||
| 81 | 'api' => [ |
||
| 82 | 'url' => 'http://www.wikidata.org/w/api.php' |
||
| 83 | ], |
||
| 84 | 'cache' => [ |
||
| 85 | 'memcached' => true, |
||
| 86 | 'array' => true |
||
| 87 | ] |
||
| 88 | ], |
||
| 89 | [ |
||
| 90 | 'backend' => 'api', |
||
| 91 | 'api' => [ |
||
| 92 | 'url' => 'http://www.wikidata.org/w/api.php' |
||
| 93 | ], |
||
| 94 | 'cache' => [ |
||
| 95 | 'lifetime' => 0, |
||
| 96 | 'memcached' => [ |
||
| 97 | 'enabled' => true, |
||
| 98 | 'host' => 'localhost', |
||
| 99 | 'port' => 11211 |
||
| 100 | ], |
||
| 101 | 'array' => [ |
||
| 102 | 'enabled' => true |
||
| 103 | ] |
||
| 104 | ], |
||
| 105 | 'options' => [] |
||
| 106 | ] |
||
| 107 | ], |
||
| 108 | [ |
||
| 109 | [ |
||
| 110 | 'backend' => 'api', |
||
| 111 | 'api' => [ |
||
| 112 | 'url' => 'http://www.wikidata.org/w/api.php' |
||
| 113 | ], |
||
| 114 | 'cache' => [ |
||
| 115 | 'lifetime' => 30000, |
||
| 116 | 'memcached' => false, |
||
| 117 | 'array' => false |
||
| 118 | ] |
||
| 119 | ], |
||
| 120 | [ |
||
| 121 | 'backend' => 'api', |
||
| 122 | 'api' => [ |
||
| 123 | 'url' => 'http://www.wikidata.org/w/api.php' |
||
| 124 | ], |
||
| 125 | 'cache' => [ |
||
| 126 | 'lifetime' => 30000, |
||
| 127 | 'memcached' => [ |
||
| 128 | 'enabled' => false, |
||
| 129 | 'host' => 'localhost', |
||
| 130 | 'port' => 11211 |
||
| 131 | ], |
||
| 132 | 'array' => [ |
||
| 133 | 'enabled' => false |
||
| 134 | ] |
||
| 135 | ], |
||
| 136 | 'options' => [] |
||
| 137 | ] |
||
| 138 | ], |
||
| 139 | [ |
||
| 140 | [ |
||
| 141 | 'backend' => 'api', |
||
| 142 | 'api' => [ |
||
| 143 | 'url' => 'http://www.wikidata.org/w/api.php' |
||
| 144 | ], |
||
| 145 | 'options' => [ |
||
| 146 | 'languages' => [ 'en', 'fr' ] |
||
| 147 | ] |
||
| 148 | ], |
||
| 149 | [ |
||
| 150 | 'backend' => 'api', |
||
| 151 | 'api' => [ |
||
| 152 | 'url' => 'http://www.wikidata.org/w/api.php' |
||
| 153 | ], |
||
| 154 | 'options' => [ |
||
| 155 | 'languages' => [ 'en', 'fr' ] |
||
| 156 | ] |
||
| 157 | ] |
||
| 158 | ], |
||
| 159 | ]; |
||
| 160 | } |
||
| 161 | |||
| 274 |