{"action":"opened","issue":{"url":"https://api.github.com/repos/crysalead/kahlan/issues/30","labels_url":"https://api.github.com/repos/crysalead/kahlan/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/crysalead/kahlan/issues/30/comments","events_url":"https://api.github.com/repos/crysalead/kahlan/issues/30/events","html_url":"https://github.com/crysalead/kahlan/issues/30","id":57738770,"number":30,"title":"[dev] \\plugin\\Stub","user":{"login":"m1ome","id":5213243,"avatar_url":"https://avatars.githubusercontent.com/u/5213243?v=3","gravatar_id":"","url":"https://api.github.com/users/m1ome","html_url":"https://github.com/m1ome","followers_url":"https://api.github.com/users/m1ome/followers","following_url":"https://api.github.com/users/m1ome/following{/other_user}","gists_url":"https://api.github.com/users/m1ome/gists{/gist_id}","starred_url":"https://api.github.com/users/m1ome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m1ome/subscriptions","organizations_url":"https://api.github.com/users/m1ome/orgs","repos_url":"https://api.github.com/users/m1ome/repos","events_url":"https://api.github.com/users/m1ome/events{/privacy}","received_events_url":"https://api.github.com/users/m1ome/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-15T17:51:47Z","updated_at":"2015-02-15T17:51:47Z","closed_at":null,"body":"In `plugin\\Stub.php` we have a function `_generateParameters`. I have a question, there is a lines: https://github.com/crysalead/kahlan/blob/master/src/plugin/Stub.php#L479-L486\r\n\r\n```php\r\n            if ($parameter->isOptional()) {\r\n                if ($parameter->isDefaultValueAvailable()) {\r\n                    $default = var_export($parameter->getDefaultValue(), true);\r\n                } else {\r\n                    $default = 'null';\r\n                }\r\n                $default = ' = ' . preg_replace('/\\s+/', '', $default);\r\n            }\r\n```\r\n\r\nI don't get, hot it could be **optional** and don't have a default value. Opposite situation i can handle, but i don't know any idea when should this line: https://github.com/crysalead/kahlan/blob/master/src/plugin/Stub.php#L483 have been fired."}}