{"action":"created","issue":{"url":"https://api.github.com/repos/BrianDGLS/php-euler-solutions/issues/1","repository_url":"https://api.github.com/repos/BrianDGLS/php-euler-solutions","labels_url":"https://api.github.com/repos/BrianDGLS/php-euler-solutions/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/BrianDGLS/php-euler-solutions/issues/1/comments","events_url":"https://api.github.com/repos/BrianDGLS/php-euler-solutions/issues/1/events","html_url":"https://github.com/BrianDGLS/php-euler-solutions/pull/1","id":183288777,"number":1,"title":"A bit of optimisation and PSR4","user":{"login":"unfunco","id":1716636,"avatar_url":"https://avatars.githubusercontent.com/u/1716636?v=3","gravatar_id":"","url":"https://api.github.com/users/unfunco","html_url":"https://github.com/unfunco","followers_url":"https://api.github.com/users/unfunco/followers","following_url":"https://api.github.com/users/unfunco/following{/other_user}","gists_url":"https://api.github.com/users/unfunco/gists{/gist_id}","starred_url":"https://api.github.com/users/unfunco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unfunco/subscriptions","organizations_url":"https://api.github.com/users/unfunco/orgs","repos_url":"https://api.github.com/users/unfunco/repos","events_url":"https://api.github.com/users/unfunco/events{/privacy}","received_events_url":"https://api.github.com/users/unfunco/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-16T20:16:11Z","updated_at":"2016-10-17T09:19:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/BrianDGLS/php-euler-solutions/pulls/1","html_url":"https://github.com/BrianDGLS/php-euler-solutions/pull/1","diff_url":"https://github.com/BrianDGLS/php-euler-solutions/pull/1.diff","patch_url":"https://github.com/BrianDGLS/php-euler-solutions/pull/1.patch"},"body":"**Warning**: Third bottle of wine.\r\n\r\nThought I'd change one of your classes to work how I might implement it, includes a test (the same one you were using with `var_dump`), memoizes the result so that additional computation is not required, and implements PSR4 so autoloading is made easier.\r\n\r\nYou should just be able to (from inside the project directory):\r\n\r\n```bash\r\n$ composer install # If you don't have composer: https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx\r\n$ vendor/bin/phpunit # and see the test pass\r\n```\r\n\r\nIf you look at the class inside the test folder, the data provider gives two arguments, an upper bounds and an expectation, you can add more to the data provider, an array of arrays to add add additional tests, you can also rename your existing files so that they are automatically loaded via the composer autoloader. Your algorithm works fine, no changes required, I've just added memoization and prevented a primitive from being passed into the constructor.\r\n\r\nIf you know CoffeeScript (since you're a JS guy?) you're welcome to give me a hand on a project I've had lying around here for a while?"},"comment":{"url":"https://api.github.com/repos/BrianDGLS/php-euler-solutions/issues/comments/254155874","html_url":"https://github.com/BrianDGLS/php-euler-solutions/pull/1#issuecomment-254155874","issue_url":"https://api.github.com/repos/BrianDGLS/php-euler-solutions/issues/1","id":254155874,"user":{"login":"BrianDGLS","id":7824734,"avatar_url":"https://avatars.githubusercontent.com/u/7824734?v=3","gravatar_id":"","url":"https://api.github.com/users/BrianDGLS","html_url":"https://github.com/BrianDGLS","followers_url":"https://api.github.com/users/BrianDGLS/followers","following_url":"https://api.github.com/users/BrianDGLS/following{/other_user}","gists_url":"https://api.github.com/users/BrianDGLS/gists{/gist_id}","starred_url":"https://api.github.com/users/BrianDGLS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrianDGLS/subscriptions","organizations_url":"https://api.github.com/users/BrianDGLS/orgs","repos_url":"https://api.github.com/users/BrianDGLS/repos","events_url":"https://api.github.com/users/BrianDGLS/events{/privacy}","received_events_url":"https://api.github.com/users/BrianDGLS/received_events","type":"User","site_admin":false},"created_at":"2016-10-17T09:19:29Z","updated_at":"2016-10-17T09:19:29Z","body":"@unfunco Nice one. It's good to get input from an actual PHP developer. I'll take a look at these later.\r\n\r\nFeel free to message me on slack about the Coffeescript project."}}
{"actor":{"display_login":"BrianDGLS"}}