Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.
   1  <?php
   2  
   3  /**
   4   * SCSSPHP
   5   *
   6   * @copyright 2012-2020 Leaf Corcoran
   7   *
   8   * @license http://opensource.org/licenses/MIT MIT
   9   *
  10   * @link http://scssphp.github.io/scssphp
  11   */
  12  
  13  namespace ScssPhp\ScssPhp\Compiler;
  14  
  15  use ScssPhp\ScssPhp\CompilationResult;
  16  
  17  /**
  18   * @internal
  19   */
  20  class CachedResult
  21  {
  22      /**
  23       * @var CompilationResult
  24       */
  25      private $result;
  26  
  27      /**
  28       * @var array<string, int>
  29       */
  30      private $parsedFiles;
  31  
  32      /**
  33       * @var array
  34       * @phpstan-var list<array{currentDir: string|null, path: string, filePath: string}>
  35       */
  36      private $resolvedImports;
  37  
  38      /**
  39       * @param CompilationResult  $result
  40       * @param array<string, int> $parsedFiles
  41       * @param array              $resolvedImports
  42       *
  43       * @phpstan-param list<array{currentDir: string|null, path: string, filePath: string}> $resolvedImports
  44       */
  45      public function __construct(CompilationResult $result, array $parsedFiles, array $resolvedImports)
  46      {
  47          $this->result = $result;
  48          $this->parsedFiles = $parsedFiles;
  49          $this->resolvedImports = $resolvedImports;
  50      }
  51  
  52      /**
  53       * @return CompilationResult
  54       */
  55      public function getResult()
  56      {
  57          return $this->result;
  58      }
  59  
  60      /**
  61       * @return array<string, int>
  62       */
  63      public function getParsedFiles()
  64      {
  65          return $this->parsedFiles;
  66      }
  67  
  68      /**
  69       * @return array
  70       *
  71       * @phpstan-return list<array{currentDir: string|null, path: string, filePath: string}>
  72       */
  73      public function getResolvedImports()
  74      {
  75          return $this->resolvedImports;
  76      }
  77  }