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)
{
error_log($newValue);
$user = $this->get('security.context')->getToken()->getUser();
$copies = $book->getUsersCopies($user);
$em = $this->getDoctrine()->getEntityManager();

View File

@ -51,6 +51,7 @@ class BlogPost
{
// TODO: Check if parameter is boolean!
$this->published = $published;
return $this;
}
@ -83,6 +84,7 @@ class BlogPost
public function setGroup(Group $group)
{
$this->group = $group;
return $this;
}
@ -115,6 +117,7 @@ class BlogPost
{
// TODO: Check if not null nor empty!
$this->title = $title;
return $this;
}
@ -147,6 +150,7 @@ class BlogPost
{
// TODO: Check if not null nor empty!
$this->slug = $slug;
return $this;
}
@ -180,6 +184,7 @@ class BlogPost
{
// TODO: Check if not null!
$this->createdBy = $createdBy;
return $this;
}
@ -212,6 +217,7 @@ class BlogPost
{
// TODO: Check if not null!
$this->createdAt = $createdAt;
return $this;
}
@ -244,6 +250,7 @@ class BlogPost
public function setUpdatedBy(User $updatedBy)
{
$this->updatedBy = $updatedBy;
return $this;
}
@ -276,6 +283,7 @@ class BlogPost
public function setUpdatedAt(\DateTime $updatedAt)
{
$this->updatedAt = $updatedAt;
return $this;
}
@ -300,6 +308,7 @@ class BlogPost
$updateReason = null;
}
$this->updateReason = $updateReason;
return $this;
}
@ -332,6 +341,7 @@ class BlogPost
{
// TODO: Check if not null nor empty!
$this->content = $content;
return $this;
}

View File

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

View File

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

View File

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

View File

@ -57,6 +57,7 @@ class UploadNamespace
{
// TODO: Check if not null!
$this->name = $name;
return $this;
}
@ -89,6 +90,7 @@ class UploadNamespace
{
// TODO: Check if not null!
$this->slug = $slug;
return $this;
}

View File

@ -57,6 +57,7 @@ class UploadedFile
{
// TODO: Check if not null!
$this->namespace = $namespace;
return $this;
}
@ -76,6 +77,7 @@ class UploadedFile
* @var string $filename
*
* @ORM\Column(type="string", length=100, nullable=false)
* @Assert\NotBlank()
*/
protected $filename;
@ -89,6 +91,7 @@ class UploadedFile
{
// TODO: Check if not null nor empty!
$this->filename = $filename;
return $this;
}
@ -131,6 +134,7 @@ class UploadedFile
{
// TODO: Check if not null nor empty!
$this->mimeType = $mimeType;
return $this;
}
@ -166,6 +170,7 @@ class UploadedFile
}
$this->description = $description;
return $this;
}

View File

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

View File

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

View File

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