Ran code through php-cs-fixer

Signed-off-by: Gergely POLONKAI (W00d5t0ck) <polesz@w00d5t0ck.info>
This commit is contained in:
Gergely POLONKAI (W00d5t0ck) 2012-09-01 14:57:41 +02:00
parent d9fe0d8bcf
commit ee187ee044
16 changed files with 46 additions and 20 deletions

View File

@ -54,4 +54,3 @@ class BlogController extends Controller
); );
} }
} }

View File

@ -127,7 +127,6 @@ class BookController extends Controller
*/ */
public function ajaxSetBookCopyBorrowableAction(Book $book, $newValue) public function ajaxSetBookCopyBorrowableAction(Book $book, $newValue)
{ {
error_log($newValue);
$user = $this->get('security.context')->getToken()->getUser(); $user = $this->get('security.context')->getToken()->getUser();
$copies = $book->getUsersCopies($user); $copies = $book->getUsersCopies($user);
$em = $this->getDoctrine()->getEntityManager(); $em = $this->getDoctrine()->getEntityManager();

View File

@ -190,7 +190,7 @@ class ForumController extends Controller
*/ */
public function favouriteTopic($topicGroupSlug, $topicSlug) public function favouriteTopic($topicGroupSlug, $topicSlug)
{ {
$topicGroupRepo = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:ForumTopicGroup'); $topicGroupRepo = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:ForumTopicGroup');
if (null === $topicGroup = $topicGroupRepo->findOneBySlug($topicGroupSlug)) { if (null === $topicGroup = $topicGroupRepo->findOneBySlug($topicGroupSlug)) {
throw $this->createNotFoundException('Ilyen témakör nem létezik!'); throw $this->createNotFoundException('Ilyen témakör nem létezik!');
} }

View File

@ -26,7 +26,7 @@ class NewsController extends Controller
$newsRepo = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:News'); $newsRepo = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:News');
$searchCriteria = array( $searchCriteria = array(
'draft' => false, 'draft' => false,
); );
if ( if (
!is_object($this->get('security.context')->getToken()) !is_object($this->get('security.context')->getToken())
|| !is_object($this->get('security.context')->getToken()->getUser()) || !is_object($this->get('security.context')->getToken()->getUser())

View File

@ -44,13 +44,14 @@ class BlogPost
/** /**
* Set published * Set published
* *
* @param boolean $published * @param boolean $published
* @return BlogPost * @return BlogPost
*/ */
public function setPublished($published) public function setPublished($published)
{ {
// TODO: Check if parameter is boolean! // TODO: Check if parameter is boolean!
$this->published = $published; $this->published = $published;
return $this; return $this;
} }
@ -83,6 +84,7 @@ class BlogPost
public function setGroup(Group $group) public function setGroup(Group $group)
{ {
$this->group = $group; $this->group = $group;
return $this; return $this;
} }
@ -108,13 +110,14 @@ class BlogPost
/** /**
* Set title * Set title
* *
* @param string $title * @param string $title
* @return BlogPost * @return BlogPost
*/ */
public function setTitle($title) public function setTitle($title)
{ {
// TODO: Check if not null nor empty! // TODO: Check if not null nor empty!
$this->title = $title; $this->title = $title;
return $this; return $this;
} }
@ -140,13 +143,14 @@ class BlogPost
/** /**
* Set slug * Set slug
* *
* @param string $slug * @param string $slug
* @return BlogPost * @return BlogPost
*/ */
public function setSlug($slug) public function setSlug($slug)
{ {
// TODO: Check if not null nor empty! // TODO: Check if not null nor empty!
$this->slug = $slug; $this->slug = $slug;
return $this; return $this;
} }
@ -180,6 +184,7 @@ class BlogPost
{ {
// TODO: Check if not null! // TODO: Check if not null!
$this->createdBy = $createdBy; $this->createdBy = $createdBy;
return $this; return $this;
} }
@ -212,6 +217,7 @@ class BlogPost
{ {
// TODO: Check if not null! // TODO: Check if not null!
$this->createdAt = $createdAt; $this->createdAt = $createdAt;
return $this; return $this;
} }
@ -244,6 +250,7 @@ class BlogPost
public function setUpdatedBy(User $updatedBy) public function setUpdatedBy(User $updatedBy)
{ {
$this->updatedBy = $updatedBy; $this->updatedBy = $updatedBy;
return $this; return $this;
} }
@ -276,6 +283,7 @@ class BlogPost
public function setUpdatedAt(\DateTime $updatedAt) public function setUpdatedAt(\DateTime $updatedAt)
{ {
$this->updatedAt = $updatedAt; $this->updatedAt = $updatedAt;
return $this; return $this;
} }
@ -291,7 +299,7 @@ class BlogPost
/** /**
* Set updateReason * Set updateReason
* *
* @param string $updateReason * @param string $updateReason
* @return BlogPost * @return BlogPost
*/ */
public function setUpdateReason($updateReason) public function setUpdateReason($updateReason)
@ -300,6 +308,7 @@ class BlogPost
$updateReason = null; $updateReason = null;
} }
$this->updateReason = $updateReason; $this->updateReason = $updateReason;
return $this; return $this;
} }
@ -325,13 +334,14 @@ class BlogPost
/** /**
* Set content * Set content
* *
* @param string $content * @param string $content
* @return BlogPost * @return BlogPost
*/ */
public function setContent($content) public function setContent($content)
{ {
// TODO: Check if not null nor empty! // TODO: Check if not null nor empty!
$this->content = $content; $this->content = $content;
return $this; return $this;
} }

