namespace Symfony\Component\HttpFoundation\Session\Attribute; class NamespacedAttributeBag extends AttributeBag { ... public function get($name, $default = null) { /* * protected function &resolveAttributePath($name, $writeContext = false); * reference mismatch,        */ $attributes = $this->resolveAttributePath($name); ... } ... }   public function get($name, $default = null) { $attributes = &$this->resolveAttributePath($name); ... }  namespace Symfony\Component\Console\Descriptor; class ApplicationDescription { ... private function sortCommands(array $commands) { ... foreach ($namespacedCommands as &$commands) { ksort($commands); } /* *   -   $commands, *    $namespacedCommands   */ return $namespacedCommands; } ... }   private function sortCommands(array $commands) { ... foreach ($namespacedCommands as &$commands) { ksort($commands); } unset($commands); ... return $namespacedCommands; }  // if (false !== strpos($lang, '-')) -   if (strstr($lang, '-')) { ... } // $cast = (int) $value -   $cast = intval($value); // return (float) $value -   return floatval($value); // $this->ignore |= static::IGNORE_DOT_FILES -   $this->ignore = $this->ignore | static::IGNORE_DOT_FILES; // if (!in_array(static::$availableOptions[$option], $this->options)) -   if (false === array_search(static::$availableOptions[$option], $this->options)) { ... } // ++$calls[$id] -   $calls[$id] += 1; // if ('root' === get_current_user()) -   if (in_array(get_current_user(), array('root'))) { ... } // if (array_key_exists($id, $container->getAliases())) -   if (in_array($id, array_keys($container->getAliases()))) { ... } // return '' === $relativePath ? './' : $relativePath -   return (strlen($relativePath) === 0) ? './' : $relativePath;  namespace Symfony\Component\Security\Acl\Dbal; class MutableAclProvider extends AclProvider implements MutableAclProviderInterface, PropertyChangedListener { ... private function updateNewFieldAceProperty($name, array $changes) { ... //   $currentIds = array(); foreach ($changes[1] as $field => $new) { for ($i = 0, $c = count($new); $i < $c; $i++) { ... if (null === $ace->getId()) { ... } else { //   $currentIds[$ace->getId()] = true; } } } } ... } Source: https://habr.com/ru/post/254949/
All Articles