diff --git a/src/Skobkin/Bundle/CopyPasteBundle/DataFixtures/ORM/LoadLanguages.php b/src/Skobkin/Bundle/CopyPasteBundle/DataFixtures/ORM/LoadLanguages.php index bb8b8b9..905492e 100644 --- a/src/Skobkin/Bundle/CopyPasteBundle/DataFixtures/ORM/LoadLanguages.php +++ b/src/Skobkin/Bundle/CopyPasteBundle/DataFixtures/ORM/LoadLanguages.php @@ -78,13 +78,13 @@ class LoadLanguages implements FixtureInterface, ContainerAwareInterface foreach ($finder as $file) { $output->writeln($file->getRelativePathname() . ' found. Parsing...'); - include $geshiPath . DIRECTORY_SEPARATOR .$file->getRelativePathname(); + include $geshiPath.DIRECTORY_SEPARATOR.$file->getRelativePathname(); $language = new Language(); $language ->setName($language_data['LANG_NAME']) ->setCode(basename($file->getRelativePathname(), '.php')) - ->setEnabled(true) + ->setIsEnabled(true) ; $output->write('---> "' . $language->getName() . '"'); diff --git a/src/Skobkin/Bundle/CopyPasteBundle/Entity/Language.php b/src/Skobkin/Bundle/CopyPasteBundle/Entity/Language.php index 8eaa8b0..75f3cf9 100644 --- a/src/Skobkin/Bundle/CopyPasteBundle/Entity/Language.php +++ b/src/Skobkin/Bundle/CopyPasteBundle/Entity/Language.php @@ -5,8 +5,6 @@ namespace Skobkin\Bundle\CopyPasteBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** - * Language - * * @ORM\Table(name="languages", indexes={ * @ORM\Index(name="idx_enabled", columns={"is_enabled"}), * @ORM\Index(name="idx_preferred", columns={"is_preferred"}), @@ -53,14 +51,7 @@ class Language */ private $isEnabled; - - - /** - * Get id - * - * @return integer - */ - public function getId() + public function getId(): int { return $this->id; } @@ -70,91 +61,48 @@ class Language return $this->name; } - /** - * Set name - * - * @param string $name - * @return Lang - */ - public function setName($name) + public function setName(string $name): self { $this->name = $name; return $this; } - /** - * Get name - * - * @return string - */ - public function getName() + public function getName(): string { return $this->name; } - /** - * Set code - * - * @param string $code - * @return Lang - */ - public function setCode($code) + public function setCode($code): self { $this->code = $code; return $this; } - /** - * Get code - * - * @return string - */ - public function getCode() + public function getCode(): string { return $this->code; } - /** - * Set isEnabled - * - * @param boolean $isEnabled - * @return Lang - */ - public function setIsEnabled($isEnabled) + public function setIsEnabled($isEnabled): self { $this->isEnabled = $isEnabled; return $this; } - /** - * Get isEnabled - * - * @return boolean - */ - public function getIsEnabled() + public function getIsEnabled(): bool { return $this->isEnabled; } - - /** - * Get isPreferred - * - * @return boolean - */ - function getIsPreferred() + + function getIsPreferred(): bool { return $this->isPreferred; } - /** - * Set isPreferred - * - * @param boolean $isPreferred - */ - function setIsPreferred($isPreferred) + function setIsPreferred(bool $isPreferred): self { $this->isPreferred = $isPreferred;