diff --git a/src/Kunstmaan/AdminBundle/EventListener/MappingListener.php b/src/Kunstmaan/AdminBundle/EventListener/MappingListener.php index 9fb6470528..4499c1a910 100644 --- a/src/Kunstmaan/AdminBundle/EventListener/MappingListener.php +++ b/src/Kunstmaan/AdminBundle/EventListener/MappingListener.php @@ -28,7 +28,7 @@ public function loadClassMetadata(LoadClassMetadataEventArgs $eventArgs) $entityName = (string) $classMetadata->getName(); // We dynamically set the user class that was configured in the configuration - if ($entityName == 'Kunstmaan\AdminBundle\Entity\AclChangeset') { + if ($entityName === 'Kunstmaan\AdminBundle\Entity\AclChangeset') { $mapping = [ 'fieldName' => 'user', 'targetEntity' => $this->className, diff --git a/src/Kunstmaan/AdminListBundle/AdminList/Configurator/AbstractDoctrineDBALAdminListConfigurator.php b/src/Kunstmaan/AdminListBundle/AdminList/Configurator/AbstractDoctrineDBALAdminListConfigurator.php index d3c213bd46..3692930697 100644 --- a/src/Kunstmaan/AdminListBundle/AdminList/Configurator/AbstractDoctrineDBALAdminListConfigurator.php +++ b/src/Kunstmaan/AdminListBundle/AdminList/Configurator/AbstractDoctrineDBALAdminListConfigurator.php @@ -157,7 +157,7 @@ public function getQueryBuilder() // Apply sorting if (!empty($this->orderBy)) { $orderBy = $this->orderBy; - $this->queryBuilder->orderBy($orderBy, $this->orderDirection == 'DESC' ? 'DESC' : 'ASC'); + $this->queryBuilder->orderBy($orderBy, $this->orderDirection === 'DESC' ? 'DESC' : 'ASC'); } } diff --git a/src/Kunstmaan/AdminListBundle/AdminList/Configurator/AbstractDoctrineORMAdminListConfigurator.php b/src/Kunstmaan/AdminListBundle/AdminList/Configurator/AbstractDoctrineORMAdminListConfigurator.php index dd2072f68d..3a8e88a4ea 100644 --- a/src/Kunstmaan/AdminListBundle/AdminList/Configurator/AbstractDoctrineORMAdminListConfigurator.php +++ b/src/Kunstmaan/AdminListBundle/AdminList/Configurator/AbstractDoctrineORMAdminListConfigurator.php @@ -160,7 +160,7 @@ public function getQuery() } elseif (!strpos($orderBy, '.')) { $orderBy = 'b.' . $orderBy; } - $queryBuilder->orderBy($orderBy, $this->orderDirection == 'DESC' ? 'DESC' : 'ASC'); + $queryBuilder->orderBy($orderBy, $this->orderDirection === 'DESC' ? 'DESC' : 'ASC'); } // Apply other changes diff --git a/src/Kunstmaan/CookieBundle/AdminList/CookieAdminListConfigurator.php b/src/Kunstmaan/CookieBundle/AdminList/CookieAdminListConfigurator.php index 345ab4f5be..bfa1e64d39 100644 --- a/src/Kunstmaan/CookieBundle/AdminList/CookieAdminListConfigurator.php +++ b/src/Kunstmaan/CookieBundle/AdminList/CookieAdminListConfigurator.php @@ -89,7 +89,7 @@ private function getCookieTypes() */ public function getValue($item, $columnName) { - if ($columnName == 'domain' && !$item->getDomain()) { + if ($columnName === 'domain' && !$item->getDomain()) { return 'All domains'; } diff --git a/src/Kunstmaan/DashboardBundle/Helper/Google/Analytics/ConfigHelper.php b/src/Kunstmaan/DashboardBundle/Helper/Google/Analytics/ConfigHelper.php index 7012673483..f912e28f83 100644 --- a/src/Kunstmaan/DashboardBundle/Helper/Google/Analytics/ConfigHelper.php +++ b/src/Kunstmaan/DashboardBundle/Helper/Google/Analytics/ConfigHelper.php @@ -350,7 +350,7 @@ public function getProfileSegments() $builtin = []; $own = []; foreach ($profileSegments as $segment) { - if ($segment->type == 'BUILT_IN') { + if ($segment->type === 'BUILT_IN') { $builtin[] = [ 'name' => $segment->name, 'query' => $segment->segmentId, diff --git a/src/Kunstmaan/FixturesBundle/Loader/Fixture.php b/src/Kunstmaan/FixturesBundle/Loader/Fixture.php index 2d1cc55331..168d74d05d 100644 --- a/src/Kunstmaan/FixturesBundle/Loader/Fixture.php +++ b/src/Kunstmaan/FixturesBundle/Loader/Fixture.php @@ -31,11 +31,11 @@ public function __construct($name, $class, $specs) $this->setClass($class); foreach ($specs as $spec => $data) { - if ($spec != 'translations' && $spec != 'parameters') { + if ($spec !== 'translations' && $spec !== 'parameters') { $this->addProperty($spec, $data); - } elseif ($spec == 'translations') { + } elseif ($spec === 'translations') { $this->setTranslations($data); - } elseif ($spec == 'parameters') { + } elseif ($spec === 'parameters') { $this->setParameters($data); } } diff --git a/src/Kunstmaan/FormBundle/Helper/FormHandler.php b/src/Kunstmaan/FormBundle/Helper/FormHandler.php index 4901a3e956..9078c5af6f 100644 --- a/src/Kunstmaan/FormBundle/Helper/FormHandler.php +++ b/src/Kunstmaan/FormBundle/Helper/FormHandler.php @@ -68,7 +68,7 @@ public function handleForm(FormPageInterface $page, Request $request, RenderCont } $form = $formBuilder->getForm(); - if ($request->getMethod() == 'POST') { + if ($request->getMethod() === 'POST') { $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { $formSubmission = new FormSubmission(); diff --git a/src/Kunstmaan/GeneratorBundle/Command/GenerateArticleCommand.php b/src/Kunstmaan/GeneratorBundle/Command/GenerateArticleCommand.php index 11bb3be3c3..5da9523ee4 100644 --- a/src/Kunstmaan/GeneratorBundle/Command/GenerateArticleCommand.php +++ b/src/Kunstmaan/GeneratorBundle/Command/GenerateArticleCommand.php @@ -251,11 +251,11 @@ protected function getWelcomeText() protected function askForDummydata() { $dummydataOption = $this->assistant->getOption('dummydata'); - if ($dummydataOption != 'y' && $dummydataOption != 'n') { + if ($dummydataOption !== 'y' && $dummydataOption !== 'n') { $dummydataOption = $this->assistant->askConfirmation("\nDo you want to generate data fixtures to populate your database ? (y/n)\n", 'n', '?', false); } - return $dummydataOption == 'y'; + return $dummydataOption === 'y'; } /** @@ -264,11 +264,11 @@ protected function askForDummydata() protected function askForCategories() { $categoryOption = $this->assistant->getOption('with-category'); - if ($categoryOption != 'y' && $categoryOption != 'n') { + if ($categoryOption !== 'y' && $categoryOption !== 'n') { $categoryOption = $this->assistant->askConfirmation("\nDo you want to use categories ? (y/n)\n", 'y', '?', true); } - return $categoryOption == 'y'; + return $categoryOption === 'y'; } /** @@ -277,11 +277,11 @@ protected function askForCategories() protected function askForTags() { $tagOption = $this->assistant->getOption('with-tag'); - if ($tagOption != 'y' && $tagOption != 'n') { + if ($tagOption !== 'y' && $tagOption !== 'n') { $tagOption = $this->assistant->askConfirmation("\nDo you want to use tags ? (y/n)\n", 'y', '?', true); } - return $tagOption == 'y'; + return $tagOption === 'y'; } /** @@ -290,10 +290,10 @@ protected function askForTags() protected function askForAuthor() { $authorOption = $this->assistant->getOption('with-author'); - if ($authorOption != 'y' && $authorOption != 'n') { + if ($authorOption !== 'y' && $authorOption !== 'n') { $authorOption = $this->assistant->askConfirmation("\nDo you want to use authors ? (y/n)\n", 'y', '?', true); } - return $authorOption == 'y'; + return $authorOption === 'y'; } } diff --git a/src/Kunstmaan/GeneratorBundle/Command/GeneratePagePartCommand.php b/src/Kunstmaan/GeneratorBundle/Command/GeneratePagePartCommand.php index 07f0c75776..552e4c9597 100644 --- a/src/Kunstmaan/GeneratorBundle/Command/GeneratePagePartCommand.php +++ b/src/Kunstmaan/GeneratorBundle/Command/GeneratePagePartCommand.php @@ -143,10 +143,10 @@ function ($name) use ($generator, $bundlePath) { $fields = $this->askEntityFields($this->bundle); $this->fields = []; foreach ($fields as $fieldInfo) { - if ($fieldInfo['type'] == 'image') { + if ($fieldInfo['type'] === 'image') { $this->fields[] = $this->getEntityFields($this->bundle, $this->pagepartName, $this->prefix, $fieldInfo['name'], $fieldInfo['type'], $fieldInfo['extra'], true, $fieldInfo['minHeight'], $fieldInfo['maxHeight'], $fieldInfo['minWidth'], $fieldInfo['maxWidth'], $fieldInfo['mimeTypes']); - } elseif ($fieldInfo['type'] == 'media') { + } elseif ($fieldInfo['type'] === 'media') { $this->fields[] = $this->getEntityFields($this->bundle, $this->pagepartName, $this->prefix, $fieldInfo['name'], $fieldInfo['type'], $fieldInfo['extra'], true, null, null, null, null, $fieldInfo['mimeTypes']); } else { diff --git a/src/Kunstmaan/GeneratorBundle/Command/KunstmaanGenerateCommand.php b/src/Kunstmaan/GeneratorBundle/Command/KunstmaanGenerateCommand.php index 585ee48a5f..67bf36671e 100644 --- a/src/Kunstmaan/GeneratorBundle/Command/KunstmaanGenerateCommand.php +++ b/src/Kunstmaan/GeneratorBundle/Command/KunstmaanGenerateCommand.php @@ -159,7 +159,7 @@ protected function askForPrefix(?array $text = null, $namespace = null) $defaultPrefix = GeneratorUtils::cleanPrefix($this->convertNamespaceToSnakeCase($namespace)); $prefix = GeneratorUtils::cleanPrefix($this->assistant->ask('Tablename prefix', $defaultPrefix)); - if ($prefix == '') { + if ($prefix === '') { break; } @@ -430,17 +430,17 @@ function ($name) use ($generator, $container) { } // If image type, force image media filter - if ($typeStrings[$typeId] == 'image') { + if ($typeStrings[$typeId] === 'image') { $extra = 'image'; } // If media type, ask for media filter - if ($typeStrings[$typeId] == 'media') { + if ($typeStrings[$typeId] === 'media') { $mediaTypeId = $this->assistant->askSelect('Media filter', $mediaTypeSelect); $extra = strtolower($mediaTypeSelect[$mediaTypeId]); } - if ($typeStrings[$typeId] == 'image' || $typeStrings[$typeId] == 'media') { + if ($typeStrings[$typeId] === 'image' || $typeStrings[$typeId] === 'media') { // Ask the allowed mimetypes for the media ojbect $mimeTypes = $this->assistant->ask('Do you want to limit the possible file types? Then specify a comma-seperated list of types (example: image/png,image/svg+xml), otherwise press ENTER', null @@ -459,7 +459,7 @@ function ($name) use ($generator, $container) { 'maxWidth' => null, ]; - if ($extra == 'image') { + if ($extra === 'image') { $minHeight = $maxHeight = $minWidth = $maxWidth = null; if ($this->assistant->askConfirmation('Do you want to add validation of the dimensions of the media object? (y/n)', 'n', @@ -634,7 +634,7 @@ protected function getEntityFields( $fields[$type][$subField] = [ 'fieldName' => lcfirst(Container::camelize($name . '_' . $subField)), 'type' => 'string', - 'formType' => $subField == 'url' ? 'Kunstmaan\NodeBundle\Form\Type\URLChooserType' : TextType::class, + 'formType' => $subField === 'url' ? 'Kunstmaan\NodeBundle\Form\Type\URLChooserType' : TextType::class, 'nullable' => $allNullable, ]; } diff --git a/src/Kunstmaan/GeneratorBundle/Generator/PagePartGenerator.php b/src/Kunstmaan/GeneratorBundle/Generator/PagePartGenerator.php index 5b1817df45..c60945e7be 100644 --- a/src/Kunstmaan/GeneratorBundle/Generator/PagePartGenerator.php +++ b/src/Kunstmaan/GeneratorBundle/Generator/PagePartGenerator.php @@ -336,55 +336,55 @@ private function generateBehatTest() $attr = $field->vars['attr']; $blocks = $field->vars['block_prefixes']; - if ($name == 'title' || $name == 'pageTitle') { + if ($name === 'title' || $name === 'pageTitle') { continue; } - if ($blocks[1] == 'hidden') { + if ($blocks[1] === 'hidden') { // do nothing - } elseif ($blocks[1] == 'choice' && $blocks[1] == 'entity') { + } elseif ($blocks[1] === 'choice' && $blocks[1] === 'entity') { // do nothing - } elseif ($blocks[1] == 'datetime') { + } elseif ($blocks[1] === 'datetime') { $pageFields[]['datetime'] = [ 'label' => $this->labelCase($name), 'date_random' => DateTime::date('d/m/Y'), 'time_random' => DateTime::time('H:i'), ]; - } elseif ($blocks[1] == 'number') { + } elseif ($blocks[1] === 'number') { $pageFields[]['decimal'] = [ 'label' => $this->labelCase($name), 'random' => Base::randomFloat(2, 0, 99999), ]; - } elseif ($blocks[1] == 'integer') { + } elseif ($blocks[1] === 'integer') { $pageFields[]['integer'] = [ 'label' => $this->labelCase($name), 'random' => Base::randomNumber(3000, 99999), ]; - } elseif ($blocks[1] == 'checkbox') { + } elseif ($blocks[1] === 'checkbox') { $pageFields[]['boolean'] = [ 'label' => $this->labelCase($name), ]; - } elseif ($blocks[1] == 'media') { + } elseif ($blocks[1] === 'media') { $id = (count($images) > 0 ? $images[0]->getId() : 1); $pageFields[]['media'] = [ 'label' => $this->labelCase($name), 'random' => $id, ]; - } elseif ($blocks[2] == 'urlchooser') { + } elseif ($blocks[2] === 'urlchooser') { $pageFields[]['link'] = [ 'label' => $this->labelCase($name), 'random' => 'http://www.' . strtolower(Lorem::word()) . '.com', ]; - } elseif ($blocks[2] == 'textarea' && array_key_exists( + } elseif ($blocks[2] === 'textarea' && array_key_exists( 'class', $attr - ) && $attr['class'] == 'js-rich-editor rich-editor' + ) && $attr['class'] === 'js-rich-editor rich-editor' ) { $pageFields[]['rich_text'] = [ 'label' => $this->labelCase($name), 'random' => Lorem::sentence(), ]; - } elseif ($blocks[2] == 'textarea' || $blocks[1] == 'text') { + } elseif ($blocks[2] === 'textarea' || $blocks[1] === 'text') { $pageFields[]['text'] = [ 'label' => $this->labelCase($name), 'random' => Lorem::word(), diff --git a/src/Kunstmaan/GeneratorBundle/Helper/GeneratorUtils.php b/src/Kunstmaan/GeneratorBundle/Helper/GeneratorUtils.php index a846d44ae6..24b7a74506 100644 --- a/src/Kunstmaan/GeneratorBundle/Helper/GeneratorUtils.php +++ b/src/Kunstmaan/GeneratorBundle/Helper/GeneratorUtils.php @@ -28,7 +28,7 @@ public static function cleanPrefix($prefixString) $result = preg_replace('/_*$/i', '', strtolower($prefixString)) . '_'; - if ($result == '_') { + if ($result === '_') { return null; } @@ -121,7 +121,7 @@ public static function getFullSkeletonPath($pathInSkeleton) } // Can't have a / at the end. - if (substr($pathInSkeleton, -1) == '/') { + if (substr($pathInSkeleton, -1) === '/') { $pathInSkeleton = rtrim($pathInSkeleton, '/'); } diff --git a/src/Kunstmaan/GeneratorBundle/Helper/InputAssistant.php b/src/Kunstmaan/GeneratorBundle/Helper/InputAssistant.php index d9d4468556..b7696e6334 100644 --- a/src/Kunstmaan/GeneratorBundle/Helper/InputAssistant.php +++ b/src/Kunstmaan/GeneratorBundle/Helper/InputAssistant.php @@ -199,7 +199,7 @@ public function askForPrefix(?array $text = null, $namespace = null) $this->input->setOption('prefix', $prefix); } - if ($prefix == '') { + if ($prefix === '') { break; } diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/admintests/Features/Context/FeatureContext.php b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/admintests/Features/Context/FeatureContext.php index f76f7c28d1..c08c39b841 100644 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/admintests/Features/Context/FeatureContext.php +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/admintests/Features/Context/FeatureContext.php @@ -308,7 +308,7 @@ public function iFilterOn($filterType, $filterComparator, $filterValue, $additio foreach ($records as $field => $value) { //We need this check when adding additionally filters //because the filter_columnname[] is the same for all the filter lines - if ($additionally && $field == 'filter_columnname[]') { + if ($additionally && $field === 'filter_columnname[]') { $filterFields = $this->getSession()->getPage()->findAll('named', array('field', $this->getSession()->getSelectorsHandler()->xpathLiteral($field))); $filterField = $filterFields[count($filterFields) - 1]; } else { diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/admintests/Features/Context/PagePartContext.php b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/admintests/Features/Context/PagePartContext.php index bee40195a2..635e91bacc 100644 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/admintests/Features/Context/PagePartContext.php +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/admintests/Features/Context/PagePartContext.php @@ -132,7 +132,7 @@ public function iFillPagePartDateTime($name, $dateValue, $timeValue) $element = $field->getParent()->find('xpath', "//input[contains(@class, 'form_timepicker')]"); $element->setValue($timeValue); - if ($element->getValue() == '') { + if ($element->getValue() === '') { $id = $element->getAttribute('id'); if (!empty($id)) { $javascript = "document.getElementById('" . $id . "').value='" . $timeValue . "';"; diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/DataFixtures/ORM/ArticleGenerator/ArticleFixtures.php b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/DataFixtures/ORM/ArticleGenerator/ArticleFixtures.php index fa1c21b8d2..faa25c8f09 100644 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/DataFixtures/ORM/ArticleGenerator/ArticleFixtures.php +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/article/DataFixtures/ORM/ArticleGenerator/ArticleFixtures.php @@ -98,7 +98,7 @@ public function load(ObjectManager $manager) $translations = array(); foreach ($languages as $lang) { - if ($lang == 'nl') { + if ($lang === 'nl') { $title = $fakerNL->sentence; } else { $title = $fakerEN->sentence; diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/defaultsite/DataFixtures/ORM/DefaultSiteGenerator/DefaultSiteFixtures.php b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/defaultsite/DataFixtures/ORM/DefaultSiteGenerator/DefaultSiteFixtures.php index 7c1cee7544..6aef03fa3e 100755 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/defaultsite/DataFixtures/ORM/DefaultSiteGenerator/DefaultSiteFixtures.php +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/defaultsite/DataFixtures/ORM/DefaultSiteGenerator/DefaultSiteFixtures.php @@ -144,8 +144,8 @@ private function createContentPages() $translations = array(); foreach ($this->requiredLocales as $locale) { $translations[] = array('language' => $locale, 'callback' => function($page, $translation, $seo) use ($locale) { - $translation->setTitle($locale == 'nl' ? 'Diensten' : 'Services'); - $translation->setSlug($locale == 'nl' ? 'diensten' : 'services'); + $translation->setTitle($locale === 'nl' ? 'Diensten' : 'Services'); + $translation->setSlug($locale === 'nl' ? 'diensten' : 'services'); $translation->setWeight(20); }); } @@ -177,11 +177,11 @@ private function createContentPages() $translations = array(); foreach ($this->requiredLocales as $locale) { $translations[] = array('language' => $locale, 'callback' => function($page, $translation, $seo) use ($locale, $menuMedia) { - $translation->setTitle($locale == 'nl' ? 'Onze fietsen' : 'Our bikes'); - $translation->setSlug($locale == 'nl' ? 'koop-een-fiets' : 'buy-a-bike'); + $translation->setTitle($locale === 'nl' ? 'Onze fietsen' : 'Our bikes'); + $translation->setSlug($locale === 'nl' ? 'koop-een-fiets' : 'buy-a-bike'); $translation->setWeight(20); - $page->setMenuDescription($locale == 'nl' ? 'Onze selectie van fietsen vertegenwoordigd de filosofie van The Crew. Alleen de beste fietsen bieden we aan, te koop, en dat doen we aan de beste prijzen. Geen grootwarenhuis, maar een speciaalzaak met gratis persoonlijk advies in onze winkel.' : 'Our selection of bikes represents the philosophy of The Crew. We offer only the best bikes, and do so at the best prices. Not a large retailer, but a specialty shop with free personal advice in our store.'); + $page->setMenuDescription($locale === 'nl' ? 'Onze selectie van fietsen vertegenwoordigd de filosofie van The Crew. Alleen de beste fietsen bieden we aan, te koop, en dat doen we aan de beste prijzen. Geen grootwarenhuis, maar een speciaalzaak met gratis persoonlijk advies in onze winkel.' : 'Our selection of bikes represents the philosophy of The Crew. We offer only the best bikes, and do so at the best prices. Not a large retailer, but a specialty shop with free personal advice in our store.'); $page->setMenuImage($menuMedia); }); } @@ -208,11 +208,11 @@ private function createContentPages() $translations = array(); foreach ($this->requiredLocales as $locale) { $translations[] = array('language' => $locale, 'callback' => function($page, $translation, $seo) use ($locale, $menuMedia) { - $translation->setTitle($locale == 'nl' ? 'Fiets herstellingen' : 'Bike repair'); - $translation->setSlug($locale == 'nl' ? 'herstel-mijn-fiets' : 'repair-my-bike'); + $translation->setTitle($locale === 'nl' ? 'Fiets herstellingen' : 'Bike repair'); + $translation->setSlug($locale === 'nl' ? 'herstel-mijn-fiets' : 'repair-my-bike'); $translation->setWeight(20); - $page->setMenuDescription($locale == 'nl' ? 'Als er iets mis is met je fiets, dan helpt The Crew je direct verder. Tijdens de reparatie krijg je gratis een andere fiets ter beschikking. Onze vakmannen hebben meer dan 10 jaar ervaring en garanderen zo een top reparatie.' : 'If there is something wrong with your bike, The Crew will help you immediately. During the repairs we can offer a replacement, free of charge. Our experts have over 10 years of experience and guarantee a perfect fix, every time.'); + $page->setMenuDescription($locale === 'nl' ? 'Als er iets mis is met je fiets, dan helpt The Crew je direct verder. Tijdens de reparatie krijg je gratis een andere fiets ter beschikking. Onze vakmannen hebben meer dan 10 jaar ervaring en garanderen zo een top reparatie.' : 'If there is something wrong with your bike, The Crew will help you immediately. During the repairs we can offer a replacement, free of charge. Our experts have over 10 years of experience and guarantee a perfect fix, every time.'); $page->setMenuImage($menuMedia); }); } @@ -239,11 +239,11 @@ private function createContentPages() $translations = array(); foreach ($this->requiredLocales as $locale) { $translations[] = array('language' => $locale, 'callback' => function($page, $translation, $seo) use ($locale, $menuMedia) { - $translation->setTitle($locale == 'nl' ? 'Fietsen verhuur' : 'Rent bikes'); - $translation->setSlug($locale == 'nl' ? 'huur-een-fiets' : 'rent-a-bike'); + $translation->setTitle($locale === 'nl' ? 'Fietsen verhuur' : 'Rent bikes'); + $translation->setSlug($locale === 'nl' ? 'huur-een-fiets' : 'rent-a-bike'); $translation->setWeight(20); - $page->setMenuDescription($locale == 'nl' ? 'Ben je op vakantie in Leuven en wil je de stad bezoeken per fiets? Dan kan je bij ons een elektrische fiets huren per uur of voor één of meerdere dagen.' : 'On holiday in Leuven and want to explore the town by bike? We rent out electric bikes per hour or for one or more days.'); + $page->setMenuDescription($locale === 'nl' ? 'Ben je op vakantie in Leuven en wil je de stad bezoeken per fiets? Dan kan je bij ons een elektrische fiets huren per uur of voor één of meerdere dagen.' : 'On holiday in Leuven and want to explore the town by bike? We rent out electric bikes per hour or for one or more days.'); $page->setMenuImage($menuMedia); }); } @@ -485,7 +485,7 @@ private function createFormPage() $translation->setSlug('contact'); $translation->setWeight(60); - $page->setThanks($locale == 'nl' ? '

