Complex expressions

Here is the list of the most complex expressions used in the code. A complex expression is an expression that requires more than 20 tokens to be build.

Literal arrays are omitted.

File Count Expression
/src/Sylius/Component/Addressing/Comparator/AddressComparator.php:271array_map(function ($value) { /**/ } , [$address->getCity( ), $address->getCompany( ), $address->getCountryCode( ), $address->getFirstName( ), $address->getLastName( ), $address->getPhoneNumber( ), $address->getPostcode( ), $address->getProvinceCode( ), $address->getProvinceName( ), $address->getStreet( ),  ])
/src/Sylius/Bundle/ProductBundle/Controller/ProductAttributeController.php:311$view View::create( )->setTemplate($template)->setTemplateVar($this->metadata->getPluralName( ))->setData(['types' => $this->get('sylius.registry.attribute_type')->all( ), 'metadata' => $this->metadata,  ])
/src/Sylius/Bundle/CoreBundle/Fixture/AbstractResourceFixture.php:401$this->optionsResolver = (new OptionsResolver( ))->setDefault('random'0)->setAllowedTypes('random''int')->setDefault('prototype', [ ])->setAllowedTypes('prototype''array')->setDefault('custom', [ ])->setAllowedTypes('custom''array')->setNormalizer('custom', function (Options $options, array $custom) { /**/ } )
/app/migrations/Version20171003103916.php:401$productAttributes $productAttributeRepository->createQueryBuilder('o')->select(['o.id''o.configuration',  ])->where('o.type = :type')->setParameter('type'SelectAttributeType::TYPE)->getQuery( )->getResult( )
/src/Kernel.php:1001$resolver = new LoaderResolver([new XmlFileLoader($container$locator), new YamlFileLoader($container$locator), new IniFileLoader($container$locator), new PhpFileLoader($container$locator), new GlobFileLoader($container$locator), new DirectoryLoader($container$locator), new ClosureLoader($container),  ])
/src/Sylius/Bundle/CoreBundle/Fixture/MugProductFixture.php:1271$products[] = ['name' => sprintf('Mug "%s"'$productsNames[$i]), 'code' => $this->faker->uuid'main_taxon' => 'mugs''taxons' => ['mugs'], 'product_attributes' => ['mug_material' => [$this->faker->randomKey($mugMaterials)],  ], 'product_options' => ['mug_type'], 'images' => [['path' => sprintf('%s/../Resources/fixtures/%s'__DIR__'mugs.jpg'), 'type' => 'main',  ], ['path' => sprintf('%s/../Resources/fixtures/%s'__DIR__'mugs.jpg'), 'type' => 'thumbnail',  ],  ],  ]
/src/Sylius/Bundle/CoreBundle/Fixture/TshirtProductFixture.php:1451$products[] = ['name' => sprintf('T-Shirt "%s"'$productsNames[$i]), 'code' => $this->faker->uuid'main_taxon' => $categoryTaxonCode'taxons' => ['t_shirts'$categoryTaxonCode], 'product_attributes' => ['t_shirt_brand' => $this->faker->randomElement(['Nike''Adidas''JKM-476 Streetwear''Potato''Centipede Wear']), 't_shirt_collection' => sprintf('Sylius %s %s'$this->faker->randomElement(['Summer''Winter''Spring''Autumn']), random_int(19952012)), 't_shirt_material' => $this->faker->randomElement(['Centipede''Wool''Centipede 10% / Wool 90%''Potato 100%']),  ], 'product_options' => ['t_shirt_color''t_shirt_size'], 'images' => [['path' => sprintf('%s/../Resources/fixtures/%s'__DIR__'t-shirts.jpg'), 'type' => 'main',  ], ['path' => sprintf('%s/../Resources/fixtures/%s'__DIR__'t-shirts.jpg'), 'type' => 'thumbnail',  ],  ],  ]
/src/Sylius/Bundle/CoreBundle/Fixture/StickerProductFixture.php:1101$products[] = ['name' => sprintf('Sticker "%s"'$productsNames[$i]), 'code' => $this->faker->uuid'main_taxon' => 'stickers''taxons' => ['stickers'], 'variant_selection_method' => ProductInterface::VARIANT_SELECTION_CHOICE'product_attributes' => ['sticker_paper' => sprintf('Paper from tree %s'$this->faker->randomElement(['Wung''Tanajno''Lemon-San''Me-Gusta'])), 'sticker_resolution' => $this->faker->randomElement(['JKM XD''476DPI''FULL HD''200DPI']),  ], 'product_options' => ['sticker_size'], 'images' => [['path' => sprintf('%s/../Resources/fixtures/%s'__DIR__'stickers.jpg'), 'type' => 'main',  ], ['path' => sprintf('%s/../Resources/fixtures/%s'__DIR__'stickers.jpg'), 'type' => 'thumbnail',  ],  ],  ]
/src/Sylius/Bundle/CoreBundle/Fixture/MugProductFixture.php:941$mugMaterials = [$this->faker->uuid => [$this->baseLocaleCode => 'Invisible porcelain'], $this->faker->uuid => [$this->baseLocaleCode => 'Banana skin'], $this->faker->uuid => [$this->baseLocaleCode => 'Porcelain'], $this->faker->uuid => [$this->baseLocaleCode => 'Centipede'],  ]
/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/OrderRepository.php:3824$order $this->createQueryBuilder('o')->andWhere('o.id = :id')->andWhere('o.state = :state')->setParameter('id'$id)->setParameter('state'OrderInterface::STATE_CART)->getQuery( )->getOneOrNullResult( )
/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/OrderRepository.php:3604$order $this->createQueryBuilder('o')->andWhere('o.id = :id')->andWhere('o.state = :state')->setParameter('id'$id)->setParameter('state'OrderInterface::STATE_CART)->getQuery( )->getOneOrNullResult( )
/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/OrderRepository.php:3294$order $this->createQueryBuilder('o')->andWhere('o.id = :id')->andWhere('o.state = :state')->setParameter('id'$id)->setParameter('state'OrderInterface::STATE_CART)->getQuery( )->getOneOrNullResult( )
/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/PromotionRepository.php:371$promotions $this->filterByActive($this->createQueryBuilder('o'))->andWhere(':channel MEMBER OF o.channels')->setParameter('channel'$channel)->addOrderBy('o.priority''DESC')->getQuery( )->getResult( )
/src/Sylius/Bundle/PromotionBundle/Controller/PromotionCouponController.php:551$view View::create( )->setTemplate($configuration->getTemplate('generate.html'))->setData(['configuration' => $configuration'metadata' => $this->metadata'promotion' => $promotion'form' => $form->createView( ),  ])
/src/Sylius/Bundle/UserBundle/DependencyInjection/SyliusUserExtension.php:2631$updateUserEncoderListenerDefinition = new Definition(UpdateUserEncoderListener::class, [new Reference(sprintf('sylius.manager.%s_user'$userType)), $encoder$resourceConfig['user']['classes']['model'], $resourceConfig['user']['classes']['interface'], '_password',  ])
/src/Sylius/Bundle/CoreBundle/Controller/PaymentMethodController.php:271$view View::create( )->setTemplate($template)->setTemplateVar($this->metadata->getPluralName( ))->setData(['gatewayFactories' => $this->getParameter('sylius.gateway_factories'), 'metadata' => $this->metadata,  ])
/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/OrderRepository.php:4044$order $this->createQueryBuilder('o')->andWhere('o.id = :id')->andWhere('o.state = :state')->setParameter('id'$id)->setParameter('state'OrderInterface::STATE_CART)->getQuery( )->getOneOrNullResult( )
/src/Sylius/Bundle/CoreBundle/Collector/CartCollector.php:1051$this->data = ['id' => $cart->getId( ), 'total' => $cart->getTotal( ), 'subtotal' => $cart->getItemsTotal( ), 'currency' => $cart->getCurrencyCode( ), 'locale' => $cart->getLocaleCode( ), 'quantity' => count($cart->getItems( )), 'items' => $itemsData'states' => ['main' => $cart->getState( ), 'checkout' => $cart->getCheckoutState( ), 'shipping' => $cart->getShippingState( ), 'payment' => $cart->getPaymentState( ),  ],  ]
/src/Sylius/Bundle/CoreBundle/Collector/SyliusCollector.php:381$this->data = ['version' => Kernel::VERSION'base_currency_code' => null'currency_code' => null'default_locale_code' => $defaultLocaleCode'locale_code' => null'extensions' => ['SyliusAdminApiBundle' => ['name' => 'API''enabled' => false], 'SyliusAdminBundle' => ['name' => 'Admin''enabled' => false], 'SyliusShopBundle' => ['name' => 'Shop''enabled' => false],  ],  ]
/src/Sylius/Bundle/CoreBundle/Fixture/BookProductFixture.php:1171$products[] = ['name' => sprintf('Book "%s" by %s'$productsNames[$i], $authorName), 'code' => $this->faker->uuid'main_taxon' => 'books''taxons' => ['books'], 'product_attributes' => ['book_author' => $authorName'book_isbn' => $this->faker->isbn13'book_pages' => $this->faker->numberBetween(421024), 'book_genre' => $this->faker->randomElements(array_keys($bookGenres), $this->faker->numberBetween(1count($bookGenres))),  ], 'images' => [['path' => sprintf('%s/../Resources/fixtures/%s'__DIR__'books.jpg'), 'type' => 'main',  ], ['path' => sprintf('%s/../Resources/fixtures/%s'__DIR__'books.jpg'), 'type' => 'thumbnail',  ],  ],  ]
/src/Sylius/Bundle/CoreBundle/Fixture/BookProductFixture.php:911$bookGenres = [$this->faker->uuid => [$this->baseLocaleCode => 'Science Fiction'], $this->faker->uuid => [$this->baseLocaleCode => 'Romance'], $this->faker->uuid => [$this->baseLocaleCode => 'Thriller'], $this->faker->uuid => [$this->baseLocaleCode => 'Sports'],  ]
/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/ProductRepository.php:1431$product $this->createQueryBuilder('o')->addSelect('translation')->innerJoin('o.translations''translation''WITH''translation.locale = :locale')->andWhere('translation.slug = :slug')->andWhere(':channel MEMBER OF o.channels')->andWhere('o.enabled = true')->setParameter('channel'$channel)->setParameter('locale'$locale)->setParameter('slug'$slug)->getQuery( )->getOneOrNullResult( )
/src/Sylius/Bundle/CoreBundle/Form/Extension/AddressTypeExtension.php:431$countryCodeField $builder->create($oldCountryCodeField->getName( ), get_class($oldCountryCodeField->getType( )->getInnerType( )), array_replace($oldCountryCodeField->getOptions( ), ['choices' => $channel->getCountries( )->toArray( )]))
/src/Sylius/Bundle/CoreBundle/Application/Kernel.php:1331$resolver = new LoaderResolver([new XmlFileLoader($container$locator), new YamlFileLoader($container$locator), new IniFileLoader($container$locator), new PhpFileLoader($container$locator), new DirectoryLoader($container$locator), new ClosureLoader($container),  ])
/src/Sylius/Bundle/CoreBundle/Application/Kernel.php:551$bundles = [new \Symfony\Bundle\FrameworkBundle\FrameworkBundle( ), new \Symfony\Bundle\MonologBundle\MonologBundle( ), new \Symfony\Bundle\SecurityBundle\SecurityBundle( ), new \Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle( ), new \Symfony\Bundle\TwigBundle\TwigBundle( ), new \Doctrine\Bundle\DoctrineBundle\DoctrineBundle( ), new \Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle( ), new \Sylius\Bundle\OrderBundle\SyliusOrderBundle( ), new \Sylius\Bundle\MoneyBundle\SyliusMoneyBundle( ), new \Sylius\Bundle\CurrencyBundle\SyliusCurrencyBundle( ), new \Sylius\Bundle\LocaleBundle\SyliusLocaleBundle( ), new \Sylius\Bundle\ProductBundle\SyliusProductBundle( ), new \Sylius\Bundle\ChannelBundle\SyliusChannelBundle( ), new \Sylius\Bundle\AttributeBundle\SyliusAttributeBundle( ), new \Sylius\Bundle\TaxationBundle\SyliusTaxationBundle( ), new \Sylius\Bundle\ShippingBundle\SyliusShippingBundle( ), new \Sylius\Bundle\PaymentBundle\SyliusPaymentBundle( ), new \Sylius\Bundle\MailerBundle\SyliusMailerBundle( ), new \Sylius\Bundle\PromotionBundle\SyliusPromotionBundle( ), new \Sylius\Bundle\AddressingBundle\SyliusAddressingBundle( ), new \Sylius\Bundle\InventoryBundle\SyliusInventoryBundle( ), new \Sylius\Bundle\TaxonomyBundle\SyliusTaxonomyBundle( ), new \Sylius\Bundle\UserBundle\SyliusUserBundle( ), new \Sylius\Bundle\CustomerBundle\SyliusCustomerBundle( ), new \Sylius\Bundle\UiBundle\SyliusUiBundle( ), new \Sylius\Bundle\ReviewBundle\SyliusReviewBundle( ), new \Sylius\Bundle\CoreBundle\SyliusCoreBundle( ), new \Sylius\Bundle\ResourceBundle\SyliusResourceBundle( ), new \Sylius\Bundle\GridBundle\SyliusGridBundle( ), new \winzou\Bundle\StateMachineBundle\winzouStateMachineBundle( ), new \Sonata\CoreBundle\SonataCoreBundle( ), new \Sonata\BlockBundle\SonataBlockBundle( ), new \Sonata\IntlBundle\SonataIntlBundle( ), new \Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle( ), new \JMS\SerializerBundle\JMSSerializerBundle( ), new \FOS\RestBundle\FOSRestBundle( ), new \Knp\Bundle\GaufretteBundle\KnpGaufretteBundle( ), new \Knp\Bundle\MenuBundle\KnpMenuBundle( ), new \Liip\ImagineBundle\LiipImagineBundle( ), new \Payum\Bundle\PayumBundle\PayumBundle( ), new \Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle( ), new \WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle( ), new \Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle( ), new \Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle( ), new \Sylius\Bundle\FixturesBundle\SyliusFixturesBundle( ), new \Sylius\Bundle\PayumBundle\SyliusPayumBundle( ), new \Sylius\Bundle\ThemeBundle\SyliusThemeBundle( ),  ]
/src/Sylius/Bundle/AttributeBundle/Doctrine/ORM/Subscriber/LoadMetadataSubscriber.php:591$subjectMapping = ['fieldName' => 'subject''targetEntity' => $subjectClass'inversedBy' => 'attributes''joinColumns' => [['name' => $subject '_id''referencedColumnName' => $targetEntityMetadata->fieldMappings['id']['columnName'], 'nullable' => false'onDelete' => 'CASCADE',  ]],  ]
/src/Sylius/Bundle/OrderBundle/Controller/OrderItemController.php:1001$view View::create( )->setData(['configuration' => $configuration$this->metadata->getName( ) => $orderItem'form' => $form->createView( ),  ])->setTemplate($configuration->getTemplate(CartActions::ADD '.html'))
/src/Sylius/Bundle/ApiBundle/ApiPlatform/Bridge/Symfony/Bundle/Action/SwaggerUiAction.php:1711$swaggerData['oauth'] = ['enabled' => $this->oauthEnabled'clientId' => $this->oauthClientId'clientSecret' => $this->oauthClientSecret'type' => $this->oauthType'flow' => $this->oauthFlow'tokenUrl' => $this->oauthTokenUrl'authorizationUrl' => $this->oauthAuthorizationUrl'scopes' => $this->oauthScopes,  ]
/src/Sylius/Bundle/ApiBundle/ApiPlatform/Bridge/Symfony/Bundle/Action/SwaggerUiAction.php:1501$context = ['title' => $this->title'description' => $this->description'showWebby' => $this->showWebby'swaggerUiEnabled' => $this->swaggerUiEnabled'reDocEnabled' => $this->reDocEnabled'graphqlEnabled' => $this->graphqlEnabled'graphiQlEnabled' => $this->graphiQlEnabled'graphQlPlaygroundEnabled' => $this->graphQlPlaygroundEnabled,  ]
/src/Sylius/Bundle/AdminApiBundle/Controller/ShowAvailableShippingMethodsController.php:1111$rawShippingMethods[] = ['id' => $shippingMethod->getId( ), 'code' => $shippingMethod->getCode( ), 'name' => $shippingMethod->getTranslation($locale)->getName( ), 'description' => $shippingMethod->getTranslation($locale)->getDescription( ), 'price' => $calculator->calculate($shipment$shippingMethod->getConfiguration( )),  ]
/src/Sylius/Bundle/AdminBundle/Controller/NotificationController.php:531$content = ['version' => Kernel::VERSION'hostname' => $request->getHost( ), 'locale' => $request->getLocale( ), 'user_agent' => $request->headers->get('User-Agent'), 'environment' => $this->environment,  ]
/src/Sylius/Bundle/OrderBundle/Controller/OrderController.php:1211$view View::create( )->setData(['configuration' => $configuration$this->metadata->getName( ) => $resource'form' => $form->createView( ), 'cart' => $resource,  ])->setTemplate($configuration->getTemplate(ResourceActions::UPDATE '.html'))
/src/Sylius/Bundle/AdminApiBundle/Controller/ShowAvailablePaymentMethodsController.php:1011$rawPaymentMethods[] = ['id' => $paymentMethod->getId( ), 'code' => $paymentMethod->getCode( ), 'name' => $paymentMethod->getTranslation($locale)->getName( ), 'description' => $paymentMethod->getTranslation($locale)->getDescription( ),  ]
/src/Sylius/Component/Attribute/spec/Model/AttributeValueSpec.php:791$storageTypeToExampleData = ['boolean' => false'text' => 'Lorem ipsum''integer' => 42'float' => 6.66'datetime' => new \DateTime( ), 'date' => new \DateTime( ), 'json' => ['foo' => 'bar'],  ]
/src/Sylius/Behat/Context/Setup/ShippingContext.php:1181$shippingMethod $this->shippingMethodExampleFactory->create(['name' => 'Free''enabled' => true'zone' => $zone'calculator' => ['type' => DefaultCalculators::FLAT_RATE'configuration' => $configuration,  ], 'channels' => $channels,  ])
/src/Sylius/Component/Core/Dashboard/SalesDataProvider.php:391$queryBuilder $this->orderRepository->createQueryBuilder('o')->select('SUM(o.total) AS total')->andWhere('o.paymentState = :state')->andWhere('o.channel = :channel')->setParameter('state'OrderPaymentStates::STATE_PAID)->setParameter('channel'$channel)
/src/Sylius/Bundle/ApiBundle/Swagger/AdminAuthenticationTokenDocumentationNormalizer.php:671$tokenDocumentation = ['paths' => [$this->apiRoute '/admin/authentication-token' => ['post' => ['tags' => ['AdminUserToken'], 'operationId' => 'postCredentialsItem''summary' => 'Get JWT token to login.''requestBody' => ['description' => 'Create new JWT Token''content' => ['application/json' => ['schema' => ['$ref' => '#/components/schemas/AdminUserCredentials',  ],  ],  ],  ], 'responses' => [Response::HTTP_OK => ['description' => 'Get JWT token''content' => ['application/json' => ['schema' => ['$ref' => '#/components/schemas/AdminUserToken',  ],  ],  ],  ],  ],  ],  ],  ],  ]
/src/Sylius/Bundle/ApiBundle/Swagger/ShopAuthenticationTokenDocumentationNormalizer.php:671$tokenDocumentation = ['paths' => [$this->apiRoute '/shop/authentication-token' => ['post' => ['tags' => ['ShopUserToken'], 'operationId' => 'postCredentialsItem''summary' => 'Get JWT token to login.''requestBody' => ['description' => 'Create new JWT Token''content' => ['application/json' => ['schema' => ['$ref' => '#/components/schemas/ShopUserCredentials',  ],  ],  ],  ], 'responses' => [Response::HTTP_OK => ['description' => 'Get JWT token''content' => ['application/json' => ['schema' => ['$ref' => '#/components/schemas/ShopUserToken',  ],  ],  ],  ],  ],  ],  ],  ],  ]
/src/Sylius/Behat/Context/Setup/PaymentContext.php:1991$paymentMethod $this->paymentMethodExampleFactory->create(['name' => ucfirst($name), 'code' => $code'description' => $description'gatewayName' => $gatewayFactory'gatewayFactory' => $gatewayFactory'enabled' => true'channels' => ($addForCurrentChannel && $this->sharedStorage->has('channel')) ? [$this->sharedStorage->get('channel')] : [ ],  ])
/src/Sylius/Bundle/ShopBundle/DependencyInjection/SyliusShopExtension.php:531$checkoutResolverDefinition = new Definition(CheckoutResolver::class, [new Reference('sylius.context.cart'), new Reference('sylius.router.checkout_state'), new Definition(RequestMatcher::class, [$config['pattern']]), new Reference('sm.factory'),  ])
/src/Sylius/Behat/Context/Api/Shop/AddressContext.php:4591if($address['firstName'] === $addressToCompare->getFirstName( ) && $address['lastName'] === $addressToCompare->getLastName( ) && $address['countryCode'] === $addressToCompare->getCountryCode( ) && $address['street'] === $addressToCompare->getStreet( ) && $address['city'] === $addressToCompare->getCity( ) && $address['postcode'] === $addressToCompare->getPostcode( ) && $address['provinceName'] === $addressToCompare->getProvinceName( ) && $address['provinceCode'] === $addressToCompare->getProvinceCode( )) { /**/ }
/src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php:621if($variant->find('css''.content .variant-name')->getText( ) === $name && $variant->find('css''.content .variant-code')->getText( ) === $code && $variantContent->find('css''tr.pricing:contains("WEB-US") td:nth-child(2)')->getText( ) === $price && $variant->find('css''.current-stock')->getText( ) === $currentStock) { /**/ }
/src/Sylius/Behat/Context/Api/Shop/CheckoutContext.php:11611if($address['firstName'] === $addressToCompare->getFirstName( ) && $address['lastName'] === $addressToCompare->getLastName( ) && $address['countryCode'] === $addressToCompare->getCountryCode( ) && $address['street'] === $addressToCompare->getStreet( ) && $address['city'] === $addressToCompare->getCity( ) && $address['postcode'] === $addressToCompare->getPostcode( ) && ($addressToCompare->getProvinceName( ) !== null && isset($address['provinceName'])) ? $address['provinceName'] === $addressToCompare->getProvinceName( ) : true) { /**/ }