diff --git a/data/Console/built_in_helpers.yaml b/data/Console/built_in_helpers.yaml index 2d32318..d60357d 100644 --- a/data/Console/built_in_helpers.yaml +++ b/data/Console/built_in_helpers.yaml @@ -28,7 +28,7 @@ questions: answers: - { value: $cursor->moveRight(3);, correct: true } - { value: $cursor->moveRight()->moveRight()->moveRight();, correct: true } - - { value: '$cursor->moveToPosition( $cursor->getCurrentPosition()[0], $cursor->getCurrentPosition()[1] + 3 );', correct: true } + - { value: '$cursor->moveToPosition( $cursor->getCurrentPosition()[0], $cursor->getCurrentPosition()[1] + 3 );', correct: true } help: 'https://symfony.com/doc/current/components/console/helpers/cursor.html#moving-the-cursor' - uuid: 1eebf878-8ba5-6be8-a74b-99d84c92580c @@ -51,7 +51,7 @@ questions: help: 'https://symfony.com/doc/current/components/console/helpers/formatterhelper.html' - uuid: 1eebf878-8ba5-6c74-a208-99d84c92580c - question: 'What is the correct way to truncate a message in a console with the formater helper ? $message = This is a very long message, which should be truncated ; to $message = This is a very long message, which should be!! ;' + question: 'What is the correct way to truncate a message in a console with the formater helper ? $message = This is a very long message, which should be truncated ; to $message = This is a very long message, which should be!! ;' answers: - { value: "$formatter->truncate($message, 44, '!!');", correct: true } - { value: "$formatter->truncateMessage($message, -10, '!!');", correct: false } @@ -85,7 +85,7 @@ questions: help: 'https://symfony.com/doc/current/components/console/helpers/table.html#modifying-rendered-tables' - uuid: 1eebf878-8ba5-6e2c-93d3-99d84c92580c - question: 'What is the parameter option to give to $table = new Table(XXX); in a console ?' + question: 'What is the parameter option to give to $table = new Table(XXX); in a console ?' answers: - { value: 'int $length, the number of lines for the table', correct: false } - { value: OutputInterface, correct: true } @@ -94,7 +94,7 @@ questions: help: 'https://symfony.com/doc/current/components/console/helpers/table.html' - uuid: 1eebf878-8ba5-6e7c-b3dd-99d84c92580c - question: 'In a console, what kind of Question could you have as a third argument in this question ? $helper->ask($input, $output, $question);' + question: 'In a console, what kind of Question could you have as a third argument in this question ? $helper->ask($input, $output, $question);' answers: - { value: Symfony\Component\Console\Question\ChoiceQuestion, correct: true } - { value: Symfony\Component\Console\Question\ConfirmationQuestion, correct: true } @@ -119,7 +119,7 @@ questions: help: 'https://symfony.com/doc/current/components/console/helpers/questionhelper.html#validating-the-answer' - uuid: 1eebf878-8ba5-6f62-b189-99d84c92580c - question: 'What is the method to set the given value in the QuestionHelper for a test in the given tester: $commandTester = new CommandTester($command);' + question: 'What is the method to set the given value in the QuestionHelper for a test in the given tester: $commandTester = new CommandTester($command);' answers: - { value: '$commandTester->setAnswer([ Test ]);', correct: false } - { value: '$commandTester->setGivenValue([ Test ]);', correct: false } @@ -127,7 +127,7 @@ questions: help: 'https://symfony.com/doc/current/components/console/helpers/questionhelper.html#testing-a-command-that-expects-input' - uuid: 1eebf878-8ba5-6ff8-80bd-99d84c92580c - question: "In a question in your command, what is the way to set a list of valid values autocompletable that the user can answer to this question ? $question = new Question('Please enter the name of a bundle', 'FooBundle'); $bundles = ['AcmeDemoBundle', 'AcmeBlogBundle', 'AcmeStoreBundle'];" + question: "In a question in your command, what is the way to set a list of valid values autocompletable that the user can answer to this question ? $question = new Question('Please enter the name of a bundle', 'FooBundle'); $bundles = ['AcmeDemoBundle', 'AcmeBlogBundle', 'AcmeStoreBundle'];" answers: - { value: $question->setPossibleAnswers($bundles);, correct: false } - { value: $question->setAutocomplete($bundles);, correct: false } @@ -154,7 +154,7 @@ questions: help: 'https://symfony.com/doc/current/components/console/helpers/progressbar.html#customizing-the-progress-bar' - uuid: 1eebf878-8ba6-60de-91d5-99d84c92580c - question: 'For performance reasons, symfony redraws the screen once every XXXXms. If this is too fast or too slow for your application, use the methods minSecondsBetweenRedraws() and maxSecondsBetweenRedraws(): How much is XXX ?' + question: 'For performance reasons, symfony redraws the screen once every XXXXms. If this is too fast or too slow for your application, use the methods minSecondsBetweenRedraws() and maxSecondsBetweenRedraws(): How much is XXX ?' answers: - { value: '50 ms', correct: false } - { value: '80 ms', correct: false } @@ -169,13 +169,13 @@ questions: answers: - { value: "$helper->run($output, 'figlet Symfony');", correct: true } - { value: "$helper->run($output, ['figlet', 'Symfony']);", correct: true } - - { value: "$process = new Process(['figlet', 'Symfony']); $helper->run($output, $process);", correct: true } + - { value: "$process = new Process(['figlet', 'Symfony']); $helper->run($output, $process);", correct: true } help: 'https://symfony.com/doc/current/components/console/helpers/processhelper.html' - uuid: 1eebf878-8ba6-6174-a67f-99d84c92580c question: "How can you customize the error message when using the Process Helper's run() method, such as in $helper->run($output, 'ls')?" answers: - - { value: "by adding ->setInvalidMesage($errorMessage) on run method like $helper->run($output, $process')->setInvalidMessage('Failed);", correct: false } + - { value: "by adding ->setInvalidMesage($errorMessage) on run method like $helper->run($output, $process')->setInvalidMessage('Failed);", correct: false } - { value: 'by adding a third argument $helper->run($output, $process, Failed );', correct: true } - { value: 'By overring the message of the ProcessHelperException', correct: false } help: 'https://symfony.com/doc/current/components/console/helpers/processhelper.html#customized-display' diff --git a/data/Console/custom_commands.yaml b/data/Console/custom_commands.yaml index a043eda..4a7bde0 100644 --- a/data/Console/custom_commands.yaml +++ b/data/Console/custom_commands.yaml @@ -10,11 +10,11 @@ questions: uuid: 1eebf878-8b99-6bea-907b-99d84c92580c question: 'Which of the following constants from Symfony\Component\Console\Input\InputArgument do not exist?' answers: - - {value: 'REQUIRED', correct: false} - - {value: 'NEGATABLE', correct: true} - - {value: 'IS_ARRAY', correct: false} - - {value: 'OPTIONAL', correct: false} - - {value: 'NONE', correct: true} + - { value: REQUIRED, correct: false } + - { value: NEGATABLE, correct: true } + - { value: IS_ARRAY, correct: false } + - { value: OPTIONAL, correct: false } + - { value: NONE, correct: true } help: 'https://github.com/symfony/console/blob/7.0/Input/InputArgument.php' - uuid: 1eebf878-8b9b-61b6-82fd-99d84c92580c @@ -44,7 +44,7 @@ questions: help: 'https://symfony.com/doc/current/console.html#creating-a-command' - uuid: 1eebf878-8ba3-6b36-baf6-99d84c92580c - question: "What needs to be done to register a custom command so it can be executed and listed when you execute php bin/console list ?" + question: 'What needs to be done to register a custom command so it can be executed and listed when you execute php bin/console list ?' answers: - { value: 'Add it to the registerCommands() method in the AppKernel class', correct: false } - { value: 'Define the command as a service and tag it with kernel.command.', correct: false } diff --git a/data/Console/options_and_arguments.yaml b/data/Console/options_and_arguments.yaml index 90aab99..514f9ea 100644 --- a/data/Console/options_and_arguments.yaml +++ b/data/Console/options_and_arguments.yaml @@ -34,13 +34,3 @@ questions: - { value: 'False', correct: true } - { value: 'True', correct: false } help: 'https://github.com/symfony/symfony/blob/6.4/src/Symfony/Component/Console/Command/Command.php#L544' - - - uuid: 1eebf878-8ba4-6202-a4b0-99d84c92580c - question: "Given a command that requires answering to a multiple choices question, how could the inputs (marked as ???) be set in a test? final class CommandTest extends TestCase { public function testExecute(): void { $commandTester = new CommandTester($command); $commandTester->setInputs(???); $commandTester->execute([ 'command' => $command->getName(), ]); } }" - answers: - - {value: '["first_input" && "second_input"]', correct: false} - - {value: '["first_input, second_input"]', correct: false} - - {value: '["first_input">>"second_input"]', correct: false} - - {value: 'It"s not possible', correct: false} - - {value: '["first_input", "second_input"]', correct: true} - help: 'https://symfony.com/doc/current/components/console/helpers/questionhelper.html#testing-a-command-that-expects-input' diff --git a/data/Console/verbosity_levels.yaml b/data/Console/verbosity_levels.yaml index 0cef025..846ecd9 100644 --- a/data/Console/verbosity_levels.yaml +++ b/data/Console/verbosity_levels.yaml @@ -16,17 +16,17 @@ questions: uuid: 1eebf878-8ba5-68c8-80d0-99d84c92580c question: 'In a console, what are the available methods to show messages only in a case of verbosity ?' answers: - - {value: 'isQuiet()', correct: true} - - {value: 'normal()', correct: false} - - {value: 'isVerbose()', correct: true} - - {value: 'isVeryVerbose()', correct: true} - - {value: 'isVeryVeryVerbose()', correct: false} - - {value: 'isDebug()', correct: true} - - {value: 'isVeryDebug()', correct: false} + - { value: isQuiet(), correct: true } + - { value: normal(), correct: false } + - { value: isVerbose(), correct: true } + - { value: isVeryVerbose(), correct: true } + - { value: isVeryVeryVerbose(), correct: false } + - { value: isDebug(), correct: true } + - { value: isVeryDebug(), correct: false } help: 'https://symfony.com/doc/current/console/verbosity.html' - uuid: 1eebf878-8ba5-690e-84ef-99d84c92580c - question: "Is this a correct way to print information in a console for a verbose level or higher ? $output->writeln(OutputInterface::VERBOSITY_VERBOSE, 'Printed in verbose mode or higher');" + question: "Is this a correct way to print information in a console for a verbose level or higher ? $output->writeln(OutputInterface::VERBOSITY_VERBOSE, 'Printed in verbose mode or higher');" answers: - { value: 'Yes', correct: false } - { value: 'No', correct: true } diff --git a/data/forms/form_types.yaml b/data/forms/form_types.yaml index 1f27cc3..6f1f52d 100644 --- a/data/forms/form_types.yaml +++ b/data/forms/form_types.yaml @@ -92,7 +92,7 @@ questions: help: 'https://symfony.com/doc/current/reference/forms/types/money.html' - uuid: 1eebf878-8b99-6c30-8ce8-99d84c92580c - question: 'Which option should you use to render a DateType form type as an HTML5 ?' + question: 'Which option should you use to render a DateType form type as an HTML5 ?' answers: - { value: no_javascript, correct: false } - { value: type_date, correct: false } diff --git a/data/http_caching/expiration_expires_cache_control.yaml b/data/http_caching/expiration_expires_cache_control.yaml index edc2492..6967a78 100644 --- a/data/http_caching/expiration_expires_cache_control.yaml +++ b/data/http_caching/expiration_expires_cache_control.yaml @@ -1,7 +1,7 @@ questions: - uuid: 1eebf878-8b99-65a0-956f-99d84c92580c - question: 'Given the following header, will the resource be considered as fresh? Expires: 0' + question: 'Given the following header, will the resource be considered as fresh? Expires: 0 ' answers: - { value: 'Yes', correct: false } - { value: 'No', correct: true } diff --git a/data/miscellaneous/cache_process_and_serializer_components.yaml b/data/miscellaneous/cache_process_and_serializer_components.yaml index e856f26..6440c7f 100644 --- a/data/miscellaneous/cache_process_and_serializer_components.yaml +++ b/data/miscellaneous/cache_process_and_serializer_components.yaml @@ -124,10 +124,10 @@ questions: uuid: 1eebf878-8ba3-61e0-9460-99d84c92580c question: 'How to specify the date format for a date attribute in a serialization context ?' answers: - - { value: "#[Serializer\Context([DateTimeNormalizer::FORMAT_KEY => 'Y-m-d'])] public \DateTime $date;", correct: true } + - { value: "#[Serializer\\Context([DateTimeNormalizer::FORMAT_KEY => 'Y-m-d'])] public DateTime $date;", correct: true } - { value: "It's not possible", correct: false } - - { value: "/** @Serializer\Context({ DateTimeNormalizer::FORMAT_KEY = 'Y-m-d' }) */ public \DateTime $date;", correct: true } - - { value: "/** @Serializer\DateFormat('Y-m-d' ) */ public \DateTime $date;", correct: false } + - { value: "/** @Serializer\\Context({ DateTimeNormalizer::FORMAT_KEY = 'Y-m-d' }) */ public DateTime $date;", correct: true } + - { value: "/** @Serializer\\DateFormat('Y-m-d' ) */ public DateTime $date;", correct: false } help: 'https://symfony.com/doc/current/serializer.html#serializer-context' - uuid: 1eebf878-8ba3-68f2-a0ce-99d84c92580c diff --git a/data/php_and_web_security/anonymous_functions_and_closures.yaml b/data/php_and_web_security/anonymous_functions_and_closures.yaml index 65fc3a7..d67004d 100644 --- a/data/php_and_web_security/anonymous_functions_and_closures.yaml +++ b/data/php_and_web_security/anonymous_functions_and_closures.yaml @@ -1,12 +1,4 @@ questions: - - - uuid: 1eebf878-8ba9-646e-93a2-99d84c92580c - question: "What will be the output of this ? $message = ''; $example = function ($arg) use ($message) { var_dump($arg . ' ' . $message); }; $example( hello );" - answers: - - { value: hello, correct: true } - - { value: 'Fatal Error', correct: false } - - { value: 'Hello World', correct: false } - help: 'https://www.php.net/manual/en/functions.anonymous.php' - uuid: 1eebf878-8ba9-6536-8861-99d84c92580c question: 'What will be the output of this ? $result = 0; echo function() { var_dump($result); };' diff --git a/data/php_and_web_security/namespaces.yaml b/data/php_and_web_security/namespaces.yaml index df1eefb..6d52858 100644 --- a/data/php_and_web_security/namespaces.yaml +++ b/data/php_and_web_security/namespaces.yaml @@ -27,7 +27,7 @@ questions: help: 'https://github.com/symfony/symfony/tree/master/src/Symfony' - uuid: 1eebf878-8ba9-63d8-874d-99d84c92580c - question: 'Where is the Test Class ? namespace Foo\Bar; use Foo\Test;' + question: 'Where is the Test Class ? namespace Foo\Bar; use Foo\Test;' answers: - { value: 'in Foo\Test', correct: true } - { value: 'in Foo\Bar', correct: false } @@ -35,7 +35,7 @@ questions: help: 'https://www.php.net/manual/en/language.oop5.traits.php#113047' - uuid: 1eebf878-8ba9-641e-8f50-99d84c92580c - question: "Where is the Test Class ? namespace Foo\Bar; class SomeClass { use Foo\Test; }" + question: 'Where is the Test Class ? namespace Foo\Bar; class SomeClass { use Foo\Test; }' answers: - { value: Foo\Bar, correct: false } - { value: Foo\Bar\Foo\Test, correct: true } diff --git a/data/php_and_web_security/object_oriented_programming.yaml b/data/php_and_web_security/object_oriented_programming.yaml index 010d549..02ce4c7 100644 --- a/data/php_and_web_security/object_oriented_programming.yaml +++ b/data/php_and_web_security/object_oriented_programming.yaml @@ -36,7 +36,7 @@ questions: help: 'https://php.net/manual/en/language.oop5.static.php' - uuid: 1eebf878-8ba2-6934-ad03-99d84c92580c - question: "What will be the output of the following code? class Foo { const BAR = 4+1 } echo Foo::BAR;" + question: 'What will be the output of the following code? class Foo { const BAR = 4+1 } echo Foo::BAR;' answers: - { value: 'An error', correct: false } - { value: '1', correct: false } diff --git a/data/php_and_web_security/php_extensions.yaml b/data/php_and_web_security/php_extensions.yaml index 39eaedc..b711d9c 100644 --- a/data/php_and_web_security/php_extensions.yaml +++ b/data/php_and_web_security/php_extensions.yaml @@ -11,7 +11,7 @@ questions: help: 'https://www.php.net/manual/en/function.header.php' - uuid: 1eebf878-8ba5-624c-866b-99d84c92580c - question: 'What is the output ? $a = "0"; echo strlen($a); echo empty($a) ? $a : 5; echo $a ?: 5;' + question: "What is the output ? $a = '0' ; echo strlen($a); echo empty($a) ? $a : 5; echo $a ?: 5;" answers: - { value: '100', correct: false } - { value: '005', correct: false } diff --git a/data/php_and_web_security/phpapi_up_to_php81_version.yaml b/data/php_and_web_security/phpapi_up_to_php81_version.yaml index ef25325..a198f5d 100644 --- a/data/php_and_web_security/phpapi_up_to_php81_version.yaml +++ b/data/php_and_web_security/phpapi_up_to_php81_version.yaml @@ -89,7 +89,7 @@ questions: help: 'https://www.php.net/manual/en/function.extract.php' - uuid: 1eebf878-8b9c-6656-8085-99d84c92580c - question: "Which function would best parse the following string by the tab (\\t) and newline (\\n) characters ?$string = John\\tMark\\nTed\\tLarry ;" + question: 'Which function would best parse the following string by the tab (\t) and newline (\n) characters ? $string = John\tMark\nTed\tLarry ;' answers: - { value: 'explode($string, \t\n );', correct: false } - { value: strtok($string);, correct: true } @@ -272,7 +272,7 @@ questions: help: 'https://www.php.net/manual/en/language.operators.comparison.php' - uuid: 1eebf878-8ba3-6dc0-bb50-99d84c92580c - question: "What is the most recommended way to count the number of occurences of each unique value in the following array?\_$a=[1,1,2,3,4,4,5,6,6,6,3,2,2,2];" + question: "What is the most recommended way to count the number of occurences of each unique value in the following array? $a=[1,1,2,3,4,4,5,6,6,6,3,2,2,2];" answers: - { value: '$ = array_unique($a);$k = array_fill(0,count($k), 0);$n = array_combine($k, $v);reset($a);for($i =0; $i < count($a); $i++){++$n[current($a)];', correct: false } - { value: '$n = array_count_values($a);', correct: true } diff --git a/data/php_and_web_security/traits.yaml b/data/php_and_web_security/traits.yaml index d51b770..2bc32fb 100644 --- a/data/php_and_web_security/traits.yaml +++ b/data/php_and_web_security/traits.yaml @@ -6,14 +6,6 @@ questions: - { value: 'Yes', correct: false } - { value: 'No', correct: true } help: 'https://www.php.net/manual/en/language.oop5.traits.php' - - - uuid: 1eebf878-8ba9-6072-929e-99d84c92580c - question: "What will the output of this function ? trait HelloWorld { public function sayHello() { echo 'Hello World!' } } class TheWorldIsNotEnough { use HelloWorld public function sayHello() { echo 'Hello Universe!'; } } $o= new TheWorldIsNotEnough(); $o->sayHello();" - answers: - - { value: 'Hello World!', correct: false } - - { value: 'Hello Universe!', correct: true } - - { value: 'Fatal Error', correct: false } - help: 'https://www.php.net/manual/en/language.oop5.traits.php' - uuid: 1eebf878-8ba9-6108-8a3b-99d84c92580c question: "To resolve naming conflicts between Traits used in the same class, what's the operator needed to be used to choose exactly one of the conflicting methods ?" diff --git a/data/routing/router_debugging.yaml b/data/routing/router_debugging.yaml index 4252001..cb64935 100644 --- a/data/routing/router_debugging.yaml +++ b/data/routing/router_debugging.yaml @@ -1,7 +1,7 @@ questions: - uuid: 1eebf878-8ba4-66d0-9c83-99d84c92580c - question: "php bin/console debug:router XXXXXX What's the argument after this command in XXXXXX ?" + question: "What's the argument after php bin/console debug:router ?" answers: - { value: 'No arguments', correct: true } - { value: 'a specific path', correct: false } diff --git a/data/security/password_hashers.yaml b/data/security/password_hashers.yaml index 36f9b29..c96b07b 100644 --- a/data/security/password_hashers.yaml +++ b/data/security/password_hashers.yaml @@ -27,7 +27,7 @@ questions: help: 'https://symfony.com/doc/current/security/passwords.html#configuring-a-password-hasher' - uuid: 1eebf878-8ba6-62f0-a65c-99d84c92580c - question: 'What is the interface you need to call in your controller to get the $passwordHasher ? $hashedPassword = $passwordHasher->hashPassword( $user, $plaintextPassword ); $user->setPassword($hashedPassword);' + question: 'What is the interface you need to call in your controller to get the $passwordHasher ? $hashedPassword = $passwordHasher->hashPassword( $user, $plaintextPassword );' answers: - { value: UserPasswordHasherInterface, correct: true } - { value: HasherInterface, correct: false } diff --git a/data/symfony_architecture/event_dispatcher_and_kernel_events.yaml b/data/symfony_architecture/event_dispatcher_and_kernel_events.yaml index e8efd38..2e95bf0 100644 --- a/data/symfony_architecture/event_dispatcher_and_kernel_events.yaml +++ b/data/symfony_architecture/event_dispatcher_and_kernel_events.yaml @@ -3,10 +3,10 @@ questions: uuid: 1eebf878-8b96-6eea-8d09-99d84c92580c question: 'In which order does Symfony trigger the following events?' answers: - - { value: kernel.requestkernel.controllerkernel.controller_argumentskernel.viewkernel.responsekernel.finish_requestkernel.terminate, correct: true } - - { value: kernel.requestkernel.controllerkernel.controller_argumentskernel.viewkernel.responsekernel.terminatekernel.finish_request, correct: false } - - { value: kernel.requestkernel.controllerkernel.controller_argumentskernel.responsekernel.viewkernel.terminatekernel.finish_request, correct: false } - - { value: kernel.requestkernel.controllerkernel.controller_argumentskernel.responsekernel.viewkernel.finish_requestkernel.terminate, correct: false } + - { value: 'kernel.request, kernel.controller, kernel.controller_arguments, kernel.view, kernel.response, kernel.finish_request, kernel.terminate', correct: true } + - { value: 'kernel.request, kernel.controller, kernel.controller_arguments, kernel.view, kernel.response, kernel.terminate, kernel.finish_request', correct: false } + - { value: 'kernel.request, kernel.controller, kernel.controller_arguments, kernel.response, kernel.view, kernel.terminate, kernel.finish_request', correct: false } + - { value: 'kernel.request, kernel.controller, kernel.controller_arguments, kernel.response, kernel.view, kernel.finish_request, kernel.terminate', correct: false } help: 'https://symfony.com/doc/current/components/http_kernel.html#creating-an-event-listener' - uuid: 1eebf878-8b97-658e-8993-99d84c92580c diff --git a/data/symfony_architecture/framework_interoperability_and_ps_rs.yaml b/data/symfony_architecture/framework_interoperability_and_ps_rs.yaml index 0ff4c57..b03a19e 100644 --- a/data/symfony_architecture/framework_interoperability_and_ps_rs.yaml +++ b/data/symfony_architecture/framework_interoperability_and_ps_rs.yaml @@ -187,7 +187,7 @@ questions: help: 'https://github.com/symfony/routing/blob/6.3/RequestContext.php#L292' - uuid: 1eebf878-8b9c-669c-9b9d-99d84c92580c - question: "Considering the following code, which assertions are true? $object = $this->entityManager->getReference('AppBundle\\Entity\\User', 1);" + question: 'Considering the following code, which assertions are true? $object = $this->entityManager->getReference("AppBundle\Entity\User", 1);' answers: - { value: '$object is an instance of Doctrine\ORM\Proxy\Proxy.', correct: true } - { value: '$object is an instance of AppBundle\Entity\User.', correct: true } diff --git a/data/symfony_architecture/naming_conventions.yaml b/data/symfony_architecture/naming_conventions.yaml index 5e94e54..3e6e1aa 100644 --- a/data/symfony_architecture/naming_conventions.yaml +++ b/data/symfony_architecture/naming_conventions.yaml @@ -60,7 +60,7 @@ questions: help: 'https://symfony.com/doc/current/contributing/code/standards.html#naming-conventions' - uuid: 1eeda2ca-d3e4-6b68-a248-eb5bab40e010 - question: '