Bedankt, we hebben je bericht succesvol ontvangen.

' : '

We have received your submission.

'); + $page->setThanks($locale === 'nl' ? '

Bedankt, we hebben je bericht succesvol ontvangen.

' : '

We have received your submission.

'); } ); } @@ -505,9 +505,9 @@ private function createFormPage() $pageparts['main'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( 'Kunstmaan\FormBundle\Entity\PageParts\SingleLineTextPagePart', array( - 'setLabel' => $locale == 'nl' ? 'Naam' : 'Name', + 'setLabel' => $locale === 'nl' ? 'Naam' : 'Name', 'setRequired' => true, - 'setErrorMessageRequired' => $locale == 'nl' ? 'Naam is verplicht' :'Name is required' + 'setErrorMessageRequired' => $locale === 'nl' ? 'Naam is verplicht' :'Name is required' ) ); $pageparts['main'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( @@ -515,17 +515,17 @@ private function createFormPage() array( 'setLabel' => 'E-mail', 'setRequired' => true, - 'setErrorMessageRequired' => $locale == 'nl' ? 'Email is verplicht' :'E-mail is required', - 'setErrorMessageInvalid' => $locale == 'nl' ? 'Vul een geldig e-mail adres in' :'Fill in a valid e-mail address' + 'setErrorMessageRequired' => $locale === 'nl' ? 'Email is verplicht' :'E-mail is required', + 'setErrorMessageInvalid' => $locale === 'nl' ? 'Vul een geldig e-mail adres in' :'Fill in a valid e-mail address' ) ); $pageparts['main'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( 'Kunstmaan\FormBundle\Entity\PageParts\ChoicePagePart', array( - 'setLabel' => $locale == 'nl' ? 'Onderwerp' :'Subject', + 'setLabel' => $locale === 'nl' ? 'Onderwerp' :'Subject', 'setRequired' => true, - 'setErrorMessageRequired' => $locale == 'nl' ? 'Onderwerp is verplicht' :'Subject is required', - 'setChoices' => $locale == 'nl' ? + 'setErrorMessageRequired' => $locale === 'nl' ? 'Onderwerp is verplicht' :'Subject is required', + 'setChoices' => $locale === 'nl' ? "Ik wil een website maken met de Kunstmaan bundles \n Ik ben een website aan het testen \n Ik wil dat Kunstmaan een website voor mij maakt" : "I want to make a website with the Kunstmaan bundles \n I'm testing the website \n I want to get a quote for a website built by Kunstmaan" ) @@ -533,15 +533,15 @@ private function createFormPage() $pageparts['main'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( 'Kunstmaan\FormBundle\Entity\PageParts\MultiLineTextPagePart', array( - 'setLabel' => $locale == 'nl' ? 'Bericht' : 'Message', + 'setLabel' => $locale === 'nl' ? 'Bericht' : 'Message', 'setRequired' => true, - 'setErrorMessageRequired' => $locale == 'nl' ? 'Bericht is verplicht' : 'Message is required' + 'setErrorMessageRequired' => $locale === 'nl' ? 'Bericht is verplicht' : 'Message is required' ) ); $pageparts['main'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( 'Kunstmaan\FormBundle\Entity\PageParts\SubmitButtonPagePart', array( - 'setLabel' => $locale == 'nl' ? 'Verzenden' : 'Send' + 'setLabel' => $locale === 'nl' ? 'Verzenden' : 'Send' ) ); @@ -567,8 +567,8 @@ private function createSearchPage() $translations[] = array( 'language' => $locale, 'callback' => function ($page, $translation, $seo) use ($locale) { - $translation->setTitle($locale == 'nl' ? 'Zoeken' : 'Search'); - $translation->setSlug($locale == 'nl' ? 'zoeken' : 'search'); + $translation->setTitle($locale === 'nl' ? 'Zoeken' : 'Search'); + $translation->setSlug($locale === 'nl' ? 'zoeken' : 'search'); $translation->setWeight(50); } ); @@ -787,32 +787,32 @@ private function addHomepagePageParts() $pageparts['header'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( '{{ namespace }}\Entity\PageParts\PageBannerPagePart', array( - 'setTitle' => $locale == 'nl' ? 'Wij zorgen voor jouw fiets!' : 'We care for your bike!', - 'setDescription' => $locale == 'nl' ? 'De laatste modellen aan de beste prijs met een uitermate goede service na verkoop, daar tekenen wij voor!' : 'The latest models at the best prices with a top notch service guarantee, that\'s our promise!', + 'setTitle' => $locale === 'nl' ? 'Wij zorgen voor jouw fiets!' : 'We care for your bike!', + 'setDescription' => $locale === 'nl' ? 'De laatste modellen aan de beste prijs met een uitermate goede service na verkoop, daar tekenen wij voor!' : 'The latest models at the best prices with a top notch service guarantee, that\'s our promise!', 'setBackgroundImage' => $headerMedia, 'setButtonUrl' => $this->pageUrls['services'][$locale], - 'setButtonText' => $locale == 'nl' ? 'Onze diensten' : 'Our services', + 'setButtonText' => $locale === 'nl' ? 'Onze diensten' : 'Our services', ) ); $pageparts['section1'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( '{{ namespace }}\Entity\PageParts\HeaderPagePart', array( - 'setTitle' => $locale == 'nl' ? 'Wat doen we?' : 'What do we do?', + 'setTitle' => $locale === 'nl' ? 'Wat doen we?' : 'What do we do?', 'setNiv' => 2 ) ); $pageparts['section1'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( '{{ namespace }}\Entity\PageParts\IntroTextPagePart', array( - 'setContent' => $locale == 'nl' ? '

