Loading core/includes/install.inc +4 −4 Original line number Diff line number Diff line Loading @@ -574,14 +574,14 @@ function drupal_install_system($install_state) { * An optional bitmask created from various FILE_* constants. * @param $type * The type of file. Can be file (default), dir, or link. * @param bool $autofix * @param bool $auto_fix * (optional) Determines whether to attempt fixing the permissions according * to the provided $mask. Defaults to TRUE. * * @return bool * TRUE on success or FALSE on failure. A message is set for the latter. */ function drupal_verify_install_file($file, $mask = NULL, $type = 'file', $autofix = TRUE) { function drupal_verify_install_file($file, $mask = NULL, $type = 'file', $auto_fix = TRUE) { $return = TRUE; // Check for files that shouldn't be there. if (isset($mask) && ($mask & FILE_NOT_EXIST) && file_exists($file)) { Loading @@ -603,7 +603,7 @@ function drupal_verify_install_file($file, $mask = NULL, $type = 'file', $autofi switch ($current_mask) { case FILE_EXIST: if (!file_exists($file)) { if ($type == 'dir' && $autofix) { if ($type == 'dir' && $auto_fix) { drupal_install_mkdir($file, $mask); } if (!file_exists($file)) { Loading Loading @@ -651,7 +651,7 @@ function drupal_verify_install_file($file, $mask = NULL, $type = 'file', $autofi } } } if (!$return && $autofix) { if (!$return && $auto_fix) { return drupal_install_fix_file($file, $mask); } return $return; Loading core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php +2 −2 Original line number Diff line number Diff line Loading @@ -637,8 +637,8 @@ private function Annotations() } $this->isNestedAnnotation = false; if (false !== $annot = $this->Annotation()) { $annotations[] = $annot; if (false !== $annotation = $this->Annotation()) { $annotations[] = $annotation; } } Loading core/lib/Drupal/Component/Annotation/Doctrine/SimpleAnnotationReader.php +9 −9 Original line number Diff line number Diff line Loading @@ -122,9 +122,9 @@ public function getPropertyAnnotations(\ReflectionProperty $property) */ public function getClassAnnotation(\ReflectionClass $class, $annotationName) { foreach ($this->getClassAnnotations($class) as $annot) { if ($annot instanceof $annotationName) { return $annot; foreach ($this->getClassAnnotations($class) as $annotation) { if ($annotation instanceof $annotationName) { return $annotation; } } Loading @@ -136,9 +136,9 @@ public function getClassAnnotation(\ReflectionClass $class, $annotationName) */ public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) { foreach ($this->getMethodAnnotations($method) as $annot) { if ($annot instanceof $annotationName) { return $annot; foreach ($this->getMethodAnnotations($method) as $annotation) { if ($annotation instanceof $annotationName) { return $annotation; } } Loading @@ -150,9 +150,9 @@ public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) */ public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName) { foreach ($this->getPropertyAnnotations($property) as $annot) { if ($annot instanceof $annotationName) { return $annot; foreach ($this->getPropertyAnnotations($property) as $annotation) { if ($annotation instanceof $annotationName) { return $annotation; } } Loading core/lib/Drupal/Component/Datetime/DateTimePlus.php +5 −5 Original line number Diff line number Diff line Loading @@ -246,15 +246,15 @@ public static function createFromFormat($format, $time, $timezone = NULL, $setti // Tries to create a date from the format and use it if possible. // A regular try/catch won't work right here, if the value is // invalid it doesn't return an exception. $datetimeplus = new static('', $timezone, $settings); $datetime_plus = new static('', $timezone, $settings); $date = \DateTime::createFromFormat($format, $time, $datetimeplus->getTimezone()); $date = \DateTime::createFromFormat($format, $time, $datetime_plus->getTimezone()); if (!$date instanceof \DateTime) { throw new \InvalidArgumentException('The date cannot be created from a format.'); } else { $datetimeplus->setTimestamp($date->getTimestamp()); $datetimeplus->setTimezone($date->getTimezone()); $datetime_plus->setTimestamp($date->getTimestamp()); $datetime_plus->setTimezone($date->getTimezone()); // Functions that parse date is forgiving, it might create a date that // is not exactly a match for the provided value, so test for that by Loading @@ -265,7 +265,7 @@ public static function createFromFormat($format, $time, $timezone = NULL, $setti throw new \UnexpectedValueException('The created date does not match the input value.'); } } return $datetimeplus; return $datetime_plus; } /** Loading core/lib/Drupal/Component/Gettext/PoHeader.php +19 −19 Original line number Diff line number Diff line Loading @@ -180,7 +180,7 @@ public function __toString() { /** * Parses a Plural-Forms entry from a Gettext Portable Object file header. * * @param string $pluralforms * @param string $plural_forms * The Plural-Forms entry value. * * @return array|bool Loading @@ -191,13 +191,13 @@ public function __toString() { * * @throws \Exception */ public function parsePluralForms($pluralforms) { public function parsePluralForms($plural_forms) { $plurals = []; // First, delete all whitespace. $pluralforms = strtr($pluralforms, [" " => "", "\t" => ""]); $plural_forms = strtr($plural_forms, [" " => "", "\t" => ""]); // Select the parts that define nplurals and plural. $nplurals = strstr($pluralforms, "nplurals="); $nplurals = strstr($plural_forms, "nplurals="); if (strpos($nplurals, ";")) { // We want the string from the 10th char, because "nplurals=" length is 9. $nplurals = substr($nplurals, 9, strpos($nplurals, ";") - 9); Loading @@ -205,7 +205,7 @@ public function parsePluralForms($pluralforms) { else { return FALSE; } $plural = strstr($pluralforms, "plural="); $plural = strstr($plural_forms, "plural="); if (strpos($plural, ";")) { // We want the string from the 8th char, because "plural=" length is 7. $plural = substr($plural, 7, strpos($plural, ";") - 7); Loading Loading @@ -303,24 +303,24 @@ private function parseArithmetic($string) { $operator_stack[] = $current_token; } elseif ($current_token == ")") { $topop = array_pop($operator_stack); while (isset($topop) && ($topop != "(")) { $element_stack[] = $topop; $topop = array_pop($operator_stack); $top_op = array_pop($operator_stack); while (isset($top_op) && ($top_op != "(")) { $element_stack[] = $top_op; $top_op = array_pop($operator_stack); } } elseif (!empty($precedence[$current_token])) { // If it's an operator, then pop from $operator_stack into // $element_stack until the precedence in $operator_stack is less // than current, then push into $operator_stack. $topop = array_pop($operator_stack); while (isset($topop) && ($precedence[$topop] >= $precedence[$current_token]) && !(($precedence[$topop] == $precedence[$current_token]) && !empty($right_associativity[$topop]) && !empty($right_associativity[$current_token]))) { $element_stack[] = $topop; $topop = array_pop($operator_stack); $top_op = array_pop($operator_stack); while (isset($top_op) && ($precedence[$top_op] >= $precedence[$current_token]) && !(($precedence[$top_op] == $precedence[$current_token]) && !empty($right_associativity[$top_op]) && !empty($right_associativity[$current_token]))) { $element_stack[] = $top_op; $top_op = array_pop($operator_stack); } if ($topop) { if ($top_op) { // Return element to top. $operator_stack[] = $topop; $operator_stack[] = $top_op; } // Parentheses are not needed. $operator_stack[] = $current_token; Loading @@ -331,10 +331,10 @@ private function parseArithmetic($string) { } // Flush operator stack. $topop = array_pop($operator_stack); while ($topop != NULL) { $element_stack[] = $topop; $topop = array_pop($operator_stack); $top_op = array_pop($operator_stack); while ($top_op != NULL) { $element_stack[] = $top_op; $top_op = array_pop($operator_stack); } $return = $element_stack; Loading Loading
core/includes/install.inc +4 −4 Original line number Diff line number Diff line Loading @@ -574,14 +574,14 @@ function drupal_install_system($install_state) { * An optional bitmask created from various FILE_* constants. * @param $type * The type of file. Can be file (default), dir, or link. * @param bool $autofix * @param bool $auto_fix * (optional) Determines whether to attempt fixing the permissions according * to the provided $mask. Defaults to TRUE. * * @return bool * TRUE on success or FALSE on failure. A message is set for the latter. */ function drupal_verify_install_file($file, $mask = NULL, $type = 'file', $autofix = TRUE) { function drupal_verify_install_file($file, $mask = NULL, $type = 'file', $auto_fix = TRUE) { $return = TRUE; // Check for files that shouldn't be there. if (isset($mask) && ($mask & FILE_NOT_EXIST) && file_exists($file)) { Loading @@ -603,7 +603,7 @@ function drupal_verify_install_file($file, $mask = NULL, $type = 'file', $autofi switch ($current_mask) { case FILE_EXIST: if (!file_exists($file)) { if ($type == 'dir' && $autofix) { if ($type == 'dir' && $auto_fix) { drupal_install_mkdir($file, $mask); } if (!file_exists($file)) { Loading Loading @@ -651,7 +651,7 @@ function drupal_verify_install_file($file, $mask = NULL, $type = 'file', $autofi } } } if (!$return && $autofix) { if (!$return && $auto_fix) { return drupal_install_fix_file($file, $mask); } return $return; Loading
core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php +2 −2 Original line number Diff line number Diff line Loading @@ -637,8 +637,8 @@ private function Annotations() } $this->isNestedAnnotation = false; if (false !== $annot = $this->Annotation()) { $annotations[] = $annot; if (false !== $annotation = $this->Annotation()) { $annotations[] = $annotation; } } Loading
core/lib/Drupal/Component/Annotation/Doctrine/SimpleAnnotationReader.php +9 −9 Original line number Diff line number Diff line Loading @@ -122,9 +122,9 @@ public function getPropertyAnnotations(\ReflectionProperty $property) */ public function getClassAnnotation(\ReflectionClass $class, $annotationName) { foreach ($this->getClassAnnotations($class) as $annot) { if ($annot instanceof $annotationName) { return $annot; foreach ($this->getClassAnnotations($class) as $annotation) { if ($annotation instanceof $annotationName) { return $annotation; } } Loading @@ -136,9 +136,9 @@ public function getClassAnnotation(\ReflectionClass $class, $annotationName) */ public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) { foreach ($this->getMethodAnnotations($method) as $annot) { if ($annot instanceof $annotationName) { return $annot; foreach ($this->getMethodAnnotations($method) as $annotation) { if ($annotation instanceof $annotationName) { return $annotation; } } Loading @@ -150,9 +150,9 @@ public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) */ public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName) { foreach ($this->getPropertyAnnotations($property) as $annot) { if ($annot instanceof $annotationName) { return $annot; foreach ($this->getPropertyAnnotations($property) as $annotation) { if ($annotation instanceof $annotationName) { return $annotation; } } Loading
core/lib/Drupal/Component/Datetime/DateTimePlus.php +5 −5 Original line number Diff line number Diff line Loading @@ -246,15 +246,15 @@ public static function createFromFormat($format, $time, $timezone = NULL, $setti // Tries to create a date from the format and use it if possible. // A regular try/catch won't work right here, if the value is // invalid it doesn't return an exception. $datetimeplus = new static('', $timezone, $settings); $datetime_plus = new static('', $timezone, $settings); $date = \DateTime::createFromFormat($format, $time, $datetimeplus->getTimezone()); $date = \DateTime::createFromFormat($format, $time, $datetime_plus->getTimezone()); if (!$date instanceof \DateTime) { throw new \InvalidArgumentException('The date cannot be created from a format.'); } else { $datetimeplus->setTimestamp($date->getTimestamp()); $datetimeplus->setTimezone($date->getTimezone()); $datetime_plus->setTimestamp($date->getTimestamp()); $datetime_plus->setTimezone($date->getTimezone()); // Functions that parse date is forgiving, it might create a date that // is not exactly a match for the provided value, so test for that by Loading @@ -265,7 +265,7 @@ public static function createFromFormat($format, $time, $timezone = NULL, $setti throw new \UnexpectedValueException('The created date does not match the input value.'); } } return $datetimeplus; return $datetime_plus; } /** Loading
core/lib/Drupal/Component/Gettext/PoHeader.php +19 −19 Original line number Diff line number Diff line Loading @@ -180,7 +180,7 @@ public function __toString() { /** * Parses a Plural-Forms entry from a Gettext Portable Object file header. * * @param string $pluralforms * @param string $plural_forms * The Plural-Forms entry value. * * @return array|bool Loading @@ -191,13 +191,13 @@ public function __toString() { * * @throws \Exception */ public function parsePluralForms($pluralforms) { public function parsePluralForms($plural_forms) { $plurals = []; // First, delete all whitespace. $pluralforms = strtr($pluralforms, [" " => "", "\t" => ""]); $plural_forms = strtr($plural_forms, [" " => "", "\t" => ""]); // Select the parts that define nplurals and plural. $nplurals = strstr($pluralforms, "nplurals="); $nplurals = strstr($plural_forms, "nplurals="); if (strpos($nplurals, ";")) { // We want the string from the 10th char, because "nplurals=" length is 9. $nplurals = substr($nplurals, 9, strpos($nplurals, ";") - 9); Loading @@ -205,7 +205,7 @@ public function parsePluralForms($pluralforms) { else { return FALSE; } $plural = strstr($pluralforms, "plural="); $plural = strstr($plural_forms, "plural="); if (strpos($plural, ";")) { // We want the string from the 8th char, because "plural=" length is 7. $plural = substr($plural, 7, strpos($plural, ";") - 7); Loading Loading @@ -303,24 +303,24 @@ private function parseArithmetic($string) { $operator_stack[] = $current_token; } elseif ($current_token == ")") { $topop = array_pop($operator_stack); while (isset($topop) && ($topop != "(")) { $element_stack[] = $topop; $topop = array_pop($operator_stack); $top_op = array_pop($operator_stack); while (isset($top_op) && ($top_op != "(")) { $element_stack[] = $top_op; $top_op = array_pop($operator_stack); } } elseif (!empty($precedence[$current_token])) { // If it's an operator, then pop from $operator_stack into // $element_stack until the precedence in $operator_stack is less // than current, then push into $operator_stack. $topop = array_pop($operator_stack); while (isset($topop) && ($precedence[$topop] >= $precedence[$current_token]) && !(($precedence[$topop] == $precedence[$current_token]) && !empty($right_associativity[$topop]) && !empty($right_associativity[$current_token]))) { $element_stack[] = $topop; $topop = array_pop($operator_stack); $top_op = array_pop($operator_stack); while (isset($top_op) && ($precedence[$top_op] >= $precedence[$current_token]) && !(($precedence[$top_op] == $precedence[$current_token]) && !empty($right_associativity[$top_op]) && !empty($right_associativity[$current_token]))) { $element_stack[] = $top_op; $top_op = array_pop($operator_stack); } if ($topop) { if ($top_op) { // Return element to top. $operator_stack[] = $topop; $operator_stack[] = $top_op; } // Parentheses are not needed. $operator_stack[] = $current_token; Loading @@ -331,10 +331,10 @@ private function parseArithmetic($string) { } // Flush operator stack. $topop = array_pop($operator_stack); while ($topop != NULL) { $element_stack[] = $topop; $topop = array_pop($operator_stack); $top_op = array_pop($operator_stack); while ($top_op != NULL) { $element_stack[] = $top_op; $top_op = array_pop($operator_stack); } $return = $element_stack; Loading