Skip to content

Commit 7438076

Browse files
Merge branch 'first_tests' into phpdoc
2 parents b3c1e28 + 8d43daf commit 7438076

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/Container/File.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class File
1414
const TYPE_SASS = 'sass';
1515
const TYPE_SCSS = 'scss';
1616
const TYPE_LESS = 'less';
17-
const SUPPORTED_TYPES = [
17+
static $supportedTypes = [
1818
self::TYPE_COMPASS,
1919
self::TYPE_SASS,
2020
self::TYPE_SCSS,
@@ -182,7 +182,7 @@ protected function detectSourceTypeFromPath($path)
182182
{
183183
$extension = strtolower(pathinfo($path, PATHINFO_EXTENSION));
184184

185-
return in_array($extension, static::SUPPORTED_TYPES)
185+
return in_array($extension, static::$supportedTypes)
186186
? $extension
187187
: static::TYPE_UNKNOWN;
188188
}

src/Processor/Processor.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Processor
1919
const FORMATTER_EXPANDED = 'expanded';
2020
const FORMATTER_NESTED = 'nested';
2121
const FORMATTER_COMPACT = 'compact';
22-
const SUPPORTED_FORMATTERS = [
22+
static $supportedFormatters = [
2323
self::FORMATTER_COMPRESSED,
2424
self::FORMATTER_CRUNCHED,
2525
self::FORMATTER_EXPANDED,
@@ -170,8 +170,8 @@ public function processFile(File $file)
170170
*/
171171
protected function getFormatterClass($formatter)
172172
{
173-
if (!in_array($formatter, static::SUPPORTED_FORMATTERS)) {
174-
throw new \InvalidArgumentException('unknown formatter, available options are: ' . print_r(static::SUPPORTED_FORMATTERS, true));
173+
if (!in_array($formatter, static::$supportedFormatters)) {
174+
throw new \InvalidArgumentException('unknown formatter, available options are: ' . print_r(static::$supportedFormatters, true));
175175
}
176176

177177
return 'Leafo\\ScssPhp\\Formatter\\' . ucfirst($formatter);

tests/phpunit/ProcessorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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(

tests/shared-enviroment/IntegrationTestSuite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ abstract class IntegrationTestSuite extends \PHPUnit_Framework_TestCase
1919
* @return mixed
2020
* @throws \Exception
2121
*/
22-
protected function invokeMethod($object, string $methodName, array $methodArguments = [])
22+
protected function invokeMethod($object, $methodName, array $methodArguments = [])
2323
{
2424
$method = (new \ReflectionClass(get_class($object)))->getMethod($methodName);
2525
$method->setAccessible(true);

0 commit comments

Comments
 (0)