1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-05 20:57:41 +02:00

Flextype Core and Plugins: Doctrine Coding Standard #200 #186

- next round of code improvements
This commit is contained in:
Awilum
2019-08-02 00:17:23 +03:00
parent ff34ade733
commit eae6ca8daf
16 changed files with 222 additions and 180 deletions

View File

@@ -1,9 +1,8 @@
<?php
declare(strict_types=1);
/**
* @package Flextype
*
* @author Sergey Romanenko <hello@romanenko.digital>
* @link http://romanenko.digital
*
* For the full copyright and license information, please view the LICENSE
@@ -12,6 +11,15 @@
namespace Flextype;
use const DIRECTORY_SEPARATOR;
use const PHP_VERSION;
use function define;
use function getcwd;
use function is_file;
use function sprintf;
use function str_replace;
use function version_compare;
/**
* Define the application minimum supported PHP version.
*/
@@ -25,17 +33,19 @@ define('ROOT_DIR', str_replace(DIRECTORY_SEPARATOR, '/', getcwd()));
/**
* Define the PATH (without trailing slash).
*/
define('PATH', ['site' => ROOT_DIR . '/site',
'plugins' => ROOT_DIR . '/site/plugins',
'themes' => ROOT_DIR . '/site/themes',
'entries' => ROOT_DIR . '/site/entries',
'snippets' => ROOT_DIR . '/site/snippets',
'fieldsets' => ROOT_DIR . '/site/fieldsets',
'config' => [
'default' => ROOT_DIR . '/flextype/config',
'site' => ROOT_DIR . '/site/config'
],
'cache' => ROOT_DIR . '/site/cache']);
define('PATH', [
'site' => ROOT_DIR . '/site',
'plugins' => ROOT_DIR . '/site/plugins',
'themes' => ROOT_DIR . '/site/themes',
'entries' => ROOT_DIR . '/site/entries',
'snippets' => ROOT_DIR . '/site/snippets',
'fieldsets' => ROOT_DIR . '/site/fieldsets',
'config' => [
'default' => ROOT_DIR . '/flextype/config',
'site' => ROOT_DIR . '/site/config',
],
'cache' => ROOT_DIR . '/site/cache',
]);
/**
* Check PHP Version
@@ -45,7 +55,7 @@ version_compare($ver = PHP_VERSION, $req = FLEXTYPE_MINIMUM_PHP, '<') and exit(s
/**
* Ensure vendor libraries exist
*/
!is_file($autoload = __DIR__ . '/vendor/autoload.php') and exit("Please run: <i>composer install</i>");
! is_file($autoload = __DIR__ . '/vendor/autoload.php') and exit('Please run: <i>composer install</i>');
/**
* Register The Auto Loader