View File

@ -283,6 +283,7 @@ class Book
{ {
// TODO: Check if parameter is boolean! // TODO: Check if parameter is boolean!
$this->commentable = $commentable; $this->commentable = $commentable;
return $this; return $this;
} }

View File

@ -186,6 +186,8 @@ class ForumTopic
* @var string $title * @var string $title
* *
* @ORM\Column(type="string", length=100, nullable=false) * @ORM\Column(type="string", length=100, nullable=false)
*
* @Assert\NotBlank()
*/ */
protected $title; protected $title;

View File

@ -222,6 +222,7 @@ class News
public function setSticky($sticky) public function setSticky($sticky)
{ {
$this->sticky = $sticky; $this->sticky = $sticky;
return $this; return $this;
} }
@ -255,6 +256,7 @@ class News
{ {
// TODO: Check if parameter is boolean! // TODO: Check if parameter is boolean!
$this->draft = $draft; $this->draft = $draft;
return $this; return $this;
} }
@ -268,4 +270,3 @@ class News
return $this->draft; return $this->draft;
} }
} }

View File

@ -7,4 +7,4 @@
* updatedAt * updatedAt
* updateReason * updateReason
* content * content
*/ */

View File

@ -50,13 +50,14 @@ class UploadNamespace
/** /**
* Set name * Set name
* *
* @param string $name * @param string $name
* @return UploadNamespace * @return UploadNamespace
*/ */
public function setName($name) public function setName($name)
{ {
// TODO: Check if not null! // TODO: Check if not null!
$this->name = $name; $this->name = $name;
return $this; return $this;
} }
@ -82,13 +83,14 @@ class UploadNamespace
/** /**
* Set slug * Set slug
* *
* @param string $slug * @param string $slug
* @return UploadNamespace * @return UploadNamespace
*/ */
public function setSlug($slug) public function setSlug($slug)
{ {
// TODO: Check if not null! // TODO: Check if not null!
$this->slug = $slug; $this->slug = $slug;
return $this; return $this;
} }

View File

