placeholder = $placeholderFactory->create(PlaceholderFactory::TYPE_ENVIRONMENT); $this->source = $source; $this->typePool = $typePool ?: ObjectManager::getInstance()->get(TypePool::class); } /** * Retrieves comments for the configuration export file. * * If there are sensitive fields in the configuration fields, * a list with descriptions of these fields will be added to the comments. * * @return string * @since 100.1.2 */ public function get() { $comments = []; foreach ($this->source->getExcludedFields() as $path) { if ($this->typePool->isPresent($path, TypePool::TYPE_SENSITIVE)) { $comments[] = $this->placeholder->generate($path) . ' for ' . $path; } } if (!empty($comments)) { $comments = array_merge([ 'Shared configuration was written to config.php and system-specific configuration to env.php.', 'Shared configuration file (config.php) doesn\'t contain sensitive data for security reasons.', 'Sensitive data can be stored in the following environment variables:' ], $comments); } return implode(PHP_EOL, $comments); } }