{"action":"created","comment":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/comments/40895537","id":40895537,"diff_hunk":"@@ -0,0 +1,216 @@\n+<?php\n+/**\n+ * 2007-2015 PrestaShop\n+ *\n+ * NOTICE OF LICENSE\n+ *\n+ * This source file is subject to the Open Software License (OSL 3.0)\n+ * that is bundled with this package in the file LICENSE.txt.\n+ * It is also available through the world-wide-web at this URL:\n+ * http://opensource.org/licenses/osl-3.0.php\n+ * If you did not receive a copy of the license and are unable to\n+ * obtain it through the world-wide-web, please send an email\n+ * to license@prestashop.com so we can send you a copy immediately.\n+ *\n+ * DISCLAIMER\n+ *\n+ * Do not edit or add to this file if you wish to upgrade PrestaShop to newer\n+ * versions in the future. If you wish to customize PrestaShop for your\n+ * needs please refer to http://www.prestashop.com for more information.\n+ *\n+ * @author    PrestaShop SA <contact@prestashop.com>\n+ * @copyright 2007-2015 PrestaShop SA\n+ * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)\n+ * International Registered Trademark & Property of PrestaShop SA\n+ */\n+\n+namespace PrestaShop\\PrestaShop\\Core\\Business\\Product\\Form;\n+\n+use Symfony\\Component\\Form\\AbstractType;\n+use Symfony\\Component\\Form\\FormBuilderInterface;\n+use Symfony\\Component\\Validator\\Constraints as Assert;\n+use PrestaShop\\PrestaShop\\Core\\Foundation\\Form\\Type\\TranslateType;\n+use PrestaShop\\PrestaShop\\Core\\Foundation\\Form\\Type\\DropFilesType;\n+use PrestaShop\\PrestaShop\\Core\\Business\\Form\\Type\\ChoiceCategoriesTreeType;\n+use PrestaShop\\PrestaShop\\Core\\Business\\Form\\Type\\TypeaheadProductCollectionType;\n+use PrestaShop\\PrestaShop\\Core\\Foundation\\IoC\\Container;\n+\n+/**\n+ * This form class is risponsible to generate the basic product informations form\n+ */\n+class ProductInformation extends AbstractType\n+{\n+    private $router;\n+    private $context;\n+    private $translator;\n+    private $tax_rules;\n+    private $manufacturers;\n+    private $locales;\n+    private $nested_categories;\n+    private $productAdapter;\n+\n+    /**\n+     * Constructor\n+     *\n+     * @param Container $container\n+     */\n+    public function __construct(Container $container)\n+    {\n+        $this->router = $container->make('Routing');\n+        $this->context = $container->make('Context');\n+        $this->translator = $container->make('Translator');\n+        $this->productAdapter = $container->make('CoreAdapter:Product\\\\ProductDataProvider');\n+        $this->locales = $container->make('CoreAdapter:Language\\\\LanguageDataProvider')->getLanguages();\n+        $this->nested_categories = $container->make('CoreAdapter:Category\\\\CategoryDataProvider')->getNestedCategories();\n+        $this->tax_rules = $this->formatDataChoicesList(\n+            $container->make('CoreAdapter:Tax\\\\TaxRuleDataProvider')->getTaxRulesGroups(true),\n+            'id_tax_rules_group'\n+        );\n+        $this->manufacturers = $this->formatDataChoicesList(\n+            $container->make('CoreAdapter:Manufacturer\\\\ManufacturerDataProvider')->getManufacturers(false, 0, true, false, false, false, true),\n+            'id_manufacturer'\n+        );\n+    }\n+\n+    /**\n+     * Format legacy data list to mapping SF2 form filed choice\n+     *\n+     * @param array $list\n+     * @param string $mapping_value\n+     * @param string $mapping_name\n+     * @return array\n+     */\n+    private function formatDataChoicesList($list, $mapping_value = 'id', $mapping_name = 'name')","path":"Core/Business/Product/Form/ProductInformation.php","position":85,"original_position":83,"commit_id":"0f4d5a2000b5b59125a8314d907805ec3baf82b1","original_commit_id":"bc3551ff64436b7516d0ab78b3b302195dd51847","user":{"login":"tchauviere","id":5026142,"avatar_url":"https://avatars.githubusercontent.com/u/5026142?v=3","gravatar_id":"","url":"https://api.github.com/users/tchauviere","html_url":"https://github.com/tchauviere","followers_url":"https://api.github.com/users/tchauviere/followers","following_url":"https://api.github.com/users/tchauviere/following{/other_user}","gists_url":"https://api.github.com/users/tchauviere/gists{/gist_id}","starred_url":"https://api.github.com/users/tchauviere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tchauviere/subscriptions","organizations_url":"https://api.github.com/users/tchauviere/orgs","repos_url":"https://api.github.com/users/tchauviere/repos","events_url":"https://api.github.com/users/tchauviere/events{/privacy}","received_events_url":"https://api.github.com/users/tchauviere/received_events","type":"User","site_admin":false},"body":"Array type hinting on list","created_at":"2015-10-01T09:41:54Z","updated_at":"2015-10-01T09:41:54Z","html_url":"https://github.com/PrestaShop/PrestaShop/pull/3937#discussion_r40895537","pull_request_url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/3937","_links":{"self":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/comments/40895537"},"html":{"href":"https://github.com/PrestaShop/PrestaShop/pull/3937#discussion_r40895537"},"pull_request":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/3937"}}},"pull_request":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/3937","id":44530347,"html_url":"https://github.com/PrestaShop/PrestaShop/pull/3937","diff_url":"https://github.com/PrestaShop/PrestaShop/pull/3937.diff","patch_url":"https://github.com/PrestaShop/PrestaShop/pull/3937.patch","issue_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/3937","number":3937,"state":"open","locked":false,"title":"New Architecture layer (Router, Controller, ...)","user":{"login":"xGouley","id":12794114,"avatar_url":"https://avatars.githubusercontent.com/u/12794114?v=3","gravatar_id":"","url":"https://api.github.com/users/xGouley","html_url":"https://github.com/xGouley","followers_url":"https://api.github.com/users/xGouley/followers","following_url":"https://api.github.com/users/xGouley/following{/other_user}","gists_url":"https://api.github.com/users/xGouley/gists{/gist_id}","starred_url":"https://api.github.com/users/xGouley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xGouley/subscriptions","organizations_url":"https://api.github.com/users/xGouley/orgs","repos_url":"https://api.github.com/users/xGouley/repos","events_url":"https://api.github.com/users/xGouley/events{/privacy}","received_events_url":"https://api.github.com/users/xGouley/received_events","type":"User","site_admin":false},"body":"Please begin code review of this PR, and tell me before to merge. Luc is still finishing a small subpart (views -> file Dropzone widget).\r\nFIXED: Awaitng for merge :))","created_at":"2015-09-09T09:55:19Z","updated_at":"2015-10-01T09:41:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ace4deb56e1b7309231281a2da79955ba8c3abb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/3937/commits","review_comments_url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/3937/comments","review_comment_url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/3937/comments","statuses_url":"https://api.github.com/repos/PrestaShop/PrestaShop/statuses/0f4d5a2000b5b59125a8314d907805ec3baf82b1","head":{"label":"xGouley:develop-sf2","ref":"develop-sf2","sha":"0f4d5a2000b5b59125a8314d907805ec3baf82b1","user":{"login":"xGouley","id":12794114,"avatar_url":"https://avatars.githubusercontent.com/u/12794114?v=3","gravatar_id":"","url":"https://api.github.com/users/xGouley","html_url":"https://github.com/xGouley","followers_url":"https://api.github.com/users/xGouley/followers","following_url":"https://api.github.com/users/xGouley/following{/other_user}","gists_url":"https://api.github.com/users/xGouley/gists{/gist_id}","starred_url":"https://api.github.com/users/xGouley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xGouley/subscriptions","organizations_url":"https://api.github.com/users/xGouley/orgs","repos_url":"https://api.github.com/users/xGouley/repos","events_url":"https://api.github.com/users/xGouley/events{/privacy}","received_events_url":"https://api.github.com/users/xGouley/received_events","type":"User","site_admin":false},"repo":{"id":37054595,"name":"PrestaShop","full_name":"xGouley/PrestaShop","owner":{"login":"xGouley","id":12794114,"avatar_url":"https://avatars.githubusercontent.com/u/12794114?v=3","gravatar_id":"","url":"https://api.github.com/users/xGouley","html_url":"https://github.com/xGouley","followers_url":"https://api.github.com/users/xGouley/followers","following_url":"https://api.github.com/users/xGouley/following{/other_user}","gists_url":"https://api.github.com/users/xGouley/gists{/gist_id}","starred_url":"https://api.github.com/users/xGouley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xGouley/subscriptions","organizations_url":"https://api.github.com/users/xGouley/orgs","repos_url":"https://api.github.com/users/xGouley/repos","events_url":"https://api.github.com/users/xGouley/events{/privacy}","received_events_url":"https://api.github.com/users/xGouley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xGouley/PrestaShop","description":"PrestaShop offers a free, fully scalable, Open-source e-commerce solution.","fork":true,"url":"https://api.github.com/repos/xGouley/PrestaShop","forks_url":"https://api.github.com/repos/xGouley/PrestaShop/forks","keys_url":"https://api.github.com/repos/xGouley/PrestaShop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xGouley/PrestaShop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xGouley/PrestaShop/teams","hooks_url":"https://api.github.com/repos/xGouley/PrestaShop/hooks","issue_events_url":"https://api.github.com/repos/xGouley/PrestaShop/issues/events{/number}","events_url":"https://api.github.com/repos/xGouley/PrestaShop/events","assignees_url":"https://api.github.com/repos/xGouley/PrestaShop/assignees{/user}","branches_url":"https://api.github.com/repos/xGouley/PrestaShop/branches{/branch}","tags_url":"https://api.github.com/repos/xGouley/PrestaShop/tags","blobs_url":"https://api.github.com/repos/xGouley/PrestaShop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xGouley/PrestaShop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xGouley/PrestaShop/git/refs{/sha}","trees_url":"https://api.github.com/repos/xGouley/PrestaShop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xGouley/PrestaShop/statuses/{sha}","languages_url":"https://api.github.com/repos/xGouley/PrestaShop/languages","stargazers_url":"https://api.github.com/repos/xGouley/PrestaShop/stargazers","contributors_url":"https://api.github.com/repos/xGouley/PrestaShop/contributors","subscribers_url":"https://api.github.com/repos/xGouley/PrestaShop/subscribers","subscription_url":"https://api.github.com/repos/xGouley/PrestaShop/subscription","commits_url":"https://api.github.com/repos/xGouley/PrestaShop/commits{/sha}","git_commits_url":"https://api.github.com/repos/xGouley/PrestaShop/git/commits{/sha}","comments_url":"https://api.github.com/repos/xGouley/PrestaShop/comments{/number}","issue_comment_url":"https://api.github.com/repos/xGouley/PrestaShop/issues/comments{/number}","contents_url":"https://api.github.com/repos/xGouley/PrestaShop/contents/{+path}","compare_url":"https://api.github.com/repos/xGouley/PrestaShop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xGouley/PrestaShop/merges","archive_url":"https://api.github.com/repos/xGouley/PrestaShop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xGouley/PrestaShop/downloads","issues_url":"https://api.github.com/repos/xGouley/PrestaShop/issues{/number}","pulls_url":"https://api.github.com/repos/xGouley/PrestaShop/pulls{/number}","milestones_url":"https://api.github.com/repos/xGouley/PrestaShop/milestones{/number}","notifications_url":"https://api.github.com/repos/xGouley/PrestaShop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xGouley/PrestaShop/labels{/name}","releases_url":"https://api.github.com/repos/xGouley/PrestaShop/releases{/id}","created_at":"2015-06-08T08:21:27Z","updated_at":"2015-06-08T08:21:38Z","pushed_at":"2015-10-01T09:40:54Z","git_url":"git://github.com/xGouley/PrestaShop.git","ssh_url":"git@github.com:xGouley/PrestaShop.git","clone_url":"https://github.com/xGouley/PrestaShop.git","svn_url":"https://github.com/xGouley/PrestaShop","homepage":"http://www.prestashop.com/","size":213477,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":0,"forks":2,"open_issues":0,"watchers":0,"default_branch":"1.6"}},"base":{"label":"PrestaShop:develop","ref":"develop","sha":"fc7aa84784b3cd7cc6f058dc04dd6f442842eef9","user":{"login":"PrestaShop","id":2815696,"avatar_url":"https://avatars.githubusercontent.com/u/2815696?v=3","gravatar_id":"","url":"https://api.github.com/users/PrestaShop","html_url":"https://github.com/PrestaShop","followers_url":"https://api.github.com/users/PrestaShop/followers","following_url":"https://api.github.com/users/PrestaShop/following{/other_user}","gists_url":"https://api.github.com/users/PrestaShop/gists{/gist_id}","starred_url":"https://api.github.com/users/PrestaShop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PrestaShop/subscriptions","organizations_url":"https://api.github.com/users/PrestaShop/orgs","repos_url":"https://api.github.com/users/PrestaShop/repos","events_url":"https://api.github.com/users/PrestaShop/events{/privacy}","received_events_url":"https://api.github.com/users/PrestaShop/received_events","type":"Organization","site_admin":false},"repo":{"id":6763587,"name":"PrestaShop","full_name":"PrestaShop/PrestaShop","owner":{"login":"PrestaShop","id":2815696,"avatar_url":"https://avatars.githubusercontent.com/u/2815696?v=3","gravatar_id":"","url":"https://api.github.com/users/PrestaShop","html_url":"https://github.com/PrestaShop","followers_url":"https://api.github.com/users/PrestaShop/followers","following_url":"https://api.github.com/users/PrestaShop/following{/other_user}","gists_url":"https://api.github.com/users/PrestaShop/gists{/gist_id}","starred_url":"https://api.github.com/users/PrestaShop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PrestaShop/subscriptions","organizations_url":"https://api.github.com/users/PrestaShop/orgs","repos_url":"https://api.github.com/users/PrestaShop/repos","events_url":"https://api.github.com/users/PrestaShop/events{/privacy}","received_events_url":"https://api.github.com/users/PrestaShop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PrestaShop/PrestaShop","description":"PrestaShop offers a free, fully scalable, Open-source e-commerce solution.","fork":false,"url":"https://api.github.com/repos/PrestaShop/PrestaShop","forks_url":"https://api.github.com/repos/PrestaShop/PrestaShop/forks","keys_url":"https://api.github.com/repos/PrestaShop/PrestaShop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PrestaShop/PrestaShop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PrestaShop/PrestaShop/teams","hooks_url":"https://api.github.com/repos/PrestaShop/PrestaShop/hooks","issue_events_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/events{/number}","events_url":"https://api.github.com/repos/PrestaShop/PrestaShop/events","assignees_url":"https://api.github.com/repos/PrestaShop/PrestaShop/assignees{/user}","branches_url":"https://api.github.com/repos/PrestaShop/PrestaShop/branches{/branch}","tags_url":"https://api.github.com/repos/PrestaShop/PrestaShop/tags","blobs_url":"https://api.github.com/repos/PrestaShop/PrestaShop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PrestaShop/PrestaShop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PrestaShop/PrestaShop/git/refs{/sha}","trees_url":"https://api.github.com/repos/PrestaShop/PrestaShop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PrestaShop/PrestaShop/statuses/{sha}","languages_url":"https://api.github.com/repos/PrestaShop/PrestaShop/languages","stargazers_url":"https://api.github.com/repos/PrestaShop/PrestaShop/stargazers","contributors_url":"https://api.github.com/repos/PrestaShop/PrestaShop/contributors","subscribers_url":"https://api.github.com/repos/PrestaShop/PrestaShop/subscribers","subscription_url":"https://api.github.com/repos/PrestaShop/PrestaShop/subscription","commits_url":"https://api.github.com/repos/PrestaShop/PrestaShop/commits{/sha}","git_commits_url":"https://api.github.com/repos/PrestaShop/PrestaShop/git/commits{/sha}","comments_url":"https://api.github.com/repos/PrestaShop/PrestaShop/comments{/number}","issue_comment_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/comments{/number}","contents_url":"https://api.github.com/repos/PrestaShop/PrestaShop/contents/{+path}","compare_url":"https://api.github.com/repos/PrestaShop/PrestaShop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PrestaShop/PrestaShop/merges","archive_url":"https://api.github.com/repos/PrestaShop/PrestaShop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PrestaShop/PrestaShop/downloads","issues_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues{/number}","pulls_url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls{/number}","milestones_url":"https://api.github.com/repos/PrestaShop/PrestaShop/milestones{/number}","notifications_url":"https://api.github.com/repos/PrestaShop/PrestaShop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PrestaShop/PrestaShop/labels{/name}","releases_url":"https://api.github.com/repos/PrestaShop/PrestaShop/releases{/id}","created_at":"2012-11-19T16:41:31Z","updated_at":"2015-10-01T09:32:14Z","pushed_at":"2015-10-01T09:40:56Z","git_url":"git://github.com/PrestaShop/PrestaShop.git","ssh_url":"git@github.com:PrestaShop/PrestaShop.git","clone_url":"https://github.com/PrestaShop/PrestaShop.git","svn_url":"https://github.com/PrestaShop/PrestaShop","homepage":"http://www.prestashop.com/","size":322392,"stargazers_count":1422,"watchers_count":1422,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1576,"mirror_url":null,"open_issues_count":384,"forks":1576,"open_issues":384,"watchers":1422,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/3937"},"html":{"href":"https://github.com/PrestaShop/PrestaShop/pull/3937"},"issue":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/3937"},"comments":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/3937/comments"},"review_comments":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/3937/comments"},"review_comment":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/3937/commits"},"statuses":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/statuses/0f4d5a2000b5b59125a8314d907805ec3baf82b1"}}}}