The Crew volgt de laatste trends in zowel hoge snelheids als retro fietsmodellen. We specialiseren ons in persoonlijke begeleiding bij het kiezen van jou favoriete fiets and maken ons sterk op een uitermate goede service na verkoop.

' : '

The Crew follows the latest trends in both high performance and retro bicycle models. We specialise in personal assistance choosing your favorite bike and pride ourself on a top of the line after service guarantee.

', + 'setContent' => $locale === 'nl' ? '

The Crew volgt de laatste trends in zowel hoge snelheids als retro fietsmodellen. We specialiseren ons in persoonlijke begeleiding bij het kiezen van jou favoriete fiets and maken ons sterk op een uitermate goede service na verkoop.

' : '

The Crew follows the latest trends in both high performance and retro bicycle models. We specialise in personal assistance choosing your favorite bike and pride ourself on a top of the line after service guarantee.

', ) ); $pageparts['section1'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( '{{ namespace }}\Entity\PageParts\LinkPagePart', array( 'setUrl' => $this->pageUrls['services'][$locale], - 'setText' => $locale == 'nl' ? 'Meer over onze diensten' : 'More on our services' + 'setText' => $locale === 'nl' ? 'Meer over onze diensten' : 'More on our services' ) ); @@ -820,10 +820,10 @@ private function addHomepagePageParts() $pageparts['section2'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( '{{ namespace }}\Entity\PageParts\ServicePagePart', array( - 'setTitle' => $locale == 'nl' ? 'Onze fietsen' : 'Our bikes', - 'setDescription' => $locale == 'nl' ? '

