{"action":"created","comment":{"url":"https://api.github.com/repos/robmorgan/phinx/pulls/comments/22760234","id":22760234,"diff_hunk":"@@ -113,8 +130,54 @@ protected function execute(InputInterface $input, OutputInterface $output)\n             ));\n         }\n \n-        // load the migration template\n-        $contents = $this->getMigrationTemplate();\n+        // Get the alternative template and static class options, but only allow one of them.\n+        $altTemplate = $input->getOption('template');\n+        $creationClassName = $input->getOption('class');\n+        if (!empty($altTemplate) && !empty($creationClassName)) {","path":"src/Phinx/Console/Command/Create.php","position":58,"original_position":58,"commit_id":"616042b05b36f65e2d72e476803716f27966b7e6","original_commit_id":"616042b05b36f65e2d72e476803716f27966b7e6","user":{"login":"shadowhand","id":38203,"avatar_url":"https://avatars.githubusercontent.com/u/38203?v=3","gravatar_id":"","url":"https://api.github.com/users/shadowhand","html_url":"https://github.com/shadowhand","followers_url":"https://api.github.com/users/shadowhand/followers","following_url":"https://api.github.com/users/shadowhand/following{/other_user}","gists_url":"https://api.github.com/users/shadowhand/gists{/gist_id}","starred_url":"https://api.github.com/users/shadowhand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shadowhand/subscriptions","organizations_url":"https://api.github.com/users/shadowhand/orgs","repos_url":"https://api.github.com/users/shadowhand/repos","events_url":"https://api.github.com/users/shadowhand/events{/privacy}","received_events_url":"https://api.github.com/users/shadowhand/received_events","type":"User","site_admin":false},"body":"The `empty` calls are unnecessary here, truthy calls are fine:\r\n\r\n```php\r\nif ($altTemplate && $creationClassName) { /* effectively the same as using !empty() */ }\r\n```","created_at":"2015-01-10T16:58:51Z","updated_at":"2015-01-10T16:58:51Z","html_url":"https://github.com/robmorgan/phinx/pull/444#discussion_r22760234","pull_request_url":"https://api.github.com/repos/robmorgan/phinx/pulls/444","_links":{"self":{"href":"https://api.github.com/repos/robmorgan/phinx/pulls/comments/22760234"},"html":{"href":"https://github.com/robmorgan/phinx/pull/444#discussion_r22760234"},"pull_request":{"href":"https://api.github.com/repos/robmorgan/phinx/pulls/444"}}},"pull_request":{"url":"https://api.github.com/repos/robmorgan/phinx/pulls/444","id":27146461,"html_url":"https://github.com/robmorgan/phinx/pull/444","diff_url":"https://github.com/robmorgan/phinx/pull/444.diff","patch_url":"https://github.com/robmorgan/phinx/pull/444.patch","issue_url":"https://api.github.com/repos/robmorgan/phinx/issues/444","number":444,"state":"open","locked":false,"title":"Feature/alternative template generation","user":{"login":"RQuadling","id":12801,"avatar_url":"https://avatars.githubusercontent.com/u/12801?v=3","gravatar_id":"","url":"https://api.github.com/users/RQuadling","html_url":"https://github.com/RQuadling","followers_url":"https://api.github.com/users/RQuadling/followers","following_url":"https://api.github.com/users/RQuadling/following{/other_user}","gists_url":"https://api.github.com/users/RQuadling/gists{/gist_id}","starred_url":"https://api.github.com/users/RQuadling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RQuadling/subscriptions","organizations_url":"https://api.github.com/users/RQuadling/orgs","repos_url":"https://api.github.com/users/RQuadling/repos","events_url":"https://api.github.com/users/RQuadling/events{/privacy}","received_events_url":"https://api.github.com/users/RQuadling/received_events","type":"User","site_admin":false},"body":"Rebased my feature upon 0.4.x-dev 25eeeba. This replaces PR https://github.com/robmorgan/phinx/pull/437.\r\n\r\nReally sorry for the noise. Still learning git/github.","created_at":"2015-01-10T08:54:41Z","updated_at":"2015-01-10T16:58:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ada616260ce5317660e4472d31577a2870722e6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/robmorgan/phinx/pulls/444/commits","review_comments_url":"https://api.github.com/repos/robmorgan/phinx/pulls/444/comments","review_comment_url":"https://api.github.com/repos/robmorgan/phinx/pulls/comments/{number}","comments_url":"https://api.github.com/repos/robmorgan/phinx/issues/444/comments","statuses_url":"https://api.github.com/repos/robmorgan/phinx/statuses/616042b05b36f65e2d72e476803716f27966b7e6","head":{"label":"RQuadling:feature/AlternativeTemplateGeneration","ref":"feature/AlternativeTemplateGeneration","sha":"616042b05b36f65e2d72e476803716f27966b7e6","user":{"login":"RQuadling","id":12801,"avatar_url":"https://avatars.githubusercontent.com/u/12801?v=3","gravatar_id":"","url":"https://api.github.com/users/RQuadling","html_url":"https://github.com/RQuadling","followers_url":"https://api.github.com/users/RQuadling/followers","following_url":"https://api.github.com/users/RQuadling/following{/other_user}","gists_url":"https://api.github.com/users/RQuadling/gists{/gist_id}","starred_url":"https://api.github.com/users/RQuadling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RQuadling/subscriptions","organizations_url":"https://api.github.com/users/RQuadling/orgs","repos_url":"https://api.github.com/users/RQuadling/repos","events_url":"https://api.github.com/users/RQuadling/events{/privacy}","received_events_url":"https://api.github.com/users/RQuadling/received_events","type":"User","site_admin":false},"repo":{"id":28961143,"name":"phinx","full_name":"RQuadling/phinx","owner":{"login":"RQuadling","id":12801,"avatar_url":"https://avatars.githubusercontent.com/u/12801?v=3","gravatar_id":"","url":"https://api.github.com/users/RQuadling","html_url":"https://github.com/RQuadling","followers_url":"https://api.github.com/users/RQuadling/followers","following_url":"https://api.github.com/users/RQuadling/following{/other_user}","gists_url":"https://api.github.com/users/RQuadling/gists{/gist_id}","starred_url":"https://api.github.com/users/RQuadling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RQuadling/subscriptions","organizations_url":"https://api.github.com/users/RQuadling/orgs","repos_url":"https://api.github.com/users/RQuadling/repos","events_url":"https://api.github.com/users/RQuadling/events{/privacy}","received_events_url":"https://api.github.com/users/RQuadling/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RQuadling/phinx","description":"PHP Database Migrations for Everyone","fork":true,"url":"https://api.github.com/repos/RQuadling/phinx","forks_url":"https://api.github.com/repos/RQuadling/phinx/forks","keys_url":"https://api.github.com/repos/RQuadling/phinx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RQuadling/phinx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RQuadling/phinx/teams","hooks_url":"https://api.github.com/repos/RQuadling/phinx/hooks","issue_events_url":"https://api.github.com/repos/RQuadling/phinx/issues/events{/number}","events_url":"https://api.github.com/repos/RQuadling/phinx/events","assignees_url":"https://api.github.com/repos/RQuadling/phinx/assignees{/user}","branches_url":"https://api.github.com/repos/RQuadling/phinx/branches{/branch}","tags_url":"https://api.github.com/repos/RQuadling/phinx/tags","blobs_url":"https://api.github.com/repos/RQuadling/phinx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RQuadling/phinx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RQuadling/phinx/git/refs{/sha}","trees_url":"https://api.github.com/repos/RQuadling/phinx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RQuadling/phinx/statuses/{sha}","languages_url":"https://api.github.com/repos/RQuadling/phinx/languages","stargazers_url":"https://api.github.com/repos/RQuadling/phinx/stargazers","contributors_url":"https://api.github.com/repos/RQuadling/phinx/contributors","subscribers_url":"https://api.github.com/repos/RQuadling/phinx/subscribers","subscription_url":"https://api.github.com/repos/RQuadling/phinx/subscription","commits_url":"https://api.github.com/repos/RQuadling/phinx/commits{/sha}","git_commits_url":"https://api.github.com/repos/RQuadling/phinx/git/commits{/sha}","comments_url":"https://api.github.com/repos/RQuadling/phinx/comments{/number}","issue_comment_url":"https://api.github.com/repos/RQuadling/phinx/issues/comments/{number}","contents_url":"https://api.github.com/repos/RQuadling/phinx/contents/{+path}","compare_url":"https://api.github.com/repos/RQuadling/phinx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RQuadling/phinx/merges","archive_url":"https://api.github.com/repos/RQuadling/phinx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RQuadling/phinx/downloads","issues_url":"https://api.github.com/repos/RQuadling/phinx/issues{/number}","pulls_url":"https://api.github.com/repos/RQuadling/phinx/pulls{/number}","milestones_url":"https://api.github.com/repos/RQuadling/phinx/milestones{/number}","notifications_url":"https://api.github.com/repos/RQuadling/phinx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RQuadling/phinx/labels{/name}","releases_url":"https://api.github.com/repos/RQuadling/phinx/releases{/id}","created_at":"2015-01-08T10:35:49Z","updated_at":"2015-01-08T10:35:50Z","pushed_at":"2015-01-10T08:49:19Z","git_url":"git://github.com/RQuadling/phinx.git","ssh_url":"git@github.com:RQuadling/phinx.git","clone_url":"https://github.com/RQuadling/phinx.git","svn_url":"https://github.com/RQuadling/phinx","homepage":"https://phinx.org","size":2989,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"0.4.x-dev"}},"base":{"label":"robmorgan:0.4.x-dev","ref":"0.4.x-dev","sha":"25eeebab2d362fb5e423cff16e32eea1c94a169b","user":{"login":"robmorgan","id":178939,"avatar_url":"https://avatars.githubusercontent.com/u/178939?v=3","gravatar_id":"","url":"https://api.github.com/users/robmorgan","html_url":"https://github.com/robmorgan","followers_url":"https://api.github.com/users/robmorgan/followers","following_url":"https://api.github.com/users/robmorgan/following{/other_user}","gists_url":"https://api.github.com/users/robmorgan/gists{/gist_id}","starred_url":"https://api.github.com/users/robmorgan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robmorgan/subscriptions","organizations_url":"https://api.github.com/users/robmorgan/orgs","repos_url":"https://api.github.com/users/robmorgan/repos","events_url":"https://api.github.com/users/robmorgan/events{/privacy}","received_events_url":"https://api.github.com/users/robmorgan/received_events","type":"User","site_admin":false},"repo":{"id":3055234,"name":"phinx","full_name":"robmorgan/phinx","owner":{"login":"robmorgan","id":178939,"avatar_url":"https://avatars.githubusercontent.com/u/178939?v=3","gravatar_id":"","url":"https://api.github.com/users/robmorgan","html_url":"https://github.com/robmorgan","followers_url":"https://api.github.com/users/robmorgan/followers","following_url":"https://api.github.com/users/robmorgan/following{/other_user}","gists_url":"https://api.github.com/users/robmorgan/gists{/gist_id}","starred_url":"https://api.github.com/users/robmorgan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robmorgan/subscriptions","organizations_url":"https://api.github.com/users/robmorgan/orgs","repos_url":"https://api.github.com/users/robmorgan/repos","events_url":"https://api.github.com/users/robmorgan/events{/privacy}","received_events_url":"https://api.github.com/users/robmorgan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/robmorgan/phinx","description":"PHP Database Migrations for Everyone","fork":false,"url":"https://api.github.com/repos/robmorgan/phinx","forks_url":"https://api.github.com/repos/robmorgan/phinx/forks","keys_url":"https://api.github.com/repos/robmorgan/phinx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/robmorgan/phinx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/robmorgan/phinx/teams","hooks_url":"https://api.github.com/repos/robmorgan/phinx/hooks","issue_events_url":"https://api.github.com/repos/robmorgan/phinx/issues/events{/number}","events_url":"https://api.github.com/repos/robmorgan/phinx/events","assignees_url":"https://api.github.com/repos/robmorgan/phinx/assignees{/user}","branches_url":"https://api.github.com/repos/robmorgan/phinx/branches{/branch}","tags_url":"https://api.github.com/repos/robmorgan/phinx/tags","blobs_url":"https://api.github.com/repos/robmorgan/phinx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/robmorgan/phinx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/robmorgan/phinx/git/refs{/sha}","trees_url":"https://api.github.com/repos/robmorgan/phinx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/robmorgan/phinx/statuses/{sha}","languages_url":"https://api.github.com/repos/robmorgan/phinx/languages","stargazers_url":"https://api.github.com/repos/robmorgan/phinx/stargazers","contributors_url":"https://api.github.com/repos/robmorgan/phinx/contributors","subscribers_url":"https://api.github.com/repos/robmorgan/phinx/subscribers","subscription_url":"https://api.github.com/repos/robmorgan/phinx/subscription","commits_url":"https://api.github.com/repos/robmorgan/phinx/commits{/sha}","git_commits_url":"https://api.github.com/repos/robmorgan/phinx/git/commits{/sha}","comments_url":"https://api.github.com/repos/robmorgan/phinx/comments{/number}","issue_comment_url":"https://api.github.com/repos/robmorgan/phinx/issues/comments/{number}","contents_url":"https://api.github.com/repos/robmorgan/phinx/contents/{+path}","compare_url":"https://api.github.com/repos/robmorgan/phinx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/robmorgan/phinx/merges","archive_url":"https://api.github.com/repos/robmorgan/phinx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/robmorgan/phinx/downloads","issues_url":"https://api.github.com/repos/robmorgan/phinx/issues{/number}","pulls_url":"https://api.github.com/repos/robmorgan/phinx/pulls{/number}","milestones_url":"https://api.github.com/repos/robmorgan/phinx/milestones{/number}","notifications_url":"https://api.github.com/repos/robmorgan/phinx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/robmorgan/phinx/labels{/name}","releases_url":"https://api.github.com/repos/robmorgan/phinx/releases{/id}","created_at":"2011-12-27T06:49:45Z","updated_at":"2015-01-10T12:38:43Z","pushed_at":"2015-01-10T00:53:36Z","git_url":"git://github.com/robmorgan/phinx.git","ssh_url":"git@github.com:robmorgan/phinx.git","clone_url":"https://github.com/robmorgan/phinx.git","svn_url":"https://github.com/robmorgan/phinx","homepage":"https://phinx.org","size":6314,"stargazers_count":1151,"watchers_count":1151,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":259,"mirror_url":null,"open_issues_count":105,"forks":259,"open_issues":105,"watchers":1151,"default_branch":"0.4.x-dev"}},"_links":{"self":{"href":"https://api.github.com/repos/robmorgan/phinx/pulls/444"},"html":{"href":"https://github.com/robmorgan/phinx/pull/444"},"issue":{"href":"https://api.github.com/repos/robmorgan/phinx/issues/444"},"comments":{"href":"https://api.github.com/repos/robmorgan/phinx/issues/444/comments"},"review_comments":{"href":"https://api.github.com/repos/robmorgan/phinx/pulls/444/comments"},"review_comment":{"href":"https://api.github.com/repos/robmorgan/phinx/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/robmorgan/phinx/pulls/444/commits"},"statuses":{"href":"https://api.github.com/repos/robmorgan/phinx/statuses/616042b05b36f65e2d72e476803716f27966b7e6"}}}}