Merge branch '5.1' into 5.2
* 5.1: Changed private static array-properties to const static properties newly introduced in 5.1
This commit is contained in:
commit
e23aae35c1
@ -36,7 +36,7 @@ use Symfony\Component\Security\Http\SecurityEvents;
|
||||
*/
|
||||
class RegisterGlobalSecurityEventListenersPass implements CompilerPassInterface
|
||||
{
|
||||
private static $eventBubblingEvents = [
|
||||
private const EVENT_BUBBLING_EVENTS = [
|
||||
CheckPassportEvent::class,
|
||||
LoginFailureEvent::class,
|
||||
LoginSuccessEvent::class,
|
||||
@ -75,7 +75,7 @@ class RegisterGlobalSecurityEventListenersPass implements CompilerPassInterface
|
||||
}
|
||||
|
||||
$methodCallArguments = $methodCall[1];
|
||||
if (!\in_array($methodCallArguments[0], self::$eventBubblingEvents, true)) {
|
||||
if (!\in_array($methodCallArguments[0], self::EVENT_BUBBLING_EVENTS, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ This conversation was marked as resolved by lstrojny
|
||||
|
||||
protected $maxIdLength = 250;
|
||||
|
||||
private static $defaultClientOptions = [
|
||||
private const DEFAULT_CLIENT_OPTIONS = [
|
||||
'persistent_id' => null,
|
||||
'username' => null,
|
||||
'password' => null,
|
||||
@ -108,7 +108,7 @@ This conversation was marked as resolved by lstrojny
|
||||
}
|
||||
set_error_handler(function ($type, $msg, $file, $line) { throw new \ErrorException($msg, 0, $type, $file, $line); });
|
||||
try {
|
||||
$options += static::$defaultClientOptions;
|
||||
$options += static::DEFAULT_CLIENT_OPTIONS;
|
||||
$client = new \Memcached($options['persistent_id']);
|
||||
$username = $options['username'];
|
||||
$password = $options['password'];
|
||||
|
@ -138,7 +138,7 @@ final class EnglishInflector implements InflectorInterface
|
||||
*
|
||||
* @see http://english-zone.com/spelling/plurals.html
|
||||
*/
|
||||
private static $singularMap = [
|
||||
private const SINGULAR_MAP = [
|
||||
// First entry: singular suffix, reversed
|
||||
// Second entry: length of singular suffix
|
||||
// Third entry: Whether the suffix may succeed a vocal
|
||||
@ -304,7 +304,7 @@ final class EnglishInflector implements InflectorInterface
|
||||
/**
|
||||
* A list of words which should not be inflected, reversed.
|
||||
*/
|
||||
private static $uninflected = [
|
||||
private const UNINFLECTED = [
|
||||
'',
|
||||
'atad',
|
||||
'reed',
|
||||
@ -327,7 +327,7 @@ final class EnglishInflector implements InflectorInterface
|
||||
$pluralLength = \strlen($lowerPluralRev);
|
||||
|
||||
// Check if the word is one which is not inflected, return early if so
|
||||
if (\in_array($lowerPluralRev, self::$uninflected, true)) {
|
||||
if (\in_array($lowerPluralRev, self::UNINFLECTED, true)) {
|
||||
return [$plural];
|
||||
}
|
||||
|
||||
@ -406,7 +406,7 @@ final class EnglishInflector implements InflectorInterface
|
||||
$singularLength = \strlen($lowerSingularRev);
|
||||
|
||||
// Check if the word is one which is not inflected, return early if so
|
||||
if (\in_array($lowerSingularRev, self::$uninflected, true)) {
|
||||
if (\in_array($lowerSingularRev, self::UNINFLECTED, true)) {
|
||||
return [$singular];
|
||||
}
|
||||
|
||||
@ -414,7 +414,7 @@ final class EnglishInflector implements InflectorInterface
|
||||
// The inner loop $j iterates over the characters of the singular suffix
|
||||
// in the singular table to compare them with the characters of the actual
|
||||
// given singular suffix
|
||||
foreach (self::$singularMap as $map) {
|
||||
foreach (self::SINGULAR_MAP as $map) {
|
||||
$suffix = $map[0];
|
||||
$suffixLength = $map[1];
|
||||
$j = 0;
|
||||
|
Reference in New Issue
Block a user