Onze selectie van fietsen vertegenwoordigd de filosofie van The Crew. Alleen de beste fietsen bieden we aan, te koop, en dat doen we aan de beste prijzen. Geen grootwarenhuis, maar een speciaalzaak met gratis persoonlijk advies in onze winkel.

' : '

Our selection of bikes represents the philosophy of The Crew. We offer only the best bikes, and do so at the best prices. Not a large retailer, but a specialty shop with free personal advice in our store.

', + 'setTitle' => $locale === 'nl' ? 'Onze fietsen' : 'Our bikes', + 'setDescription' => $locale === 'nl' ? '

Onze selectie van fietsen vertegenwoordigd de filosofie van The Crew. Alleen de beste fietsen bieden we aan, te koop, en dat doen we aan de beste prijzen. Geen grootwarenhuis, maar een speciaalzaak met gratis persoonlijk advies in onze winkel.

' : '

Our selection of bikes represents the philosophy of The Crew. We offer only the best bikes, and do so at the best prices. Not a large retailer, but a specialty shop with free personal advice in our store.

', 'setLinkUrl' => $this->pageUrls['services_buy'][$locale], - 'setLinkText' => $locale == 'nl' ? 'Blader door onze fietsen' : 'Browse through our bikes', + 'setLinkText' => $locale === 'nl' ? 'Blader door onze fietsen' : 'Browse through our bikes', 'setImage' => $buyBikeMedia, 'setImagePosition' => 'right', ) @@ -833,10 +833,10 @@ private function addHomepagePageParts() $pageparts['section3'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( '{{ namespace }}\Entity\PageParts\ServicePagePart', array( - 'setTitle' => $locale == 'nl' ? 'Service na verkoop' : 'Maintenance', - 'setDescription' => $locale == 'nl' ? '

