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.

Differences Between: [Versions 401 and 402] [Versions 401 and 403]

   1  <?php
   2  
   3  namespace PhpOffice\PhpSpreadsheet\Reader\Xml\Style;
   4  
   5  use SimpleXMLElement;
   6  
   7  abstract class StyleBase
   8  {
   9      protected static function identifyFixedStyleValue(array $styleList, string &$styleAttributeValue): bool
  10      {
  11          $returnValue = false;
  12  
  13          $styleAttributeValue = strtolower($styleAttributeValue);
  14          foreach ($styleList as $style) {
  15              if ($styleAttributeValue == strtolower($style)) {
  16                  $styleAttributeValue = $style;
  17                  $returnValue = true;
  18  
  19                  break;
  20              }
  21          }
  22  
  23          return $returnValue;
  24      }
  25  
  26      protected static function getAttributes(?SimpleXMLElement $simple, string $node): SimpleXMLElement
  27      {
  28          return ($simple === null)
  29              ? new SimpleXMLElement('<xml></xml>')
  30              : ($simple->attributes($node) ?? new SimpleXMLElement('<xml></xml>'));
  31      }
  32  }