4
First of all, you really deserve to be commended for following best practices in PHP programming. You really want to learn how to develop websites properly and your effort shows.
The code which you have shown us already looks amazing and you are on the right track. However, there are still a lot of things that you could improve. Let's review some of them.
...
4
This code is rather good if you look at each separate line, but rather bad from the organizational standpoint.
Each separate code snippet is indeed nearly flawless but it's the way they are glued together is wrong. SignUp is, so to say, a "Diety Object" as it's not as omniscient as a God Object, but definitely it does way too much:
connects to a ...
3
First of all, your code looks rock-solid, obvious in what it does and very clean. This is not something that I would expect from someone "new in development". Whoever you learned all this from, you should keep them.
You got all of the major topics of a login system right:
Your code uses parameterized statements for all database access, to protect ...
2
Standards
private function AnalysisVariable(string $varname, $var, array $indents): string
So there are a couple problems here. In the text of your question, you refer to this as AnalVariable. That's a particularly bad name as anal is an English word that is somewhat off-color. Fortunately changed here.
PSR-1 says that method names should be ...
1
The \x{0020} (SPACE) character is already included in \s, you can omit that part.
I prefer to use \p{Cc} over [:cntrl:] for consistency and because I don't like to have nested square braces in a character class.
I expect isAttributeNameValid() to be checking that the whole string contains NO blacklisted characters. If you want to match the entire string ...
1
Initial feedback
This code looks okay, though has quite a bit of room for improvement - see this suggestions below. I like how the short array syntax is used in many places, as well as type hinting of parameters and return types for methods.
Some methods are a bit lengthy and a bit of an eyesore - e.g. the method EvaluateVariable- its more than 100 lines of ...
Only top voted, non community-wiki answers of a minimum length are eligible
Related Tags
php × 4193object-oriented × 643
mysql × 561
security × 385
pdo × 317
performance × 290
mysqli × 238
beginner × 236
laravel × 228
html × 225
mvc × 213
array × 202
php5 × 190
sql × 177
javascript × 172
authentication × 153
design-patterns × 122
validation × 120
wordpress × 113
jquery × 111
ajax × 109
form × 105
session × 95
codeigniter × 95
classes × 89