Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. JsonFile.php

function JsonFile::detectIndenting

2 calls to JsonFile::detectIndenting()
JsonFile::read in vendor/composer/composer/src/Composer/Json/JsonFile.php
Reads json file.
JsonManipulator::detectIndenting in vendor/composer/composer/src/Composer/Json/JsonManipulator.php

File

vendor/composer/composer/src/Composer/Json/JsonFile.php, line 386

Class

JsonFile
Reads/writes json files.

Namespace

Composer\Json

Code

public static function detectIndenting(?string $json) : string {
    if (Preg::isMatchStrictGroups('#^([ \\t]+)"#m', $json ?? '', $match)) {
        return $match[1];
    }
    return self::INDENT_DEFAULT;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal