{"action":"opened","issue":{"url":"https://api.github.com/repos/dddinphp/ddd-in-php-book-issues/issues/30","repository_url":"https://api.github.com/repos/dddinphp/ddd-in-php-book-issues","labels_url":"https://api.github.com/repos/dddinphp/ddd-in-php-book-issues/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/dddinphp/ddd-in-php-book-issues/issues/30/comments","events_url":"https://api.github.com/repos/dddinphp/ddd-in-php-book-issues/issues/30/events","html_url":"https://github.com/dddinphp/ddd-in-php-book-issues/issues/30","id":141534308,"number":30,"title":"Typo","user":{"login":"hub20xx","id":16416438,"avatar_url":"https://avatars.githubusercontent.com/u/16416438?v=3","gravatar_id":"","url":"https://api.github.com/users/hub20xx","html_url":"https://github.com/hub20xx","followers_url":"https://api.github.com/users/hub20xx/followers","following_url":"https://api.github.com/users/hub20xx/following{/other_user}","gists_url":"https://api.github.com/users/hub20xx/gists{/gist_id}","starred_url":"https://api.github.com/users/hub20xx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hub20xx/subscriptions","organizations_url":"https://api.github.com/users/hub20xx/orgs","repos_url":"https://api.github.com/users/hub20xx/repos","events_url":"https://api.github.com/users/hub20xx/events{/privacy}","received_events_url":"https://api.github.com/users/hub20xx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-17T10:01:05Z","updated_at":"2016-03-17T10:01:05Z","closed_at":null,"body":"Page 12 (version 2016-02-09):\r\n\r\nin `PostRepository`, use of `$db` instead of `$this->db`:\r\n\r\n```\r\npublic static function add(Post $post)\r\n{\r\n  $this->db->beginTransaction();\r\n\r\n  try {\r\n    $stm = $db->prepare(\r\n      'INSERT INTO posts (title, content) VALUES (?, ?)'\r\n    );\r\n\r\n  $stm->exec([\r\n    $post->getTitle(),\r\n    $post->getContent(),\r\n  ]);\r\n\r\n  $db->commit();\r\n\r\n  } catch (Exception $e) {\r\n    $db->rollback();\r\n```"}}