Als er iets mis is met je fiets, dan helpt The Crew je direct verder. Tijdens de reparatie krijg je gratis een andere fiets ter beschikking. Onze vakmannen hebben meer dan 10 jaar ervaring en garanderen zo een top reparatie.

' : '

If there is something wrong with your bike, The Crew will help you immediately. During the repairs we can offer a replacement, free of charge. Our experts have over 10 years of experience and guarantee a perfect fix, every time.

', + 'setTitle' => $locale === 'nl' ? 'Service na verkoop' : 'Maintenance', + 'setDescription' => $locale === 'nl' ? '

Als er iets mis is met je fiets, dan helpt The Crew je direct verder. Tijdens de reparatie krijg je gratis een andere fiets ter beschikking. Onze vakmannen hebben meer dan 10 jaar ervaring en garanderen zo een top reparatie.

' : '

If there is something wrong with your bike, The Crew will help you immediately. During the repairs we can offer a replacement, free of charge. Our experts have over 10 years of experience and guarantee a perfect fix, every time.

', 'setLinkUrl' => $this->pageUrls['services_repair'][$locale], - 'setLinkText' => $locale == 'nl' ? 'Herstel mijn fiets' : 'Repair my bike', + 'setLinkText' => $locale === 'nl' ? 'Herstel mijn fiets' : 'Repair my bike', 'setImage' => $repairBikeMedia, 'setImagePosition' => 'left', ) @@ -845,7 +845,7 @@ private function addHomepagePageParts() $pageparts['section4'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( '{{ namespace }}\Entity\PageParts\HeaderPagePart', array( - 'setTitle' => $locale == 'nl' ? 'Waarom voor ons kiezen?' : 'Why choose us?', + 'setTitle' => $locale === 'nl' ? 'Waarom voor ons kiezen?' : 'Why choose us?', 'setNiv' => 2 ) ); @@ -853,22 +853,22 @@ private function addHomepagePageParts() $item1Media = $this->mediaCreator->createFile($imgDir.'icons/icon--1.svg', $folder->getId()); $item1 = new \{{ namespace }}\Entity\UspItem(); $item1->setIcon($item1Media); - $item1->setTitle($locale == 'nl' ? 'Snelle service' : 'Fast repairs'); - $item1->setDescription($locale == 'nl' ? 'Gegarandeerd een oplossing voor elk probleem binnen de 48 uur' : 'A guaranteed solution for every problem within 48 hours'); + $item1->setTitle($locale === 'nl' ? 'Snelle service' : 'Fast repairs'); + $item1->setDescription($locale === 'nl' ? 'Gegarandeerd een oplossing voor elk probleem binnen de 48 uur' : 'A guaranteed solution for every problem within 48 hours'); $item1->setWeight(0); $items->add($item1); $item2Media = $this->mediaCreator->createFile($imgDir.'icons/icon--2.svg', $folder->getId()); $item2 = new \{{ namespace }}\Entity\UspItem(); $item2->setIcon($item2Media); - $item2->setTitle($locale == 'nl' ? 'Persoonlijke hulp' : 'Personal service'); - $item2->setDescription($locale == 'nl' ? 'Onze experten staan elke dag voor u klaar, zonder wachten' : 'Our experts are there for you, every day, no waiting'); + $item2->setTitle($locale === 'nl' ? 'Persoonlijke hulp' : 'Personal service'); + $item2->setDescription($locale === 'nl' ? 'Onze experten staan elke dag voor u klaar, zonder wachten' : 'Our experts are there for you, every day, no waiting'); $item2->setWeight(1); $items->add($item2); $item3Media = $this->mediaCreator->createFile($imgDir.'icons/icon--3.svg', $folder->getId()); $item3 = new \{{ namespace }}\Entity\UspItem(); $item3->setIcon($item3Media); - $item3->setTitle($locale == 'nl' ? '10 jaar ervaring' : '10 years of experience'); - $item3->setDescription($locale == 'nl' ? 'Ervaren mensen leveren de beste service, op ons kan je rekenen' : 'Experience people offer the best service, you can count on us'); + $item3->setTitle($locale === 'nl' ? '10 jaar ervaring' : '10 years of experience'); + $item3->setDescription($locale === 'nl' ? 'Ervaren mensen leveren de beste service, op ons kan je rekenen' : 'Experience people offer the best service, you can count on us'); $item3->setWeight(2); $items->add($item3); $pageparts['section4'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( @@ -881,7 +881,7 @@ private function addHomepagePageParts() $pageparts['section5'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( '{{ namespace }}\Entity\PageParts\HeaderPagePart', array( - 'setTitle' => $locale == 'nl' ? 'Het team' : 'The Team', + 'setTitle' => $locale === 'nl' ? 'Het team' : 'The Team', 'setNiv' => 2 ) ); @@ -905,14 +905,14 @@ private function addContentPageParts() $pageparts['main'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( '{{ namespace }}\Entity\PageParts\HeaderPagePart', array( - 'setTitle' => $locale == 'nl' ? 'Onze diensten' : 'Our services', + 'setTitle' => $locale === 'nl' ? 'Onze diensten' : 'Our services', 'setNiv' => 2 ) ); $pageparts['main'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( '{{ namespace }}\Entity\PageParts\TextPagePart', array( - 'setContent' => $locale == 'nl' ? 'Je kan bij ons terecht voor een selectie van de beste fietsen, maar ook voor het onderhoud ervan. Onze vakmensen helpen je graag verder in onze winkel.' : 'We are the place to go for a selection of the best bikes, but also for the maintenance of your bike. Our skilled professionals will help you gladly in our store.' + 'setContent' => $locale === 'nl' ? 'Je kan bij ons terecht voor een selectie van de beste fietsen, maar ook voor het onderhoud ervan. Onze vakmensen helpen je graag verder in onze winkel.' : 'We are the place to go for a selection of the best bikes, but also for the maintenance of your bike. Our skilled professionals will help you gladly in our store.' ) ); @@ -925,20 +925,20 @@ private function addContentPageParts() $pageparts['main'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( '{{ namespace }}\Entity\PageParts\HeaderPagePart', array( - 'setTitle' => $locale == 'nl' ? 'Onze fietsen' : 'Our bikes', + 'setTitle' => $locale === 'nl' ? 'Onze fietsen' : 'Our bikes', 'setNiv' => 2 ) ); $pageparts['main'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( '{{ namespace }}\Entity\PageParts\TextPagePart', array( - 'setContent' => $locale == 'nl' ? '

