File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ class File
1111 const TYPE_SASS = 'sass ' ;
1212 const TYPE_SCSS = 'scss ' ;
1313 const TYPE_LESS = 'less ' ;
14- const SUPPORTED_TYPES = [
14+ static $ supportedTypes = [
1515 self ::TYPE_COMPASS ,
1616 self ::TYPE_SASS ,
1717 self ::TYPE_SCSS ,
@@ -179,7 +179,7 @@ protected function detectSourceTypeFromPath($path)
179179 {
180180 $ extension = strtolower (pathinfo ($ path , PATHINFO_EXTENSION ));
181181
182- return in_array ($ extension , static ::SUPPORTED_TYPES )
182+ return in_array ($ extension , static ::$ supportedTypes )
183183 ? $ extension
184184 : static ::TYPE_UNKNOWN ;
185185 }
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ class Processor
1616 const FORMATTER_EXPANDED = 'expanded ' ;
1717 const FORMATTER_NESTED = 'nested ' ;
1818 const FORMATTER_COMPACT = 'compact ' ;
19- const SUPPORTED_FORMATTERS = [
19+ static $ supportedFormatters = [
2020 self ::FORMATTER_COMPRESSED ,
2121 self ::FORMATTER_CRUNCHED ,
2222 self ::FORMATTER_EXPANDED ,
@@ -167,8 +167,8 @@ public function processFile(File $file)
167167 */
168168 protected function getFormatterClass ($ formatter )
169169 {
170- if (!in_array ($ formatter , static ::SUPPORTED_FORMATTERS )) {
171- throw new \InvalidArgumentException ('unknown formatter, available options are: ' . print_r (static ::SUPPORTED_FORMATTERS , true ));
170+ if (!in_array ($ formatter , static ::$ supportedFormatters )) {
171+ throw new \InvalidArgumentException ('unknown formatter, available options are: ' . print_r (static ::$ supportedFormatters , true ));
172172 }
173173
174174 return 'Leafo \\ScssPhp \\Formatter \\' . ucfirst ($ formatter );
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ public function processFileExpectedException()
9393 */
9494 public function getFormatterClass ()
9595 {
96- foreach (Processor::SUPPORTED_FORMATTERS as $ formatter ) {
96+ foreach (Processor::$ supportedFormatters as $ formatter ) {
9797 $ expected = 'Leafo \\ScssPhp \\Formatter \\' . ucfirst ($ formatter );
9898
9999 $ this ->assertEquals (
You can’t perform that action at this time.
0 commit comments