@ -57,6 +57,7 @@ class UploadedFile
{ {
// TODO: Check if not null! // TODO: Check if not null!
$this->namespace = $namespace; $this->namespace = $namespace;
return $this; return $this;
} }
@ -76,19 +77,21 @@ class UploadedFile
* @var string $filename * @var string $filename
* *
* @ORM\Column(type="string", length=100, nullable=false) * @ORM\Column(type="string", length=100, nullable=false)
* @Assert\NotBlank()
*/ */
protected $filename; protected $filename;
/** /**
* Set filename * Set filename
* *
* @param string $filename * @param string $filename
* @return UploadedFile * @return UploadedFile
*/ */
public function setFilename($filename) public function setFilename($filename)
{ {
// TODO: Check if not null nor empty! // TODO: Check if not null nor empty!
$this->filename = $filename; $this->filename = $filename;
return $this; return $this;
} }
@ -124,13 +127,14 @@ class UploadedFile
/** /**
* Set mimeType * Set mimeType
* *
* @param string $mimeType * @param string $mimeType
* @return UploadedFile * @return UploadedFile
*/ */
public function setMimeType($mimeType) public function setMimeType($mimeType)
{ {
// TODO: Check if not null nor empty! // TODO: Check if not null nor empty!
$this->mimeType = $mimeType; $this->mimeType = $mimeType;
return $this; return $this;
} }
@ -156,7 +160,7 @@ class UploadedFile
/** /**
* Set description * Set description
* *
* @param string $description * @param string $description
* @return UploadedFile * @return UploadedFile
*/ */
public function setDescription($description) public function setDescription($description)
@ -166,6 +170,7 @@ class UploadedFile
} }
$this->description = $description; $this->description = $description;
return $this; return $this;
} }

View File

@ -480,6 +480,7 @@ class UserData
{ {
// TODO: Check if not null // TODO: Check if not null
$this->favouriteTopics->add($topic); $this->favouriteTopics->add($topic);
return $this; return $this;
} }
@ -493,6 +494,7 @@ class UserData
{ {
// TODO: Check if not null // TODO: Check if not null
$this->favouriteTopics->removeElement($topic); $this->favouriteTopics->removeElement($topic);
return $this; return $this;
} }
@ -536,6 +538,7 @@ class UserData
public function setAvatarImage(UploadedFile $avatarImage) public function setAvatarImage(UploadedFile $avatarImage)
{ {
$this->avatarImage = $avatarImage; $this->avatarImage = $avatarImage;
return $this; return $this;
} }

View File

@ -2,4 +2,4 @@
A könyvek részletes adatait a szerzőre, címre vagy a kiadás évére kattintva A könyvek részletes adatait a szerzőre, címre vagy a kiadás évére kattintva
tudhatod meg. Az ekkor felbukkanó ablakban tudod bejelölni, ha neked is van tudhatod meg. Az ekkor felbukkanó ablakban tudod bejelölni, ha neked is van
egy példányod, vagy ha pl. szeretnél kölcsönkérni egyet. egy példányod, vagy ha pl. szeretnél kölcsönkérni egyet.
<p> <p>

View File

@ -6,4 +6,4 @@
</table> </table>
<button id="new-book-save-button" type="submit">Mentés</button> <button id="new-book-save-button" type="submit">Mentés</button>
</form> </form>
</div> </div>

View File

@ -27,11 +27,13 @@ class HelpUrlExtension extends \Twig_Extension
* "container" = @DI\Inject("service_container") * "container" = @DI\Inject("service_container")
* }) * })
*/ */
public function __construct(ContainerInterface $container) { public function __construct(ContainerInterface $container)
{
$this->container = $container; $this->container = $container;
} }
public function getGlobals() { public function getGlobals()
{
parent::getGlobals(); parent::getGlobals();
$request = $this->container->get('request'); $request = $this->container->get('request');

View File

@ -365,8 +365,10 @@ class User implements UserInterface, AdvancedUserInterface
return true; return true;
} }
$groups->add($group); $groups->add($group);
return true; return true;
}); });
return $groups; return $groups;
} }