, , : . KISS, . : . , , , .
, . : , ? . (/).
, ? , , , : . , .
, , , . , , . , , , , . .
Secondly, the quality code is basically the document itself . Say I have to work in your code, I don’t know that including a configuration file really does authentication. I can spend minutes, maybe hours, trying to understand why a session is created when, looking at the code, nothing indicates this.
In your example, I would use something like this:
<?php
include 'config.php';
include 'auth.php';
$environment = getEnvironment($_SERVER);
$config = getConfig($environment);
if (needsAuthentication()) {
$auth = new auth();
$auth->doAuth($config, $_REQUEST);
}