Skip to content

Commit

Permalink
Apply PSR2 no_extra_consecutive_blank_lines php cs fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
shakaran committed Sep 17, 2017
1 parent b734a64 commit 529996f
Show file tree
Hide file tree
Showing 29 changed files with 0 additions and 87 deletions.
9 changes: 0 additions & 9 deletions Command/BuildAssetsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
$assets = $this->partition($this->resolveAll(include($this->resdir . '/config/assets.php')));
$fs = new Filesystem();


foreach($assets['scripts'] as $group => $files) {
$this->processScript($group, $files, $fs, $input, $output);
}
Expand All @@ -78,7 +77,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
foreach($this->findFonts() as $name => $path) {
$fs->copy($path, "$fontsdir/$name");
}

}

protected function findFonts()
Expand All @@ -104,7 +102,6 @@ protected function findFonts()
*/
protected function processScript($name, $files, $fs, $in, $out)
{

$dir = $this->builddir . '/scripts/';
$file = $dir . $this->group2file($name, '.js');

Expand All @@ -119,7 +116,6 @@ protected function processScript($name, $files, $fs, $in, $out)
$command[] = "-o $file";
$command[] = implode(' ', $files);


$proc = new Process(implode(' ', $command));

$out->writeln($proc->getCommandLine());
Expand Down Expand Up @@ -158,7 +154,6 @@ protected function processStyle($name, $files, $fs, $in, $out)
protected function group2file($name, $extension)
{
return str_replace('_', '-', preg_replace('!(_js|_css)$!', '', $name)) . $extension;

}

protected function endsWith($extension, $file)
Expand All @@ -175,9 +170,7 @@ protected function resolveAll($assets)
{
$resolved = array();


foreach ($assets as $name => $inputs) {

if (!isset($resolved[$name])) {
$resolved[$name] = array();
}
Expand Down Expand Up @@ -248,10 +241,8 @@ protected function resolve($groups, $input)
array_push($resolved, $it->getRealPath());
}
}

}

return $resolved;

}
}
13 changes: 0 additions & 13 deletions Command/CompactVendorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ protected function configure() {
}

protected function execute(InputInterface $input, OutputInterface $output) {

$kernel = $this->getContainer()->get('kernel');
/** @var $kernel Kernel */
$helper = $this->getHelperSet()->get('formatter');
Expand All @@ -54,7 +53,6 @@ protected function execute(InputInterface $input, OutputInterface $output) {

$this->copyFonts($input, $output);
$this->copyImages($input, $output);

}

protected function getThemePath($type, InputInterface $input, $kernel) {
Expand All @@ -81,15 +79,12 @@ protected function copyFonts(InputInterface $input, OutputInterface $output) {
$output->writeln($helper->formatSection('Executing', $process->getCommandLine(), 'comment'));
$process->run();


$process = new Process(sprintf('cp -R %s/* %s', $vendors, $target));
$output->writeln($helper->formatSection('Executing', $process->getCommandLine(), 'comment'));
$process->run();

}

protected function copyImages(InputInterface $input, OutputInterface $output) {

$kernel = $this->getContainer()->get('kernel');
/** @var $kernel Kernel */
$helper = $this->getHelperSet()->get('formatter');
Expand All @@ -101,15 +96,12 @@ protected function copyImages(InputInterface $input, OutputInterface $output) {
$output->writeln($helper->formatSection('Executing', $process->getCommandLine(), 'comment'));
$process->run();


$process = new Process(sprintf('cp -R %s/* %s', $vendors, $target));
$output->writeln($helper->formatSection('Executing', $process->getCommandLine(), 'comment'));
$process->run();

}

protected function compressThemeCss(InputInterface $input, OutputInterface $output) {

$kernel = $this->getContainer()->get('kernel');
/** @var $kernel Kernel */
$helper = $this->getHelperSet()->get('formatter');
Expand Down Expand Up @@ -138,7 +130,6 @@ protected function compressThemeCss(InputInterface $input, OutputInterface $outp
$output->write($helper->formatSection('Progress', $buffer, 'info'));
}
});

}

protected function compressThemeJs(InputInterface $input, OutputInterface $output) {
Expand All @@ -151,7 +142,6 @@ protected function compressThemeJs(InputInterface $input, OutputInterface $outpu
$public = dirname(dirname(dirname($vendors))) . '/public';
$script = $public . '/js/theme.min.js';


$files = array(
'bootstrap.js'
,'jquery.icheck.js'
Expand All @@ -169,11 +159,9 @@ protected function compressThemeJs(InputInterface $input, OutputInterface $outpu
$output->write($helper->formatSection('Progress', $buffer, 'info'));
}
});

}

protected function compressVendorJs(OutputInterface $output) {

$kernel = $this->getContainer()->get('kernel');
/** @var $kernel Kernel */
$helper = $this->getHelperSet()->get('formatter');
Expand Down Expand Up @@ -213,6 +201,5 @@ protected function compressVendorJs(OutputInterface $output) {
$output->write($helper->formatSection('Progress', $buffer, 'info'));
}
});

}
}
3 changes: 0 additions & 3 deletions Command/FetchVendorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ protected function configure()

protected function execute(InputInterface $input, OutputInterface $output)
{

$kernel = $this->getContainer()->get('kernel'); /** @var $kernel Kernel */
$res = $kernel->locateResource('@AvanzuAdminThemeBundle/Resources/bower');
$helper = $this->getHelperSet()->get('formatter'); /** @var $helper FormatterHelper */
Expand All @@ -52,8 +51,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
});



// no more pulling/cloning directly from master in favor of a bower installation with specific version constraint

/*
Expand Down
5 changes: 0 additions & 5 deletions Command/InitializeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ protected function getDirectorySetup(ContainerInterface $dic, InputInterface $in
'self' => $self,
'public' => $input->getOption('web-dir')
];

}

/**
Expand All @@ -109,7 +108,6 @@ protected function establishLink($originDir, $targetDir, $expectedMethod)
}

return $method;

}

/**
Expand All @@ -126,7 +124,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
$io = new SymfonyStyle($input, $output);
$this->filesystem = $fs;


if ($input->getOption('relative')) {
$expectedMethod = self::METHOD_RELATIVE_SYMLINK;
$io->text('Trying to install theme assets as <info>relative symbolic links</info>.');
Expand All @@ -138,11 +135,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
$io->text('Installing theme assets as <info>hard copies</info>.');
}


$fs->mkdir($folders->public . '/theme');

foreach (['bootstrap','dist','plugins','documentation', 'starter.html'] as $directory) {

$io->text("installing <info>$directory</info>");

$lnFrom = sprintf('%s/%s', $folders->theme, $directory);
Expand Down
3 changes: 0 additions & 3 deletions Controller/BreadcrumbController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class BreadcrumbController extends Controller
*
*/
public function breadcrumbAction(Request $request, $title = '') {

if (!$this->getDispatcher()->hasListeners(ThemeEvents::THEME_BREADCRUMB)) {
return new Response();
}
Expand All @@ -42,15 +41,13 @@ public function breadcrumbAction(Request $request, $title = '') {
/** @var $active MenuItemInterface */
$list = array();
if($active) {

$list[] = $active;
while(null !== ($item = $active->getActiveChild())) {
$list[] = $item;
$active = $item;
}
}


return $this->render('AvanzuAdminThemeBundle:Breadcrumb:breadcrumb.html.twig', array(
'active' => $list,
'title' => $title
Expand Down
3 changes: 0 additions & 3 deletions Controller/ExceptionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
namespace Avanzu\AdminThemeBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference;

use Symfony\Component\HttpFoundation\Request;

class ExceptionController extends \Symfony\Bundle\TwigBundle\Controller\ExceptionController
Expand All @@ -22,7 +21,6 @@ class ExceptionController extends \Symfony\Bundle\TwigBundle\Controller\Exceptio
*/
protected function findTemplate(Request $request, $format, $code, $debug)
{

if(strpos($request->getPathInfo(), '/admin') !== 0) {
return parent::findTemplate($request, $format, $code, $debug);
}
Expand Down Expand Up @@ -55,6 +53,5 @@ protected function findTemplate(Request $request, $format, $code, $debug)
}

return parent::findTemplate($request, $format, $code, $debug);

}
}
5 changes: 0 additions & 5 deletions Controller/NavbarController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ protected function getDispatcher()

public function notificationsAction($max = 5)
{

if (!$this->getDispatcher()->hasListeners(ThemeEvents::THEME_NOTIFICATIONS)) {
return new Response();
}
Expand All @@ -41,7 +40,6 @@ public function notificationsAction($max = 5)
'total' => $listEvent->getTotal()
)
);

}

/**
Expand All @@ -51,7 +49,6 @@ public function notificationsAction($max = 5)
*/
public function messagesAction($max = 5)
{

if (!$this->getDispatcher()->hasListeners(ThemeEvents::THEME_MESSAGES)) {
return new Response();
}
Expand All @@ -74,7 +71,6 @@ public function messagesAction($max = 5)
*/
public function tasksAction($max = 5)
{

if (!$this->getDispatcher()->hasListeners(ThemeEvents::THEME_TASKS)) {
return new Response();
}
Expand All @@ -94,7 +90,6 @@ public function tasksAction($max = 5)
*/
public function userAction()
{

if (!$this->getDispatcher()->hasListeners(ThemeEvents::THEME_NAVBAR_USER)) {
return new Response();
}
Expand Down
4 changes: 0 additions & 4 deletions Controller/SidebarController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class SidebarController extends Controller
{
public function userPanelAction()
{

if (!$this->getDispatcher()->hasListeners(ThemeEvents::THEME_SIDEBAR_USER)) {
return new Response();
}
Expand All @@ -41,14 +40,11 @@ protected function getDispatcher()

public function searchFormAction()
{


return $this->render('AvanzuAdminThemeBundle:Sidebar:search-form.html.twig', array());
}

public function menuAction(Request $request)
{

if (!$this->getDispatcher()->hasListeners(ThemeEvents::THEME_SIDEBAR_SETUP_MENU)) {
return new Response();
}
Expand Down
3 changes: 0 additions & 3 deletions Controller/WidgetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
class WidgetController extends Controller
{
public function defaultBoxAction() {



}

public function solidBoxAction() {}
Expand Down
4 changes: 0 additions & 4 deletions DependencyInjection/AvanzuAdminThemeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public function load(array $configs, ContainerBuilder $container)

$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
$loader->load('services.xml');

}

/**
Expand Down Expand Up @@ -57,7 +56,6 @@ public function prepend(ContainerBuilder $container)
$config = $this->processConfiguration(new Configuration(), $configs);

if ($config['use_assetic'] && isset($bundles['AsseticBundle'])) {

$assets = include dirname(__FILE__) . '/../Resources/config/assets.php';

$container->prependExtensionConfig(
Expand All @@ -67,10 +65,8 @@ public function prepend(ContainerBuilder $container)
'bundles' => array(
'AvanzuAdminThemeBundle'
)

)
);

}
}
}
1 change: 0 additions & 1 deletion DependencyInjection/Compiler/TwigPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,5 @@ public function process(ContainerBuilder $container)
new Reference('avanzu_admin_theme.context_helper')
)
);

}
}
2 changes: 0 additions & 2 deletions Event/MessageListEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,9 @@ public function getMessages()
*/
public function addMessage(MessageInterface $messageInterface)
{

$this->messages[] = $messageInterface;

return $this;

}

/**
Expand Down
1 change: 0 additions & 1 deletion Event/SidebarMenuEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ public function getRootItem($id)
* @return MenuItemInterface|null
*/
public function getActive() {

foreach($this->getItems() as $item) { /** @var $item MenuItemInterface */
if($item->isActive()) return $item;
}
Expand Down
1 change: 0 additions & 1 deletion Event/ThemeEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,4 @@ class ThemeEvents
const THEME_SIDEBAR_SETUP_KNP_MENU = 'theme.sidebar_setup_knp_menu';

const THEME_SIDEBAR_ACTIVATE_MENU = 'theme.sidebar_activate_menu';

}
2 changes: 0 additions & 2 deletions EventListener/ContextListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public function onRequest(GetResponseEvent $event)
if(false == ($user = $this->getUser())){
return;
}

}

public function getUser()
Expand All @@ -54,6 +53,5 @@ public function getUser()

public function onController(FilterControllerEvent $event)
{

}
}
Loading

0 comments on commit 529996f

Please sign in to comment.