duck7000 / imdbGraphQLPHP

6 stars 0 forks source link

Re arranging output data from a few methods #13

Closed duck7000 closed 11 months ago

duck7000 commented 11 months ago

I'm going to re arrange the output data from a few methods. Reason is data purity, and there is no more need for array_key_last alternative compatibility for older PHP versions. With some methods i used string append to get all, for example comments, to string. I learned that this is the wrong approach as an array would be much better. The reason i did this in the first place is that i use that data (as in appended string) directly in my program, that is fine in my program but not from a library standpoint. As i'm now maintaining this library for other users too i have to change that to a more common data approach like array's. Most of those methods it is about comments or attributes, the rest is fine.

Not sure about those methods? Director Composer Writer Producer Imdbphp returns attributes as string (everything that is shown on imdb page) just like my version, is that good or shall i split this to array as well? If so $role will be array with arrays for every type of attribute (comments, episodes, etc) i guess? Or all attributes (in order of appearance) will be in array $role?

Soundtrack (already done) Location (already done) companyCredits (already done) this reflects prodCompany(), distCompany(), specialCompany() and otherCompany() Cast (already done)

GeorgeFive commented 11 months ago

I will plead neutral on this topic. I'm completely happy with the way it is set up now, but I would not complain if you changed it either.

duck7000 commented 11 months ago

Okay i will leave it like it is now, it works great and attributes as string is with the mentioned methods fine be me