diff --git a/src/Model/YamlAlphabetical/YamlSortService.php b/src/Model/YamlAlphabetical/YamlSortService.php index e822a77..1a4ce23 100644 --- a/src/Model/YamlAlphabetical/YamlSortService.php +++ b/src/Model/YamlAlphabetical/YamlSortService.php @@ -67,8 +67,8 @@ private static function sortArrayKeyWithUnderscoresAsFirst(array $yamlArrayData, $arrayWithUnderscoreKeys = array_filter($yamlArrayData, [YamlService::class, 'hasArrayKeyUnderscoreAsFirstCharacter'], ARRAY_FILTER_USE_KEY); $arrayWithOtherKeys = array_filter($yamlArrayData, [YamlService::class, 'hasNotArrayKeyUnderscoreAsFirstCharacter'], ARRAY_FILTER_USE_KEY); - uksort($arrayWithUnderscoreKeys, ['self', 'sortArrayAlphabetical']); - uksort($arrayWithOtherKeys, ['self', 'sortArrayAlphabetical']); + uksort($arrayWithUnderscoreKeys, [__CLASS__, 'sortArrayAlphabetical']); + uksort($arrayWithOtherKeys, [__CLASS__, 'sortArrayAlphabetical']); $arrayData = array_merge($arrayWithUnderscoreKeys, $arrayWithOtherKeys); diff --git a/src/Model/YamlInline/YamlInlineChecker.php b/src/Model/YamlInline/YamlInlineChecker.php index 9523cf4..dcff2c8 100644 --- a/src/Model/YamlInline/YamlInlineChecker.php +++ b/src/Model/YamlInline/YamlInlineChecker.php @@ -30,8 +30,8 @@ public function check(string $pathToFile, StandardParametersData $standardParame $yamlLines = explode("\n", $yamlContent); $lastYamlElement = end($yamlLines); $filteredYamlLines = array_filter($yamlLines, [YamlService::class, 'isLineNotBlank']); - $filteredYamlLines = array_filter($filteredYamlLines, ['self', 'removeCommentLine']); - $filteredYamlLines = array_map(['self', 'removeComments'], $filteredYamlLines); + $filteredYamlLines = array_filter($filteredYamlLines, [__CLASS__, 'removeCommentLine']); + $filteredYamlLines = array_map([__CLASS__, 'removeComments'], $filteredYamlLines); if (YamlService::isLineBlank($lastYamlElement)) { $filteredYamlLines[] = ''; }