.php_cs_custom.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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 getName()
  62. {
  63. return 'custom_config_test';
  64. }
  65. /**
  66. * {@inheritdoc}
  67. */
  68. public function getPhpExecutable()
  69. {
  70. return null;
  71. }
  72. /**
  73. * {@inheritdoc}
  74. */
  75. public function getRiskyAllowed()
  76. {
  77. return true;
  78. }
  79. /**
  80. * {@inheritdoc}
  81. */
  82. public function getRules()
  83. {
  84. return array('concat_without_spaces' => true);
  85. }
  86. /**
  87. * {@inheritdoc}
  88. */
  89. public function getUsingCache()
  90. {
  91. return false;
  92. }
  93. /**
  94. * {@inheritdoc}
  95. */
  96. public function registerCustomFixers($fixers)
  97. {
  98. }
  99. /**
  100. * {@inheritdoc}
  101. */
  102. public function setCacheFile($cacheFile)
  103. {
  104. return $this;
  105. }
  106. /**
  107. * {@inheritdoc}
  108. */
  109. public function setFinder($finder)
  110. {
  111. return $this;
  112. }
  113. /**
  114. * {@inheritdoc}
  115. */
  116. public function setFormat($format)
  117. {
  118. return $this;
  119. }
  120. /**
  121. * {@inheritdoc}
  122. */
  123. public function setHideProgress($hideProgress)
  124. {
  125. return $this;
  126. }
  127. /**
  128. * {@inheritdoc}
  129. */
  130. public function setPhpExecutable($phpExecutable)
  131. {
  132. return $this;
  133. }
  134. /**
  135. * {@inheritdoc}
  136. */
  137. public function setRiskyAllowed($isRiskyAllowed)
  138. {
  139. return $this;
  140. }
  141. /**
  142. * {@inheritdoc}
  143. */
  144. public function setRules(array $rules)
  145. {
  146. return $this;
  147. }
  148. /**
  149. * {@inheritdoc}
  150. */
  151. public function setUsingCache($usingCache)
  152. {
  153. return $this;
  154. }
  155. }
  156. return new CustomConfig();