Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat.: Write Opengraph from Json #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Feat.: Write Opengraph from Json #9

wants to merge 1 commit into from

Conversation

brunomp
Copy link

@brunomp brunomp commented Jan 25, 2019

Hello,

I created a function that makes an Opengraph from a Json. I did not do the Unity Test because I do not know how to use Atoum.

I needed this function because I saved in the database the Json returned from getArrayCopy() and I need to restore the object afterwards.

What do you think?
Thank you.

@euskadi31
Copy link
Owner

I think it would be better to modify the constructor to take an array as an optional argument.

src/Opengraph/Writer.php

    public function __construct($properties = [])
    {
        parent::__construct();

        if(!empty($properties)) {
           //....
        }
    }

For unit test, we can change to phpunit if it suits you.

@euskadi31
Copy link
Owner

@brunomp see: #10

@euskadi31
Copy link
Owner

I release after merge your PR :)

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