Skip to content

Commit

Permalink
php-cs-fixer style changes - big commit :-)
Browse files Browse the repository at this point in the history
  • Loading branch information
alanhartless committed Sep 30, 2016
1 parent f76affa commit 1d5535b
Show file tree
Hide file tree
Showing 1,755 changed files with 49,598 additions and 50,612 deletions.
2 changes: 1 addition & 1 deletion app/AppCache.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once __DIR__ . '/AppKernel.php';
require_once __DIR__.'/AppKernel.php';

use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;

Expand Down
45 changes: 21 additions & 24 deletions app/AppKernel.php
Original file line number Diff line number Diff line change
@@ -1,49 +1,48 @@
<?php
/**
* @package Mautic
* @copyright 2014 Mautic Contributors. All rights reserved.
* @copyright 2014 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/

use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\HttpKernel\Config\EnvParametersResource;
use Symfony\Component\HttpKernel\DependencyInjection;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\Kernel;

/**
* Mautic Application Kernel
* Mautic Application Kernel.
*/
class AppKernel extends Kernel
{

/**
* Major version number
* Major version number.
*
* @const integer
*/
const MAJOR_VERSION = 2;

/**
* Minor version number
* Minor version number.
*
* @const integer
*/
const MINOR_VERSION = 1;

/**
* Patch version number
* Patch version number.
*
* @const integer
*/
const PATCH_VERSION = 2;

/**
* Extra version identifier
* Extra version identifier.
*
* This constant is used to define additional version segments such as development
* or beta status.
Expand Down Expand Up @@ -81,7 +80,6 @@ public function __construct($environment, $debug)
*/
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{

if (strpos($request->getRequestUri(), 'installer') !== false || !$this->isInstalled()) {
define('MAUTIC_INSTALLER', 1);
}
Expand All @@ -91,7 +89,7 @@ public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQ
if (strpos($uri, 'installer') === false) {
$base = $request->getBaseUrl();
//check to see if the .htaccess file exists or if not running under apache
if ((strpos(strtolower($_SERVER["SERVER_SOFTWARE"]), 'apache') === false
if ((strpos(strtolower($_SERVER['SERVER_SOFTWARE']), 'apache') === false
|| !file_exists(__DIR__.'../.htaccess')
&& strpos(
$base,
Expand All @@ -106,7 +104,6 @@ public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQ
}

if (false === $this->booted) {

$this->boot();
}

Expand All @@ -121,7 +118,7 @@ public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQ
$this->getContainer()->get('translator')->trans(
'mautic.core.db.connection.error',
[
'%code%' => $e->getCode()
'%code%' => $e->getCode(),
]
)
);
Expand Down Expand Up @@ -176,7 +173,7 @@ public function registerBundles()
new Mautic\SmsBundle\MauticSmsBundle(),
new Mautic\StageBundle\MauticStageBundle(),
new Mautic\UserBundle\MauticUserBundle(),
new Mautic\WebhookBundle\MauticWebhookBundle()
new Mautic\WebhookBundle\MauticWebhookBundle(),
];

//dynamically register Mautic Plugin Bundles
Expand Down Expand Up @@ -229,14 +226,13 @@ public function registerBundles()
public function boot()
{
if (true === $this->booted) {

return;
}

if (!defined('MAUTIC_TABLE_PREFIX')) {
//set the table prefix before boot
$localParams = $this->getLocalParams();
$prefix = isset($localParams['db_table_prefix']) ? $localParams['db_table_prefix'] : '';
$prefix = isset($localParams['db_table_prefix']) ? $localParams['db_table_prefix'] : '';
define('MAUTIC_TABLE_PREFIX', $prefix);
}

Expand Down Expand Up @@ -270,7 +266,7 @@ public function boot()
}

/**
* Returns a list of addon bundles that are enabled
* Returns a list of addon bundles that are enabled.
*
* @return array
*/
Expand All @@ -288,7 +284,7 @@ public function registerContainerConfiguration(LoaderInterface $loader)
}

/**
* Retrieves the application's version number
* Retrieves the application's version number.
*
* @return string
*/
Expand All @@ -298,7 +294,7 @@ public function getVersion()
}

/**
* Checks if the application has been installed
* Checks if the application has been installed.
*
* @return bool
*/
Expand All @@ -318,6 +314,7 @@ private function isInstalled()
* @param array $params
*
* @return \Doctrine\DBAL\Connection
*
* @throws Exception
* @throws \Doctrine\DBAL\DBALException
*/
Expand Down Expand Up @@ -382,7 +379,7 @@ public function getLogDir()
}

/**
* Get Mautic's local configuration file
* Get Mautic's local configuration file.
*
* @return array
*/
Expand Down Expand Up @@ -421,7 +418,7 @@ public function getLocalParams()
}

/**
* Get local config file
* Get local config file.
*
* @param bool $checkExists If true, then return false if the file doesn't exist
*
Expand All @@ -444,7 +441,7 @@ public function getLocalConfigFile($checkExists = true)
}

/**
* Get the container file name or path
* Get the container file name or path.
*
* @param bool|true $fullPath
*
Expand Down
6 changes: 3 additions & 3 deletions app/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
require_once __DIR__.'/bootstrap.php.cache';
}

use Doctrine\Common\Annotations\AnnotationRegistry;
use Composer\Autoload\ClassLoader;
use Doctrine\Common\Annotations\AnnotationRegistry;

/**
* @var ClassLoader $loader
* @var ClassLoader
*/
$loader = require __DIR__.'/../vendor/autoload.php';

AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
AnnotationRegistry::registerLoader([$loader, 'loadClass']);

return $loader;
9 changes: 5 additions & 4 deletions app/bundles/ApiBundle/ApiEvents.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<?php
/**
* @package Mautic
* @copyright 2014 Mautic Contributors. All rights reserved.
* @copyright 2014 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/

namespace Mautic\ApiBundle;

/**
* Class ApiEvents
* Class ApiEvents.
*/
final class ApiEvents
{
Expand Down Expand Up @@ -42,7 +43,7 @@ final class ApiEvents
const CLIENT_POST_DELETE = 'mautic.client_post_delete';

/**
* The mautic.build_api_route event is thrown to build Mautic API routes
* The mautic.build_api_route event is thrown to build Mautic API routes.
*
* The event listener receives a Mautic\CoreBundle\Event\RouteEvent instance.
*
Expand Down
Loading

0 comments on commit 1d5535b

Please sign in to comment.