V
V
Vladislav Startsev2016-01-27 16:12:40
PHP
Vladislav Startsev, 2016-01-27 16:12:40

Is it clear to use the class to work with the VKontakte API?

I wrote my own class for working with the VKontakte API, I think it would be too much to write about it on Habré, I decided to share it here first.
Class repository https://github.com/esvlad/VkQuery
The class itself is in the Models/VkQuery.php folder
And the question is, is the description of the class operation clear, and how is the class code itself?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Mikhail Osher, 2016-01-27
@miraage

Sorry, but the code is terrible.
Read about PSR, patterns, DRY/SOLID/KISS.

A
Alexander, 2016-01-27
@Tuborg

Basically, I liked it. Man is not bad, understandable. I guess I'll keep it ;-)

A
Alexander N++, 2016-01-27
@sanchezzzhak

Passing parameters to the constructor is missing
1 In your case, you need to constantly change the code in the class itself to replace the config
2 PSR4 is missing, there is no composer. So for sites on the knee of the rules.
3 Alya goodies like upload a lot of photos, post on the wall, it's better to take it separately to another class. for example, you can call HelperVk
4 a lot of extra body movements with if () {
return
}else{}
like this

if( условие ) {
   return 
}
// тут код else но уже без скобок
return

5 In errors, errors "added" are written with one N, etc.
6 It is better if the method returns true / false
fix a lot of jambs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question