Skip to content

Comments

Aded Data Helper and Session Helper#12

Open
ericuldall wants to merge 26 commits intokohana:masterfrom
ericuldall:master
Open

Aded Data Helper and Session Helper#12
ericuldall wants to merge 26 commits intokohana:masterfrom
ericuldall:master

Conversation

@ericuldall
Copy link

These are two objects I find myself using a lot. I feel like the Class Name "Data" might be a bit too generic and would advise an alternate name, nothing came to mind right away.

src/Data.php Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

we should avoid static whenever possible in Ohanzee.

Copy link
Author

Choose a reason for hiding this comment

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

What do you prefer in that instance? const??

Context: I strayed away from 'const' originally because the data would be public, I guess it seems trivial for it not to be in this case.

Copy link
Author

Choose a reason for hiding this comment

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

I also, notice that you are calling local methods using static::method(), do you prefer that to self::method(). Not sure if there's a need for static::method() in a no dependency library since there should be no late static bindings. Unless you foresee users extending these classes in such a way.

Copy link
Author

Choose a reason for hiding this comment

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

replaced static props with constants where possible.

@shadowhand
Copy link
Contributor

It would be really helpful if these new classes came with phpspec tests.

@ericuldall
Copy link
Author

Sounds good to me. I'll get some setup.

@ericuldall
Copy link
Author

Also, just reviewed the psr-2 spec and realized I have some solid changes to make. Should be up to spec in a day or two.

src/Session.php Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

here, the expression already returns boolean, you don't need the ternary at all.

Copy link
Author

Choose a reason for hiding this comment

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

fixing.

@ericuldall
Copy link
Author

I think I've addressed all of your concerns from the last code review. I still need to get on some phpspec tests, though.

@rjd22
Copy link
Contributor

rjd22 commented Nov 18, 2015

@shadowhand it would be possible to merge this and make a ticket for tests.

@shadowhand
Copy link
Contributor

It should be composed of two commits, not 26. And it needs tests.

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.

3 participants