.php_cs_custom.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <?php
  2. /*
  3. * This file is part of PHP CS Fixer.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. * Dariusz Rumiński <dariusz.ruminski@gmail.com>
  7. *
  8. * This source file is subject to the MIT license that is bundled
  9. * with this source code in the file LICENSE.
  10. */
  11. use PhpCsFixer\ConfigInterface;
  12. /**
  13. * Custom config class/file for PHPUnit test.
  14. *
  15. * This class does NOT represent a good/sane configuration and is therefor NOT a example.
  16. *
  17. * @internal
  18. *
  19. * @author SpacePossum
  20. */
  21. final class CustomConfig implements ConfigInterface
  22. {
  23. /**
  24. * {@inheritdoc}
  25. */
  26. public function getCacheFile()
  27. {
  28. return null;
  29. }
  30. /**
  31. * {@inheritdoc}
  32. */
  33. public function getCustomFixers()
  34. {
  35. return array();
  36. }
  37. /**
  38. * {@inheritdoc}
  39. */
  40. public function getFinder()
  41. {
  42. return array(__FILE__);
  43. }
  44. /**
  45. * {@inheritdoc}
  46. */
  47. public function getFormat()
  48. {
  49. return 'txt';
  50. }
  51. /**
  52. * {@inheritdoc}
  53. */
  54. public function getHideProgress()
  55. {
  56. return false;
  57. }
  58. /**
  59. * {@inheritdoc}
  60. */
  61. public function getIndent()
  62. {
  63. return ' ';
  64. }
  65. /**
  66. * {@inheritdoc}
  67. */
  68. public function getLineEnding()
  69. {
  70. return "\n";
  71. }
  72. /**
  73. * {@inheritdoc}
  74. */
  75. public function getName()
  76. {
  77. return 'custom_config_test';
  78. }
  79. /**
  80. * {@inheritdoc}
  81. */
  82. public function getPhpExecutable()
  83. {
  84. return null;
  85. }
  86. /**
  87. * {@inheritdoc}
  88. */
  89. public function getRiskyAllowed()
  90. {
  91. return true;
  92. }
  93. /**
  94. * {@inheritdoc}
  95. */
  96. public function getRules()
  97. {
  98. return array('concat_space' => array('spacing' => 'none'));
  99. }
  100. /**
  101. * {@inheritdoc}
  102. */
  103. public function getUsingCache()
  104. {
  105. return false;
  106. }
  107. /**
  108. * {@inheritdoc}
  109. */
  110. public function registerCustomFixers($fixers)
  111. {
  112. }
  113. /**
  114. * {@inheritdoc}
  115. */
  116. public function setCacheFile($cacheFile)
  117. {
  118. return $this;
  119. }
  120. /**
  121. * {@inheritdoc}
  122. */
  123. public function setFinder($finder)
  124. {
  125. return $this;
  126. }
  127. /**
  128. * {@inheritdoc}
  129. */
  130. public function setFormat($format)
  131. {
  132. return $this;
  133. }
  134. /**
  135. * {@inheritdoc}
  136. */
  137. public function setHideProgress($hideProgress)
  138. {
  139. return $this;
  140. }
  141. /**
  142. * {@inheritdoc}
  143. */
  144. public function setIndent($indent)
  145. {
  146. return $this;
  147. }
  148. /**
  149. * {@inheritdoc}
  150. */
  151. public function setLineEnding($lineEnding)
  152. {
  153. return $this;
  154. }
  155. /**
  156. * {@inheritdoc}
  157. */
  158. public function setPhpExecutable($phpExecutable)
  159. {
  160. return $this;
  161. }
  162. /**
  163. * {@inheritdoc}
  164. */
  165. public function setRiskyAllowed($isRiskyAllowed)
  166. {
  167. return $this;
  168. }
  169. /**
  170. * {@inheritdoc}
  171. */
  172. public function setRules(array $rules)
  173. {
  174. return $this;
  175. }
  176. /**
  177. * {@inheritdoc}
  178. */
  179. public function setUsingCache($usingCache)
  180. {
  181. return $this;
  182. }
  183. }
  184. return new CustomConfig();