{"action":"created","issue":{"url":"https://api.github.com/repos/FriendsOfCake/awesome-cakephp/issues/181","repository_url":"https://api.github.com/repos/FriendsOfCake/awesome-cakephp","labels_url":"https://api.github.com/repos/FriendsOfCake/awesome-cakephp/issues/181/labels{/name}","comments_url":"https://api.github.com/repos/FriendsOfCake/awesome-cakephp/issues/181/comments","events_url":"https://api.github.com/repos/FriendsOfCake/awesome-cakephp/issues/181/events","html_url":"https://github.com/FriendsOfCake/awesome-cakephp/pull/181","id":131698895,"number":181,"title":"Added RelatedContent plugin","user":{"login":"aiphee","id":6242394,"avatar_url":"https://avatars.githubusercontent.com/u/6242394?v=3","gravatar_id":"","url":"https://api.github.com/users/aiphee","html_url":"https://github.com/aiphee","followers_url":"https://api.github.com/users/aiphee/followers","following_url":"https://api.github.com/users/aiphee/following{/other_user}","gists_url":"https://api.github.com/users/aiphee/gists{/gist_id}","starred_url":"https://api.github.com/users/aiphee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aiphee/subscriptions","organizations_url":"https://api.github.com/users/aiphee/orgs","repos_url":"https://api.github.com/users/aiphee/repos","events_url":"https://api.github.com/users/aiphee/events{/privacy}","received_events_url":"https://api.github.com/users/aiphee/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/FriendsOfCake/awesome-cakephp/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-05T17:13:41Z","updated_at":"2016-02-09T14:33:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/FriendsOfCake/awesome-cakephp/pulls/181","html_url":"https://github.com/FriendsOfCake/awesome-cakephp/pull/181","diff_url":"https://github.com/FriendsOfCake/awesome-cakephp/pull/181.diff","patch_url":"https://github.com/FriendsOfCake/awesome-cakephp/pull/181.patch"},"body":"I created this plugin for managing related content.\r\nIt probably needs someone to test it first, since i'm the only one using it. \r\n\r\nI'm also not sure how do i write tests for behavior.\r\n\r\nExamples of usage:\r\n- Article has \"read more\" for other article\r\n-  News has \"read more\" for other news or pages\r\n- Article has related galleries\r\n\r\nPlugin has two parts, one part is caching, and the second uses the cache.\r\n\r\nIt is my first plugin for PHP framework ever, so i embrace constructive criticism."},"comment":{"url":"https://api.github.com/repos/FriendsOfCake/awesome-cakephp/issues/comments/181890671","html_url":"https://github.com/FriendsOfCake/awesome-cakephp/pull/181#issuecomment-181890671","issue_url":"https://api.github.com/repos/FriendsOfCake/awesome-cakephp/issues/181","id":181890671,"user":{"login":"aiphee","id":6242394,"avatar_url":"https://avatars.githubusercontent.com/u/6242394?v=3","gravatar_id":"","url":"https://api.github.com/users/aiphee","html_url":"https://github.com/aiphee","followers_url":"https://api.github.com/users/aiphee/followers","following_url":"https://api.github.com/users/aiphee/following{/other_user}","gists_url":"https://api.github.com/users/aiphee/gists{/gist_id}","starred_url":"https://api.github.com/users/aiphee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aiphee/subscriptions","organizations_url":"https://api.github.com/users/aiphee/orgs","repos_url":"https://api.github.com/users/aiphee/repos","events_url":"https://api.github.com/users/aiphee/events{/privacy}","received_events_url":"https://api.github.com/users/aiphee/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T14:33:28Z","updated_at":"2016-02-09T14:33:28Z","body":"I fixed some PSR2R errors but i cant get through these errors: \r\n```\r\n 42 | ERROR | [x] Double space found\r\n 60 | ERROR | [x] Table => \\Cake\\ORM\\Table\r\n- // -\r\n```\r\n\r\nI dont have to align `=` in assigns if necessery (i cant disable it since same rule also checks for mixed tabs and spaces. But i no idea how should i write this `/** @var Table $table */`, it is autocomplete helper for IDE.\r\n\r\nI tried to write tests with Fixtures, but i really need different input from method `getAttachedTables`, i even tried to make it non-static, but cant mock it anyway.\r\nThat method fetches Table files and searches in text if they have `InRelatedIndex` behavior, so when i test it, it naturally return nothing, while i need it to return my Fixture tables."}}