Skip to content

Conversation

Koc
Copy link
Contributor

@Koc Koc commented Mar 27, 2017

Another one small step to reduce boilerplate when using the bundle.

TODO:

  • update documentation

@Koc Koc changed the title [WIP] Create embeddable entity for storing common file information Create embeddable entity for storing common file information Mar 28, 2017
@Koc
Copy link
Contributor Author

Koc commented Mar 28, 2017

@garak ready

Entity/File.php Outdated
*/
protected $size;

public function getName()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about some phpdoc here? And on other methods, too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add phpdocs with param/return types, but I haven't see any profit from method descriptions like Sets the original file name. It clear from method name what it do :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I push it further: what about type-hinting setters? With default null values, of course

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, I wasn't suggesting to add descriptions, just @param and @return

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@garak done

Entity/File.php Outdated
*/
protected $size;

public function getName()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I push it further: what about type-hinting setters? With default null values, of course

Entity/File.php Outdated
*/
protected $size;

public function getName()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, I wasn't suggesting to add descriptions, just @param and @return

@garak garak merged commit 9fdcc61 into dustin10:master Apr 10, 2017
@Koc
Copy link
Contributor Author

Koc commented Apr 10, 2017

@garak yes, I'l do it later when other codebase will be moved to scalar type hints. Currently we are using this bundle on php 5.5.9 🤣

@Koc Koc deleted the embeddable branch April 15, 2017 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants