1
0
mirror of https://github.com/ToxicCrack/PrintABrick.git synced 2025-05-21 06:30:10 -07:00

Fix coding style with php-cs-fixer

This commit is contained in:
David Hübner 2017-01-17 12:18:45 +01:00
parent 3ede847697
commit 39f69d2110
27 changed files with 108 additions and 135 deletions

View File

@ -23,7 +23,7 @@ class Brickset extends \SoapClient
/** /**
* @var array The defined classes * @var array The defined classes
*/ */
private static $classmap = array( private static $classmap = [
'sets' => Set::class, 'sets' => Set::class,
'additionalImages' => AdditionalImage::class, 'additionalImages' => AdditionalImage::class,
'instructions' => Instructions::class, 'instructions' => Instructions::class,
@ -31,14 +31,14 @@ class Brickset extends \SoapClient
'themes' => Theme::class, 'themes' => Theme::class,
'subthemes' => Subtheme::class, 'subthemes' => Subtheme::class,
'years' => Year::class, 'years' => Year::class,
); ];
/** /**
* @param string $apikey Brickset API key * @param string $apikey Brickset API key
* @param array $options A array of config values * @param array $options A array of config values
* @param string $wsdl The wsdl file to use * @param string $wsdl The wsdl file to use
*/ */
public function __construct($apikey, $wsdl = null, array $options = array()) public function __construct($apikey, $wsdl = null, array $options = [])
{ {
$this->apiKey = $apikey; $this->apiKey = $apikey;
@ -238,11 +238,10 @@ class Brickset extends \SoapClient
return false; return false;
} elseif (strpos($response, 'ERROR:') === 0) { } elseif (strpos($response, 'ERROR:') === 0) {
return false; return false;
} else {
$this->userHash = $response;
return true;
} }
$this->userHash = $response;
return true;
} }
/** /**

View File

@ -57,7 +57,7 @@ class Review
/** /**
* Review constructor. * Review constructor.
*/ */
function __construct() public function __construct()
{ {
} }
@ -88,12 +88,11 @@ class Review
{ {
if ($this->datePosted == null) { if ($this->datePosted == null) {
return null; return null;
} else { }
try { try {
return new \DateTime($this->datePosted); return new \DateTime($this->datePosted);
} catch (\Exception $e) { } catch (\Exception $e) {
return null; return null;
}
} }
} }

View File

@ -848,12 +848,11 @@ class Set
{ {
if ($this->lastUpdated == null) { if ($this->lastUpdated == null) {
return null; return null;
} else { }
try { try {
return new \DateTime($this->lastUpdated); return new \DateTime($this->lastUpdated);
} catch (\Exception $e) { } catch (\Exception $e) {
return null; return null;
}
} }
} }

View File

@ -138,6 +138,7 @@ class Part
{ {
$this->name = $name; $this->name = $name;
} }
/** /**
* @return mixed * @return mixed
*/ */
@ -185,6 +186,7 @@ class Part
{ {
$this->category = $category; $this->category = $category;
} }
/** /**
* @return mixed * @return mixed
*/ */
@ -200,6 +202,7 @@ class Part
{ {
$this->colors = $colors; $this->colors = $colors;
} }
/** /**
* @return mixed * @return mixed
*/ */

View File

@ -11,7 +11,7 @@ class Rebrickable
{ {
const BASE_URI = 'https://rebrickable.com/api/'; const BASE_URI = 'https://rebrickable.com/api/';
const FORMAT = 'json'; const FORMAT = 'json';
/** /**
* @var Client * @var Client
*/ */
@ -21,7 +21,7 @@ class Rebrickable
* @var string * @var string
*/ */
private $apiKey; private $apiKey;
/** /**
* RebrickableAPI constructor. * RebrickableAPI constructor.
*/ */
@ -52,13 +52,12 @@ class Rebrickable
throw new LogicException('Invalid API Key'); throw new LogicException('Invalid API Key');
} elseif ($content === 'NOSET' || $content === 'NOPART') { } elseif ($content === 'NOSET' || $content === 'NOPART') {
return null; return null;
} else {
return $content;
} }
} else {
return $content;
}
//TODO //TODO
throw new LogicException($response->getStatusCode()); throw new LogicException($response->getStatusCode());
}
} catch (ConnectException $e) { } catch (ConnectException $e) {
//TODO //TODO
throw new LogicException($e->getMessage()); throw new LogicException($e->getMessage());

View File

@ -2,11 +2,11 @@
namespace AppBundle\Api\Manager; namespace AppBundle\Api\Manager;
use AppBundle\Api\Client\Rebrickable\Rebrickable; use AppBundle\Api\Client\Rebrickable\Converter\PartPropertyNameConverter;
use AppBundle\Api\Client\Rebrickable\Entity\Color; use AppBundle\Api\Client\Rebrickable\Entity\Color;
use AppBundle\Api\Client\Rebrickable\Entity\Part; use AppBundle\Api\Client\Rebrickable\Entity\Part;
use AppBundle\Api\Client\Rebrickable\Entity\Set; use AppBundle\Api\Client\Rebrickable\Entity\Set;
use AppBundle\Api\Client\Rebrickable\Converter\PartPropertyNameConverter; use AppBundle\Api\Client\Rebrickable\Rebrickable;
use Symfony\Component\Serializer\Encoder\JsonEncoder; use Symfony\Component\Serializer\Encoder\JsonEncoder;
use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer; use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer;
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
@ -33,10 +33,10 @@ class RebrickableManager
private function getSerializer() private function getSerializer()
{ {
$encoders = array(new JsonEncoder()); $encoders = [new JsonEncoder()];
$nameConverter = new PartPropertyNameConverter(); $nameConverter = new PartPropertyNameConverter();
$objectNormalizer = new ObjectNormalizer(null, $nameConverter); $objectNormalizer = new ObjectNormalizer(null, $nameConverter);
$normalizers = array($objectNormalizer, new ArrayDenormalizer()); $normalizers = [$objectNormalizer, new ArrayDenormalizer()];
$serializer = new Serializer($normalizers, $encoders); $serializer = new Serializer($normalizers, $encoders);
return $serializer; return $serializer;

View File

@ -6,7 +6,6 @@ use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Finder\Finder;
class LoadLDrawCommand extends ContainerAwareCommand class LoadLDrawCommand extends ContainerAwareCommand
{ {
@ -15,9 +14,8 @@ class LoadLDrawCommand extends ContainerAwareCommand
$this $this
->setName('app:load:ldraw') ->setName('app:load:ldraw')
->setDescription('Loads LDraw library parts') ->setDescription('Loads LDraw library parts')
->setHelp("This command allows you to..") ->setHelp('This command allows you to..')
->addArgument('ldraw', InputArgument::REQUIRED, 'Path to LDraw library folder') ->addArgument('ldraw', InputArgument::REQUIRED, 'Path to LDraw library folder');
;
} }
protected function execute(InputInterface $input, OutputInterface $output) protected function execute(InputInterface $input, OutputInterface $output)

View File

@ -13,8 +13,7 @@ class LoadRebrickableCommand extends ContainerAwareCommand
$this $this
->setName('app:load:rebrickable') ->setName('app:load:rebrickable')
->setDescription('Loads Rebrickable csv data') ->setDescription('Loads Rebrickable csv data')
->setHelp('This command allows you to..') ->setHelp('This command allows you to..');
;
} }
protected function execute(InputInterface $input, OutputInterface $output) protected function execute(InputInterface $input, OutputInterface $output)

View File

@ -2,8 +2,8 @@
namespace AppBundle\Controller; namespace AppBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
/** /**
* @Route("rebrickable/parts") * @Route("rebrickable/parts")
@ -21,4 +21,4 @@ class PartsController extends Controller
'part' => $part, 'part' => $part,
]); ]);
} }
} }

View File

@ -43,7 +43,7 @@ class SetsController extends Controller
*/ */
public function detailAction(Request $request, $id, $name = null) public function detailAction(Request $request, $id, $name = null)
{ {
$set = $this->get('manager.brickset')->getSetById($id);; $set = $this->get('manager.brickset')->getSetById($id);
$parts = $this->get('sevice.collection')->getSet($set->getNumber().'-'.$set->getNumberVariant())->getParts(); $parts = $this->get('sevice.collection')->getSet($set->getNumber().'-'.$set->getNumberVariant())->getParts();

View File

@ -7,7 +7,7 @@ use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
/** /**
* BuildingKit * BuildingKit.
* *
* @ORM\Table(name="building_kit") * @ORM\Table(name="building_kit")
* @ORM\Entity(repositoryClass="AppBundle\Repository\BuildingKitRepository") * @ORM\Entity(repositoryClass="AppBundle\Repository\BuildingKitRepository")
@ -74,9 +74,8 @@ class BuildingKit
$this->keywords = new ArrayCollection(); $this->keywords = new ArrayCollection();
} }
/** /**
* Get id * Get id.
* *
* @return int * @return int
*/ */
@ -105,9 +104,8 @@ class BuildingKit
return $this; return $this;
} }
/** /**
* Set name * Set name.
* *
* @param string $name * @param string $name
* *
@ -121,7 +119,7 @@ class BuildingKit
} }
/** /**
* Get name * Get name.
* *
* @return string * @return string
*/ */
@ -131,9 +129,9 @@ class BuildingKit
} }
/** /**
* Set year * Set year.
* *
* @param integer $year * @param int $year
* *
* @return BuildingKit * @return BuildingKit
*/ */
@ -145,7 +143,7 @@ class BuildingKit
} }
/** /**
* Get year * Get year.
* *
* @return int * @return int
*/ */
@ -175,7 +173,7 @@ class BuildingKit
} }
/** /**
* Get parts * Get parts.
* *
* @return Collection * @return Collection
*/ */
@ -209,7 +207,7 @@ class BuildingKit
} }
/** /**
* Get keywords * Get keywords.
* *
* @return Collection * @return Collection
*/ */

View File

@ -5,10 +5,9 @@ namespace AppBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Form\CallbackTransformer;
/** /**
* Category * Category.
* *
* @ORM\Table(name="category") * @ORM\Table(name="category")
* @ORM\Entity(repositoryClass="AppBundle\Repository\CategoryRepository") * @ORM\Entity(repositoryClass="AppBundle\Repository\CategoryRepository")
@ -54,9 +53,8 @@ class Category
$this->parts = new ArrayCollection(); $this->parts = new ArrayCollection();
} }
/** /**
* Get id * Get id.
* *
* @return int * @return int
*/ */
@ -66,7 +64,7 @@ class Category
} }
/** /**
* Set name * Set name.
* *
* @param string $name * @param string $name
* *
@ -80,7 +78,7 @@ class Category
} }
/** /**
* Get name * Get name.
* *
* @return string * @return string
*/ */
@ -90,7 +88,7 @@ class Category
} }
/** /**
* Get models * Get models.
* *
* @return ArrayCollection * @return ArrayCollection
*/ */
@ -124,7 +122,7 @@ class Category
} }
/** /**
* Get parts * Get parts.
* *
* @return ArrayCollection * @return ArrayCollection
*/ */

View File

@ -6,7 +6,7 @@ use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
/** /**
* Color * Color.
* *
* @ORM\Table(name="color") * @ORM\Table(name="color")
* @ORM\Entity(repositoryClass="AppBundle\Repository\ColorRepository") * @ORM\Entity(repositoryClass="AppBundle\Repository\ColorRepository")
@ -43,7 +43,7 @@ class Color
private $part_building_kits; private $part_building_kits;
/** /**
* Set id * Set id.
* *
* @var int * @var int
* *
@ -57,7 +57,7 @@ class Color
} }
/** /**
* Get id * Get id.
* *
* @return int * @return int
*/ */
@ -67,7 +67,7 @@ class Color
} }
/** /**
* Set name * Set name.
* *
* @param string $name * @param string $name
* *
@ -81,7 +81,7 @@ class Color
} }
/** /**
* Get name * Get name.
* *
* @return string * @return string
*/ */
@ -91,7 +91,7 @@ class Color
} }
/** /**
* Set rgb * Set rgb.
* *
* @param string $rgb * @param string $rgb
* *
@ -105,7 +105,7 @@ class Color
} }
/** /**
* Get rgb * Get rgb.
* *
* @return string * @return string
*/ */
@ -123,7 +123,6 @@ class Color
} }
/** /**
*
* @param Part_BuildingKit $part_building_kit * @param Part_BuildingKit $part_building_kit
* *
* @return Color * @return Color
@ -148,11 +147,10 @@ class Color
} }
/** /**
* Constructor * Constructor.
*/ */
public function __construct() public function __construct()
{ {
$this->part_building_kits = new \Doctrine\Common\Collections\ArrayCollection(); $this->part_building_kits = new \Doctrine\Common\Collections\ArrayCollection();
} }
} }

View File

@ -6,7 +6,7 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
/** /**
* Keyword * Keyword.
* *
* @ORM\Table(name="keyword") * @ORM\Table(name="keyword")
* @ORM\Entity(repositoryClass="AppBundle\Repository\KeywordRepository") * @ORM\Entity(repositoryClass="AppBundle\Repository\KeywordRepository")
@ -44,9 +44,8 @@ class Keyword
$this->building_kits = new ArrayCollection(); $this->building_kits = new ArrayCollection();
} }
/** /**
* Get id * Get id.
* *
* @return int * @return int
*/ */
@ -56,7 +55,7 @@ class Keyword
} }
/** /**
* Set name * Set name.
* *
* @param string $name * @param string $name
* *
@ -70,7 +69,7 @@ class Keyword
} }
/** /**
* Get name * Get name.
* *
* @return string * @return string
*/ */
@ -110,5 +109,4 @@ class Keyword
return $this; return $this;
} }
} }

View File

@ -6,7 +6,7 @@ use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
/** /**
* Model * Model.
* *
* @ORM\Table(name="model") * @ORM\Table(name="model")
* @ORM\Entity(repositoryClass="AppBundle\Repository\ModelRepository") * @ORM\Entity(repositoryClass="AppBundle\Repository\ModelRepository")
@ -57,9 +57,8 @@ class Model
*/ */
private $category; private $category;
/** /**
* Get id * Get id.
* *
* @return int * @return int
*/ */
@ -69,7 +68,7 @@ class Model
} }
/** /**
* Set number * Set number.
* *
* @param string $number * @param string $number
* *
@ -83,7 +82,7 @@ class Model
} }
/** /**
* Get number * Get number.
* *
* @return string * @return string
*/ */
@ -93,7 +92,7 @@ class Model
} }
/** /**
* Set author * Set author.
* *
* @param string $author * @param string $author
* *
@ -107,7 +106,7 @@ class Model
} }
/** /**
* Get author * Get author.
* *
* @return string * @return string
*/ */
@ -117,7 +116,7 @@ class Model
} }
/** /**
* Set file * Set file.
* *
* @param string $file * @param string $file
* *
@ -131,7 +130,7 @@ class Model
} }
/** /**
* Get file * Get file.
* *
* @return string * @return string
*/ */
@ -141,7 +140,7 @@ class Model
} }
/** /**
* Get parts * Get parts.
* *
* @return Collection * @return Collection
*/ */
@ -175,7 +174,7 @@ class Model
} }
/** /**
* Set category * Set category.
* *
* @param Category $category * @param Category $category
* *
@ -190,7 +189,7 @@ class Model
} }
/** /**
* Get category * Get category.
* *
* @return Category * @return Category
*/ */

View File

@ -2,11 +2,10 @@
namespace AppBundle\Entity; namespace AppBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
/** /**
* Part_BuildingKit * Part_BuildingKit.
* *
* @ORM\Table(name="part__building_kit") * @ORM\Table(name="part__building_kit")
* @ORM\Entity(repositoryClass="AppBundle\Repository\Part_BuildingKitRepository") * @ORM\Entity(repositoryClass="AppBundle\Repository\Part_BuildingKitRepository")
@ -57,9 +56,8 @@ class Part_BuildingKit
*/ */
private $building_kit; private $building_kit;
/** /**
* Get id * Get id.
* *
* @return int * @return int
*/ */
@ -69,9 +67,9 @@ class Part_BuildingKit
} }
/** /**
* Set count * Set count.
* *
* @param integer $count * @param int $count
* *
* @return Part_BuildingKit * @return Part_BuildingKit
*/ */
@ -83,7 +81,7 @@ class Part_BuildingKit
} }
/** /**
* Get count * Get count.
* *
* @return int * @return int
*/ */
@ -93,7 +91,7 @@ class Part_BuildingKit
} }
/** /**
* Set color * Set color.
* *
* @param Color $color * @param Color $color
* *
@ -107,7 +105,7 @@ class Part_BuildingKit
} }
/** /**
* Get color * Get color.
* *
* @return Color * @return Color
*/ */
@ -117,9 +115,9 @@ class Part_BuildingKit
} }
/** /**
* Set type * Set type.
* *
* @param boolean $type * @param bool $type
* *
* @return Part_BuildingKit * @return Part_BuildingKit
*/ */
@ -131,7 +129,7 @@ class Part_BuildingKit
} }
/** /**
* Get type * Get type.
* *
* @return bool * @return bool
*/ */
@ -181,6 +179,4 @@ class Part_BuildingKit
return $this; return $this;
} }
} }

View File

@ -26,36 +26,35 @@ class FilterSetType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options)
{ {
$builder $builder
->add("theme", ChoiceType::class, [ ->add('theme', ChoiceType::class, [
'choices' => $this->bricksetManager->getThemes(), 'choices' => $this->bricksetManager->getThemes(),
'choice_label' => function(Theme $theme = null) { 'choice_label' => function (Theme $theme = null) {
return $theme ? $theme->getTheme().' ('.$theme->getSetCount().')' : ''; return $theme ? $theme->getTheme().' ('.$theme->getSetCount().')' : '';
}, },
'placeholder' => '', 'placeholder' => '',
'required' => false 'required' => false,
]); ]);
$formModifier = function (Form $form, Theme $theme = null) { $formModifier = function (Form $form, Theme $theme = null) {
$subthemes = null === $theme ? [] : $this->bricksetManager->getSubthemesByTheme($theme); $subthemes = null === $theme ? [] : $this->bricksetManager->getSubthemesByTheme($theme);
$years = null === $theme ? [] : $this->bricksetManager->getYearsByTheme($theme); $years = null === $theme ? [] : $this->bricksetManager->getYearsByTheme($theme);
$form->add("subtheme", ChoiceType::class, [ $form->add('subtheme', ChoiceType::class, [
'choices' => $subthemes, 'choices' => $subthemes,
'choice_label' => function(Subtheme $subtheme = null) { 'choice_label' => function (Subtheme $subtheme = null) {
return $subtheme ? $subtheme->getSubtheme() : ''; return $subtheme ? $subtheme->getSubtheme() : '';
}, },
'placeholder' => '', 'placeholder' => '',
'required' => false 'required' => false,
]); ]);
$form->add("years", ChoiceType::class, [ $form->add('years', ChoiceType::class, [
'choices' => $years, 'choices' => $years,
'choice_label' => function(Year $year = null) { 'choice_label' => function (Year $year = null) {
return $year ? $year->getYear() : ''; return $year ? $year->getYear() : '';
}, },
'placeholder' => '', 'placeholder' => '',
'required' => false 'required' => false,
]); ]);
}; };
@ -76,6 +75,6 @@ class FilterSetType extends AbstractType
} }
); );
$builder->add('submit',SubmitType::class); $builder->add('submit', SubmitType::class);
} }
} }

View File

@ -3,13 +3,8 @@
namespace AppBundle\Loader; namespace AppBundle\Loader;
use AppBundle\Entity\Model; use AppBundle\Entity\Model;
use Doctrine\ORM\EntityManager;
use League\Flysystem\Adapter\Local; use League\Flysystem\Adapter\Local;
use League\Flysystem\Adapter\NullAdapter;
use League\Flysystem\FileExistsException;
use League\Flysystem\FileNotFoundException;
use League\Flysystem\Filesystem; use League\Flysystem\Filesystem;
use Oneup\FlysystemBundle\OneupFlysystemBundle;
use Symfony\Component\Asset\Exception\LogicException; use Symfony\Component\Asset\Exception\LogicException;
use Symfony\Component\Console\Helper\ProgressBar; use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Finder\Finder; use Symfony\Component\Finder\Finder;
@ -25,7 +20,7 @@ class LDrawLoader extends Loader
private $ldview; private $ldview;
/** /**
* @var $ldraw Filesystem * @var Filesystem
*/ */
private $ldraw; private $ldraw;
@ -117,7 +112,7 @@ class LDrawLoader extends Loader
$process->run(); $process->run();
if (!$process->isSuccessful() || !$this->dataPath->has(str_replace('.dat','.stl',$file->getFilename()))) { if (!$process->isSuccessful() || !$this->dataPath->has(str_replace('.dat', '.stl', $file->getFilename()))) {
throw new ProcessFailedException($process); //TODO throw new ProcessFailedException($process); //TODO
} }
} }

View File

@ -2,9 +2,7 @@
namespace AppBundle\Loader; namespace AppBundle\Loader;
use Doctrine\ORM\EntityManager; use Doctrine\ORM\EntityManager;
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
class Loader class Loader
@ -16,8 +14,9 @@ class Loader
protected $output; protected $output;
public function setOutput(OutputInterface $output) { public function setOutput(OutputInterface $output)
{
$this->output = $output; $this->output = $output;
$this->output->setDecorated(true); $this->output->setDecorated(true);
} }
} }

View File

@ -3,10 +3,10 @@
namespace AppBundle\Loader; namespace AppBundle\Loader;
use AppBundle\Api\Manager\RebrickableManager; use AppBundle\Api\Manager\RebrickableManager;
use AppBundle\Entity\BuildingKit;
use AppBundle\Entity\Category; use AppBundle\Entity\Category;
use AppBundle\Entity\Color; use AppBundle\Entity\Color;
use AppBundle\Entity\Keyword; use AppBundle\Entity\Keyword;
use AppBundle\Entity\BuildingKit;
use AppBundle\Entity\Part; use AppBundle\Entity\Part;
use AppBundle\Entity\Part_BuildingKit; use AppBundle\Entity\Part_BuildingKit;
use Doctrine\ORM\EntityManager; use Doctrine\ORM\EntityManager;
@ -24,7 +24,7 @@ class RebrickableLoader extends Loader
*/ */
public function __construct($em, $rebrickableManager) public function __construct($em, $rebrickableManager)
{ {
/** /*
* @var $em EntityManager * @var $em EntityManager
* */ * */
$this->em = $em; $this->em = $em;
@ -159,7 +159,6 @@ class RebrickableLoader extends Loader
$this->em->getConnection()->getConfiguration()->setSQLLogger(null); $this->em->getConnection()->getConfiguration()->setSQLLogger(null);
if (($handle = fopen($pieces, 'r')) !== false) { if (($handle = fopen($pieces, 'r')) !== false) {
// create a new progress bar (50 units) // create a new progress bar (50 units)
$progress = new ProgressBar($this->output, intval(exec("wc -l '$pieces'"))); $progress = new ProgressBar($this->output, intval(exec("wc -l '$pieces'")));
$progress->setFormat('very_verbose'); $progress->setFormat('very_verbose');

View File

@ -5,7 +5,7 @@ namespace AppBundle\Repository;
use AppBundle\Entity\Part; use AppBundle\Entity\Part;
/** /**
* BuildingSetRepository * BuildingSetRepository.
* *
* This class was generated by the Doctrine ORM. Add your own custom * This class was generated by the Doctrine ORM. Add your own custom
* repository methods below. * repository methods below.

View File

@ -2,10 +2,8 @@
namespace AppBundle\Repository; namespace AppBundle\Repository;
use AppBundle\Entity\Category;
/** /**
* CategoryRepository * CategoryRepository.
* *
* This class was generated by the Doctrine ORM. Add your own custom * This class was generated by the Doctrine ORM. Add your own custom
* repository methods below. * repository methods below.

View File

@ -3,7 +3,7 @@
namespace AppBundle\Repository; namespace AppBundle\Repository;
/** /**
* ColorRepository * ColorRepository.
* *
* This class was generated by the Doctrine ORM. Add your own custom * This class was generated by the Doctrine ORM. Add your own custom
* repository methods below. * repository methods below.

View File

@ -3,7 +3,7 @@
namespace AppBundle\Repository; namespace AppBundle\Repository;
/** /**
* KeywordRepository * KeywordRepository.
* *
* This class was generated by the Doctrine ORM. Add your own custom * This class was generated by the Doctrine ORM. Add your own custom
* repository methods below. * repository methods below.

View File

@ -3,7 +3,7 @@
namespace AppBundle\Repository; namespace AppBundle\Repository;
/** /**
* ModelRepository * ModelRepository.
* *
* This class was generated by the Doctrine ORM. Add your own custom * This class was generated by the Doctrine ORM. Add your own custom
* repository methods below. * repository methods below.

View File

@ -3,7 +3,7 @@
namespace AppBundle\Repository; namespace AppBundle\Repository;
/** /**
* PartRepository * PartRepository.
* *
* This class was generated by the Doctrine ORM. Add your own custom * This class was generated by the Doctrine ORM. Add your own custom
* repository methods below. * repository methods below.

View File

@ -3,7 +3,7 @@
namespace AppBundle\Repository; namespace AppBundle\Repository;
/** /**
* Part_BuildingKitRepository * Part_BuildingKitRepository.
* *
* This class was generated by the Doctrine ORM. Add your own custom * This class was generated by the Doctrine ORM. Add your own custom
* repository methods below. * repository methods below.