Minor - format code

pull/3346/head
Julio Montoya 5 years ago
parent 6750da2577
commit 291d6e3c10
  1. 2
      README.md
  2. 2
      src/CoreBundle/Controller/CreateResourceNodeFileAction.php
  3. 1
      src/CoreBundle/Entity/AbstractResource.php
  4. 1
      src/CoreBundle/Entity/Listener/ResourceListener.php
  5. 2
      src/CoreBundle/Entity/ResourceLink.php
  6. 2
      src/CoreBundle/Entity/ResourceNode.php
  7. 2
      src/CoreBundle/Security/HTTPExceptionListener.php

@ -31,7 +31,7 @@ chmod -R 777 .
Then enter the main/install/index.php and follow the UI instructions (database, admin user settings, etc).
After the web install process, change the permissions back to a reasonnably safe state:
After the web install process, change the permissions back to a reasonably safe state:
~~~~
chmod -R 755 .
chown -R www-data: public/ var/

@ -51,7 +51,7 @@ class CreateResourceNodeFileAction
if ($request->request->has('resourceLinkList')) {
$links = $request->get('resourceLinkList');
if (strpos($links, '[') === false) {
if (false === strpos($links, '[')) {
$links = json_decode('['.$links.']', true);
} else {
$links = json_decode($links, true);

@ -9,7 +9,6 @@ use ApiPlatform\Core\Annotation\ApiSubresource;
use Doctrine\Common\Collections\Criteria;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Annotation\MaxDepth;
use Symfony\Component\Validator\Constraints as Assert;
/**

@ -157,7 +157,6 @@ class ResourceListener
fwrite($handle, $content);
$meta = stream_get_meta_data($handle);
$uploadedFile = new UploadedFile($meta['uri'], $title, 'text/html', null, true);
}
// File upload

@ -48,14 +48,12 @@ class ResourceLink
protected $session;
/**
*
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\User")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=true)
*/
protected $user;
/**
*
* @ORM\ManyToOne(targetEntity="Chamilo\CourseBundle\Entity\CGroupInfo")
* @ORM\JoinColumn(name="group_id", referencedColumnName="iid", nullable=true, onDelete="CASCADE")
*/

@ -5,7 +5,6 @@
namespace Chamilo\CoreBundle\Entity;
use ApiPlatform\Core\Annotation\ApiFilter;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Core\Annotation\ApiSubresource;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\OrderFilter;
@ -78,6 +77,7 @@ class ResourceNode
/**
* @ApiSubresource()
*
* @var ResourceLink[]
*
* @ORM\OneToMany(targetEntity="ResourceLink", mappedBy="resourceNode", cascade={"persist", "remove"})

@ -13,7 +13,7 @@ final class HTTPExceptionListener
public function onKernelException(ExceptionEvent $event): void
{
$exception = $event->getThrowable();
if (! ($exception instanceof HttpException) || strpos($event->getRequest()->getRequestUri(), '/api/') === false) {
if (!($exception instanceof HttpException) || false === strpos($event->getRequest()->getRequestUri(), '/api/')) {
return;
}

Loading…
Cancel
Save