Onze selectie van fietsen vertegenwoordigd de filosofie van The Crew. Alleen de beste fietsen bieden we aan, te koop, en dat doen we aan de beste prijzen. Geen grootwarenhuis, maar een speciaalzaak met gratis persoonlijk advies in onze winkel.

' : '

Our selection of bikes represents the philosophy of The Crew. We offer only the best bikes, and do so at the best prices. Not a large retailer, but a specialty shop with free personal advice in our store.

' + 'setContent' => $locale === 'nl' ? '

Onze selectie van fietsen vertegenwoordigd de filosofie van The Crew. Alleen de beste fietsen bieden we aan, te koop, en dat doen we aan de beste prijzen. Geen grootwarenhuis, maar een speciaalzaak met gratis persoonlijk advies in onze winkel.

' : '

Our selection of bikes represents the philosophy of The Crew. We offer only the best bikes, and do so at the best prices. Not a large retailer, but a specialty shop with free personal advice in our store.

' ) ); $pageparts['main'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( '{{ namespace }}\Entity\PageParts\HeaderPagePart', array( - 'setTitle' => $locale == 'nl' ? 'Prijslijst' : 'Pricelist', + 'setTitle' => $locale === 'nl' ? 'Prijslijst' : 'Pricelist', 'setNiv' => 3 ) ); @@ -956,14 +956,14 @@ private function addContentPageParts() $pageparts['main'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( '{{ namespace }}\Entity\PageParts\HeaderPagePart', array( - 'setTitle' => $locale == 'nl' ? 'Fietsen herstellen' : 'Repair bikes', + 'setTitle' => $locale === 'nl' ? 'Fietsen herstellen' : 'Repair bikes', 'setNiv' => 2 ) ); $pageparts['main'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( '{{ namespace }}\Entity\PageParts\TextPagePart', array( - 'setContent' => $locale == 'nl' ? '

Als er iets mis is met je fiets, dan helpt The Crew je direct verder. Tijdens de reparatie krijg je gratis een andere fiets ter beschikking. Onze vakmannen hebben meer dan 10 jaar ervaring en garanderen zo een top reparatie.

' : '

If there is something wrong with your bike, The Crew will help you immediately. During the repairs we can offer a replacement, free of charge. Our experts have over 10 years of experience and guarantee a perfect fix, every time.

' + 'setContent' => $locale === 'nl' ? '

Als er iets mis is met je fiets, dan helpt The Crew je direct verder. Tijdens de reparatie krijg je gratis een andere fiets ter beschikking. Onze vakmannen hebben meer dan 10 jaar ervaring en garanderen zo een top reparatie.

' : '

If there is something wrong with your bike, The Crew will help you immediately. During the repairs we can offer a replacement, free of charge. Our experts have over 10 years of experience and guarantee a perfect fix, every time.

' ) ); @@ -975,14 +975,14 @@ private function addContentPageParts() $pageparts['main'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( '{{ namespace }}\Entity\PageParts\HeaderPagePart', array( - 'setTitle' => $locale == 'nl' ? 'Fietsen verhuur' : 'Rent bikes', + 'setTitle' => $locale === 'nl' ? 'Fietsen verhuur' : 'Rent bikes', 'setNiv' => 2 ) ); $pageparts['main'][] = $this->pagePartCreator->getCreatorArgumentsForPagePartAndProperties( '{{ namespace }}\Entity\PageParts\TextPagePart', array( - 'setContent' => $locale == 'nl' ? '

Ben je op vakantie in Leuven en wil je de stad bezoeken per fiets? Dan kan je bij ons een elektrische fiets huren per uur of voor één of meerdere dagen.

' : '

On holiday in Leuven and want to explore the town by bike? We rent out electric bikes per hour or for one or more days.

' + 'setContent' => $locale === 'nl' ? '

Ben je op vakantie in Leuven en wil je de stad bezoeken per fiets? Dan kan je bij ons een elektrische fiets huren per uur of voor één of meerdere dagen.

' : '

On holiday in Leuven and want to explore the town by bike? We rent out electric bikes per hour or for one or more days.

' ) ); diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/searchpage/DataFixtures/ORM/SearchPageGenerator/SearchFixtures.php b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/searchpage/DataFixtures/ORM/SearchPageGenerator/SearchFixtures.php index 74b0e0ee7e..c2211fde6c 100644 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/searchpage/DataFixtures/ORM/SearchPageGenerator/SearchFixtures.php +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/searchpage/DataFixtures/ORM/SearchPageGenerator/SearchFixtures.php @@ -52,7 +52,7 @@ public function load(ObjectManager $manager) $translations = array(); foreach ($languages as $lang) { - if ($lang == 'nl') { + if ($lang === 'nl') { $title = 'Zoeken'; } else { $title = 'Search'; diff --git a/src/Kunstmaan/LeadGenerationBundle/AdminList/RulesAdminListConfigurator.php b/src/Kunstmaan/LeadGenerationBundle/AdminList/RulesAdminListConfigurator.php index 9785c85f79..c71a54eb08 100644 --- a/src/Kunstmaan/LeadGenerationBundle/AdminList/RulesAdminListConfigurator.php +++ b/src/Kunstmaan/LeadGenerationBundle/AdminList/RulesAdminListConfigurator.php @@ -105,7 +105,7 @@ public function buildFilters() public function getValue($item, $columnName) { - if ($columnName == 'jsProperties') { + if ($columnName === 'jsProperties') { return json_encode($item->getJsProperties()); } diff --git a/src/Kunstmaan/MediaBundle/AdminList/MediaAdminListConfigurator.php b/src/Kunstmaan/MediaBundle/AdminList/MediaAdminListConfigurator.php index 215d77afa9..81e477d04c 100644 --- a/src/Kunstmaan/MediaBundle/AdminList/MediaAdminListConfigurator.php +++ b/src/Kunstmaan/MediaBundle/AdminList/MediaAdminListConfigurator.php @@ -118,7 +118,7 @@ public function canDelete($item) */ public function buildItemActions() { - if ($this->request->get('_route') == 'KunstmaanMediaBundle_chooser_show_folder') { + if ($this->request->get('_route') === 'KunstmaanMediaBundle_chooser_show_folder') { $this->addItemAction(new MediaSelectItemAction()); } else { $this->addItemAction(new MediaEditItemAction()); @@ -154,7 +154,7 @@ public function adaptQueryBuilder(QueryBuilder $queryBuilder) ->setParameter('deleted', false) ->orderBy('b.updatedAt', 'DESC'); - if ($this->request->get('_route') == 'KunstmaanMediaBundle_chooser_show_folder') { + if ($this->request->get('_route') === 'KunstmaanMediaBundle_chooser_show_folder') { $type = $this->request->query->get('type'); if ($type) { switch ($type) { diff --git a/src/Kunstmaan/MediaBundle/Controller/ChooserController.php b/src/Kunstmaan/MediaBundle/Controller/ChooserController.php index 13c1e0b04c..a8c4f93137 100644 --- a/src/Kunstmaan/MediaBundle/Controller/ChooserController.php +++ b/src/Kunstmaan/MediaBundle/Controller/ChooserController.php @@ -93,9 +93,9 @@ public function chooserShowFolderAction(Request $request, $folderId, array $cust // Check when user switches between thumb -and list view $viewMode = $request->query->get('viewMode'); - if ($viewMode && $viewMode == 'list-view') { + if ($viewMode && $viewMode === 'list-view') { $session->set('media-list-view', true); - } elseif ($viewMode && $viewMode == 'thumb-view') { + } elseif ($viewMode && $viewMode === 'thumb-view') { $session->remove('media-list-view'); } diff --git a/src/Kunstmaan/MediaBundle/Controller/FolderController.php b/src/Kunstmaan/MediaBundle/Controller/FolderController.php index 24cb3eae3a..2634cc241a 100644 --- a/src/Kunstmaan/MediaBundle/Controller/FolderController.php +++ b/src/Kunstmaan/MediaBundle/Controller/FolderController.php @@ -61,9 +61,9 @@ public function showAction(Request $request, $folderId): Response // Check when user switches between thumb -and list view $viewMode = $request->query->get('viewMode'); - if ($viewMode && $viewMode == 'list-view') { + if ($viewMode && $viewMode === 'list-view') { $session->set('media-list-view', true); - } elseif ($viewMode && $viewMode == 'thumb-view') { + } elseif ($viewMode && $viewMode === 'thumb-view') { $session->remove('media-list-view'); } diff --git a/src/Kunstmaan/MediaBundle/Helper/File/PdfHandler.php b/src/Kunstmaan/MediaBundle/Helper/File/PdfHandler.php index 98fb4c2582..a9b53ea7c9 100644 --- a/src/Kunstmaan/MediaBundle/Helper/File/PdfHandler.php +++ b/src/Kunstmaan/MediaBundle/Helper/File/PdfHandler.php @@ -45,7 +45,7 @@ public function getType() public function canHandle($object) { if (parent::canHandle($object) - && ($object instanceof Media && $object->getContentType() == 'application/pdf') + && ($object instanceof Media && $object->getContentType() === 'application/pdf') ) { return true; } diff --git a/src/Kunstmaan/MenuBundle/AdminList/MenuItemAdminListConfigurator.php b/src/Kunstmaan/MenuBundle/AdminList/MenuItemAdminListConfigurator.php index 54f287dcb1..7c342e5c51 100644 --- a/src/Kunstmaan/MenuBundle/AdminList/MenuItemAdminListConfigurator.php +++ b/src/Kunstmaan/MenuBundle/AdminList/MenuItemAdminListConfigurator.php @@ -71,15 +71,15 @@ public function adaptQueryBuilder(QueryBuilder $qb) */ public function getValue($item, $columnName) { - if ($columnName == 'title') { + if ($columnName === 'title') { return $item->getDisplayTitle(); } - if ($columnName == 'online') { + if ($columnName === 'online') { return $item; } - if ($columnName == 'type') { + if ($columnName === 'type') { if ($item->getType() == MenuItem::TYPE_PAGE_LINK) { return 'Page link'; } @@ -87,7 +87,7 @@ public function getValue($item, $columnName) return 'External link'; } - if ($columnName == 'url') { + if ($columnName === 'url') { return $item; } diff --git a/src/Kunstmaan/NodeBundle/Controller/NodeAdminController.php b/src/Kunstmaan/NodeBundle/Controller/NodeAdminController.php index 640b24f26e..3e792ab861 100644 --- a/src/Kunstmaan/NodeBundle/Controller/NodeAdminController.php +++ b/src/Kunstmaan/NodeBundle/Controller/NodeAdminController.php @@ -737,7 +737,7 @@ public function editAction(Request $request, $id, $subaction): Response /* @var HasNodeInterface $page */ $page = null; - $draft = ($subaction == 'draft'); + $draft = ($subaction === 'draft'); $saveAsDraft = $request->request->get('saveasdraft'); if ((!$draft && !empty($saveAsDraft)) || ($draft && \is_null($draftNodeVersion))) { // Create a new draft version @@ -754,7 +754,7 @@ public function editAction(Request $request, $id, $subaction): Response $nodeVersion = $draftNodeVersion; $page = $nodeVersion->getRef($this->em); } else { - if ($request->getMethod() == 'POST') { + if ($request->getMethod() === 'POST') { $nodeVersionIsLocked = $this->isNodeVersionLocked($nodeTranslation, true); // Check the version timeout and make a new nodeversion if the timeout is passed @@ -826,7 +826,7 @@ public function editAction(Request $request, $id, $subaction): Response $tabPane->buildForm(); - if ($request->getMethod() == 'POST') { + if ($request->getMethod() === 'POST') { $tabPane->bindRequest($request); // Don't redirect to listing when coming from ajax request, needed for url chooser. @@ -841,7 +841,7 @@ public function editAction(Request $request, $id, $subaction): Response $nodeTranslation->setSlug(''); } $nodeVersion->setUpdated(new \DateTime()); - if ($nodeVersion->getType() == 'public') { + if ($nodeVersion->getType() === 'public') { $nodeTranslation->setUpdated($nodeVersion->getUpdated()); } $this->em->persist($nodeTranslation); diff --git a/src/Kunstmaan/NodeBundle/Controller/WidgetsController.php b/src/Kunstmaan/NodeBundle/Controller/WidgetsController.php index 332cd4c28a..f16fc3642d 100644 --- a/src/Kunstmaan/NodeBundle/Controller/WidgetsController.php +++ b/src/Kunstmaan/NodeBundle/Controller/WidgetsController.php @@ -59,7 +59,7 @@ public function selectNodesLazy(Request $request): JsonResponse $id = $request->query->get('id'); $depth = $this->getParameter('kunstmaan_node.url_chooser.lazy_increment'); - if (!$id || $id == '#') { + if (!$id || $id === '#') { if ($this->domainConfiguration->isMultiDomainHost()) { $switchedHost = $this->domainConfiguration->getHostSwitched(); $rootItems = [$this->domainConfiguration->getRootNode($switchedHost['host'])]; diff --git a/src/Kunstmaan/NodeBundle/Entity/NodeTranslation.php b/src/Kunstmaan/NodeBundle/Entity/NodeTranslation.php index a60974a718..874d216983 100644 --- a/src/Kunstmaan/NodeBundle/Entity/NodeTranslation.php +++ b/src/Kunstmaan/NodeBundle/Entity/NodeTranslation.php @@ -343,7 +343,7 @@ public function setNodeVersions(ArrayCollection $nodeVersions) */ public function getNodeVersion($type) { - if ($type == 'public') { + if ($type === 'public') { return $this->publicNodeVersion; } @@ -372,7 +372,7 @@ public function addNodeVersion(NodeVersion $nodeVersion) $this->nodeVersions[] = $nodeVersion; $nodeVersion->setNodeTranslation($this); - if ($nodeVersion->getType() == 'public') { + if ($nodeVersion->getType() === 'public') { $this->publicNodeVersion = $nodeVersion; } diff --git a/src/Kunstmaan/NodeBundle/EventListener/MappingListener.php b/src/Kunstmaan/NodeBundle/EventListener/MappingListener.php index dd52223206..ed10d03b59 100644 --- a/src/Kunstmaan/NodeBundle/EventListener/MappingListener.php +++ b/src/Kunstmaan/NodeBundle/EventListener/MappingListener.php @@ -28,7 +28,7 @@ public function loadClassMetadata(LoadClassMetadataEventArgs $eventArgs) $entityName = (string) $classMetadata->getName(); // We dynamically set the user class that was configured in the configuration - if ($entityName == 'Kunstmaan\NodeBundle\Entity\QueuedNodeTranslationAction') { + if ($entityName === 'Kunstmaan\NodeBundle\Entity\QueuedNodeTranslationAction') { $mapping = [ 'fieldName' => 'user', 'targetEntity' => $this->className, diff --git a/src/Kunstmaan/RedirectBundle/AdminList/RedirectAdminListConfigurator.php b/src/Kunstmaan/RedirectBundle/AdminList/RedirectAdminListConfigurator.php index 4a7906c7ce..2ae589a70e 100644 --- a/src/Kunstmaan/RedirectBundle/AdminList/RedirectAdminListConfigurator.php +++ b/src/Kunstmaan/RedirectBundle/AdminList/RedirectAdminListConfigurator.php @@ -66,7 +66,7 @@ public function buildFilters() */ public function getValue($item, $columnName) { - if ($columnName == 'domain' && !$item->getDomain()) { + if ($columnName === 'domain' && !$item->getDomain()) { return 'All domains'; } diff --git a/src/Kunstmaan/TranslatorBundle/AdminList/TranslationAdminListConfigurator.php b/src/Kunstmaan/TranslatorBundle/AdminList/TranslationAdminListConfigurator.php index a9091b960e..6f5cec272e 100644 --- a/src/Kunstmaan/TranslatorBundle/AdminList/TranslationAdminListConfigurator.php +++ b/src/Kunstmaan/TranslatorBundle/AdminList/TranslationAdminListConfigurator.php @@ -184,16 +184,16 @@ public function getQueryBuilder() $textValue = $textComparator = null; foreach ($filters as $filter) { - if ($filter->getType() instanceof EnumerationFilterType && $filter->getColumnName() == 'locale') { + if ($filter->getType() instanceof EnumerationFilterType && $filter->getColumnName() === 'locale') { // Override default enumeration filter handling ... catch selected locales here $data = $filter->getData(); $comparator = $filter->getType()->getComparator(); - if ($comparator == 'in') { + if ($comparator === 'in') { $locales = $data['value']; - } elseif ($comparator == 'notin') { + } elseif ($comparator === 'notin') { $locales = array_diff($this->locales, $data['value']); } - } elseif ($filter->getType() instanceof StringFilterType && $filter->getColumnName() == 'text') { + } elseif ($filter->getType() instanceof StringFilterType && $filter->getColumnName() === 'text') { // Override default text filter handling ... $data = $filter->getData(); $textValue = $data['value']; @@ -298,7 +298,7 @@ public function getQueryBuilder() // Apply sorting if (!empty($this->orderBy)) { $orderBy = $this->orderBy; - $this->queryBuilder->orderBy($orderBy, $this->orderDirection == 'DESC' ? 'DESC' : 'ASC'); + $this->queryBuilder->orderBy($orderBy, $this->orderDirection === 'DESC' ? 'DESC' : 'ASC'); } } diff --git a/src/Kunstmaan/TranslatorBundle/Form/TranslationAdminType.php b/src/Kunstmaan/TranslatorBundle/Form/TranslationAdminType.php index c87cc82177..1737ac59b0 100644 --- a/src/Kunstmaan/TranslatorBundle/Form/TranslationAdminType.php +++ b/src/Kunstmaan/TranslatorBundle/Form/TranslationAdminType.php @@ -17,7 +17,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) { $intention = $options['csrf_token_id']; $options = []; - if ($intention == 'edit') { + if ($intention === 'edit') { $options = ['attr' => ['readonly' => true]]; } diff --git a/src/Kunstmaan/VotingBundle/DependencyInjection/KunstmaanVotingExtension.php b/src/Kunstmaan/VotingBundle/DependencyInjection/KunstmaanVotingExtension.php index 3e11617c0e..890a57d277 100644 --- a/src/Kunstmaan/VotingBundle/DependencyInjection/KunstmaanVotingExtension.php +++ b/src/Kunstmaan/VotingBundle/DependencyInjection/KunstmaanVotingExtension.php @@ -49,7 +49,7 @@ public function load(array $configs, ContainerBuilder $container) // When no values are defined, initialize with defaults foreach ($possibleActions as $action) { if (!isset($config['actions'][$action]) || !\is_array($config['actions'][$action])) { - $config['actions'][$action]['default_value'] = ($action == 'down_vote' ? -1 * $votingDefaultValue : $votingDefaultValue); + $config['actions'][$action]['default_value'] = ($action === 'down_vote' ? -1 * $votingDefaultValue : $votingDefaultValue); } }