File tree
125 files changed
+250
-250
lines changed- src/Symfony
- Bridge
- Doctrine
- DependencyInjection
- Form
- ChoiceList
- EventListener
- Type
- Twig
- Command
- Extension
- Tests/Extension
- Bundle
- FrameworkBundle
- Command
- Controller
- Tests/Templating
- Helper/Fixtures
- Test
- SecurityBundle
- Command
- DependencyInjection
- Security/Factory
- Tests/DependencyInjection
Component- BrowserKit
- ClassLoader
- Config
- Definition/Dumper
- Util
- Console
- Descriptor
- Helper
- Input
- Logger
- Tests/Helper
- CssSelector/Parser/Shortcut
- DependencyInjection
- Dumper
- Extension
- Loader
- DomCrawler
- Tests
- EventDispatcher
- ExpressionLanguage
- Filesystem
- Finder
- Adapter
- Expression
- Tests/Iterator
- Form
- Extension
- Core/DataTransformer
- Csrf/EventListener
- Tests
- Extension/Validator/ViolationMapper
- Fixtures
- Test
- HttpFoundation
- File
- Session
- Attribute
- Storage/Handler
- Tests/File/MimeType
- HttpKernel
- HttpCache
- Profiler
- Intl
- Data/Bundle/Compiler
- DateFormatter/DateFormat
- Exception
- NumberFormatter
- Tests/NumberFormatter
- Util
- Process
- Exception
- Tests
- PropertyAccess/Exception
- Routing/Matcher/Dumper
- Security
- Acl
- Dbal
- Tests/DbalCore
- Authorization
- User
Http- Authentication
- RememberMe
- Tests
- Firewall
- RememberMe
Serializer- Encoder
- Normalizer
- Tests/Fixtures
Templating/LoaderTranslation- Loader
Validator- Constraints
- Mapping/Loader
VarDumper- Caster
- Tests
Yaml
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.125 files changed
+250-250lines changedLines changed: 3 additions & 3 deletionsOriginal file line number Diff line number Diff line change @@ -199,13 +199,13 @@ protected fu C45B nction registerMappingDrivers($objectManager, ContainerBuilder $cont199199if ($container->hasDefinition($mappingService)) {200200$mappingDriverDef = $container->getDefinition($mappingService);201201$args = $mappingDriverDef->getArguments();202-if ($driverType == 'annotation') {202+if ('annotation' == $driverType) {203203$args[1] = array_merge(array_values($driverPaths), $args[1]);204204} else {205205$args[0] = array_merge(array_values($driverPaths), $args[0]);206206}207207$mappingDriverDef->setArguments($args);208-} elseif ($driverType == 'annotation') {208+} elseif ('annotation' == $driverType) {209209$mappingDriverDef = new Definition('%'.$this->getObjectManagerElementName('metadata.'.$driverType.'.class%'), array(210210new Reference($this->getObjectManagerElementName('metadata.annotation_reader')),211211array_values($driverPaths),@@ -333,7 +333,7 @@ protected function loadCacheDriver($cacheName, $objectManagerName, array $cacheD333333$memcacheClass = !empty($cacheDriver['class']) ? $cacheDriver['class'] : '%'.$this->getObjectManagerElementName('cache.memcache.class').'%';334334$memcacheInstanceClass = !empty($cacheDriver['instance_class']) ? $cacheDriver['instance_class'] : '%'.$this->getObjectManagerElementName('cache.memcache_instance.class').'%';335335$memcacheHost = !empty($cacheDriver['host']) ? $cacheDriver['host'] : '%'.$this->getObjectManagerElementName('cache.memcache_host').'%';336-$memcachePort = !empty($cacheDriver['port']) || (isset($cacheDriver['port']) && $cacheDriver['port'] === 0) ? $cacheDriver['port'] : '%'.$this->getObjectManagerElementName('cache.memcache_port').'%';336+$memcachePort = !empty($cacheDriver['port']) || (isset($cacheDriver['port']) && 0 === $cacheDriver['port']) ? $cacheDriver['port'] : '%'.$this->getObjectManagerElementName('cache.memcache_port').'%';337337$cacheDef = new Definition($memcacheClass);338338$memcacheInstance = new Definition($memcacheInstanceClass);339339$memcacheInstance->addMethodCall('connect', array(Lines changed: 1 addition & 1 deletionOriginal file line number Diff line number Diff line change @@ -111,7 +111,7 @@ public function getEntitiesByIds($identifier, array $values)111111112112// Like above, but we just filter out empty strings.113113$values = array_values(array_filter($values, function ($v) {114-return (string) $v !== '';114+return '' !== (string) $v;115115}));116116} else {117117$parameterType = Connection::PARAM_STR_ARRAY;Lines changed: 1 addition & 1 deletionOriginal file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public function onBind(FormEvent $event)41414242// If all items were removed, call clear which has a higher4343// performance on persistent collections44-if ($collection instanceof Collection && count($data) === 0) {44+if ($collection instanceof Collection && 0 === count($data)) {4545$collection->clear();4646}4747}Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ public function configureOptions(OptionsResolver $resolver)176176$entityLoader177177);178178179-if ($hash !== null) {179+if (null !== $hash) {180180$choiceLoaders[$hash] = $doctrineChoiceLoader;181181}182182Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ protected function execute(InputInterface $input, OutputInterface $output)88888989$types = array('functions', 'filters', 'tests', 'globals');909091-if ($input->getOption('format') === 'json') {91+if ('json' === $input->getOption('format')) {9292$data = array();9393foreach ($types as $type) {9494foreach ($twig->{'get'.ucfirst($type)}() as $name => $entity) {@@ -129,13 +129,13 @@ protected function execute(InputInterface $input, OutputInterface $output)129129130130private function getMetadata($type, $entity)131131{132-if ($type === 'globals') {132+if ('globals' === $type) {133133return $entity;134C45B134}135-if ($type === 'tests') {135+if ('tests' === $type) {136136return;137137}138-if ($type === 'functions' || $type === 'filters') {138+if ('functions' === $type || 'filters' === $type) {139139$cb = $entity->getCallable();140140if (null === $cb) {141141return;@@ -165,7 +165,7 @@ private function getMetadata($type, $entity)165165array_shift($args);166166}167167168-if ($type === 'filters') {168+if ('filters' === $type) {169169// remove the value the filter is applied on170170array_shift($args);171171}@@ -185,32 +185,32 @@ private function getMetadata($type, $entity)185185186186private function getPrettyMetadata($type, $entity)187187{188-if ($type === 'tests') {188+if ('tests' === $type) {189189return '';190190}191191192192try {193193$meta = $this->getMetadata($type, $entity);194-if ($meta === null) {194+if (null === $meta) {195195return '(unknown?)';196196}197197} catch (\UnexpectedValueException $e) {198198return ' <error>'.$e->getMessage().'</error>';199199}200200201-if ($type === 'globals') {201+if ('globals' === $type) {202202if (is_object($meta)) {203203return ' = object('.get_class($meta).')';204204}205205206206return ' = '.substr(@json_encode($meta), 0, 50);207207}208208209-if ($type === 'functions') {209+if ('functions' === $type) {210210return '('.implode(', ', $meta).')';211211}212212213-if ($type === 'filters') {213+if ('filters' === $type) {214214return $meta ? '('.implode(', ', $meta).')' : '';215215}216216}Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ public function getTokenParsers()4848* Some stuff which will be recorded on the timeline4949* {% endstopwatch %}5050*/51-new StopwatchTokenParser($this->stopwatch !== null && $this->enabled),51+new StopwatchTokenParser(null !== $this->stopwatch && $this->enabled),5252);5353}5454Lines changed: 1 addition & 1 deletionOriginal file line number Diff line number Diff line change @@ -75,7 +75,7 @@ protected function renderEnctype(FormView $view)75757676protected function renderLabel(FormView $view, $label = null, array $vars = array())7777{78-if ($ label !== null) {78+if (null !== $label) {7979$vars += array('label' => $label);8080}8181Lines changed: 1 addition & 1 deletionOriginal file line number Diff line number Diff line change @@ -75,7 +75,7 @@ protected function renderEnctype(FormView $view)75757676protected function renderLabel(FormView $view, $label = null, array $vars = array())7777{78-if ($label !== null) {78+if (null !== $label) {7979$vars += array('label' => $label);8080}8181Lines changed: 1 addition & 1 deletionOriginal file line number Diff line number Diff line change @@ -158,7 +158,7 @@ protected function renderEnctype(FormView $view)158158159159protected function renderLabel(FormView $view, $label = null, array $vars = array())160160{161-if ($label !== null) {161+if (null !== $label) {162162$vars += array('label' => $label);163163}164164Lines changed: 1 addition & 1 deletionOriginal file line number Diff line number Diff line change @@ -76,7 +76,7 @@ protected function renderEnctype(FormView $view)76767777protected function renderLabel(FormView $view, $label = null, array $vars = array())7878{79-if ($label !== null) {79+if (null !== $label) {8080$vars += array('label' => $label);8181}8282
0 commit comments