We use upper camel case for ?

' + question: 'We use upper camel case for ?' answers: - { value: class, correct: false } - { value: constants, correct: false } diff --git a/data/templating_with_twig/global_variables.yaml b/data/templating_with_twig/global_variables.yaml index 5eabcf9..55ffce3 100644 --- a/data/templating_with_twig/global_variables.yaml +++ b/data/templating_with_twig/global_variables.yaml @@ -10,14 +10,14 @@ questions: help: 'https://twig.symfony.com/doc/3.x/templates.html#global-variables' - uuid: 1eebf878-8ba5-6a30-ac9b-99d84c92580c - question: 'Will this code permit to get the {{ ga_tracking }} in every twig files ? twig.globals.ga_tracking: "UA-xxxxx-x"' + question: 'Will this code permit to get the {{ ga_tracking }} in every twig files ? twig.globals.ga_tracking: "UA-xxxxx-x"' answers: - { value: 'No', correct: false } - { value: 'Yes', correct: true } help: 'https://symfony.com/doc/current/templates.html#global-variables' - uuid: 1eebf878-8ba5-6a76-b902-99d84c92580c - question: "What's the correct way to declare the global variable uuid to get {{ uuid.generate }} in any twig files" + question: "What's the correct way to declare the global variable uuid to get {{ uuid.generate }} in any twig files ?" answers: - { value: 'twig.globals.uuid: @App\Generator\UuidGenerator ', correct: true } - { value: 'twig.globals.uuid: App\Generator\UuidGenerator ', correct: false }