Cleanup some deprecations
This commit is contained in:
parent
e546d77670
commit
b5f62d7e7e
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,12 +1,6 @@
|
||||
|
||||
###> symfony/framework-bundle ###
|
||||
.env
|
||||
/public/bundles/
|
||||
/var/
|
||||
/vendor/
|
||||
###< symfony/framework-bundle ###
|
||||
|
||||
###> symfony/phpunit-bridge ###
|
||||
.phpunit
|
||||
/phpunit.xml
|
||||
###< symfony/phpunit-bridge ###
|
||||
|
@ -2,7 +2,7 @@
|
||||
"type": "project",
|
||||
"license": "proprietary",
|
||||
"require": {
|
||||
"php": "^7.1.0",
|
||||
"php": "^7.2.0",
|
||||
"doctrine/doctrine-bundle": "^1.6",
|
||||
"doctrine/orm": "^2.5",
|
||||
"sensio/framework-extra-bundle": "^5.1",
|
||||
|
743
composer.lock
generated
743
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -7,12 +7,10 @@ use App\Form\CameraType;
|
||||
use Doctrine\ORM\OptimisticLockException;
|
||||
use Doctrine\ORM\ORMInvalidArgumentException;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
/**
|
||||
* Camera controller.
|
||||
@ -24,8 +22,7 @@ class CameraController extends Controller
|
||||
/**
|
||||
* Lists all camera entities.
|
||||
*
|
||||
* @Route("/", name="camera_index")
|
||||
* @Method("GET")
|
||||
* @Route("/", name="camera_index", methods={"GET"})
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
@ -46,8 +43,7 @@ class CameraController extends Controller
|
||||
/**
|
||||
* Creates a new camera entity.
|
||||
*
|
||||
* @Route("/new", name="camera_new")
|
||||
* @Method({"GET", "POST"})
|
||||
* @Route("/new", name="camera_new", methods={"GET", "POST"})
|
||||
*/
|
||||
public function newAction(Request $request)
|
||||
{
|
||||
@ -72,8 +68,7 @@ class CameraController extends Controller
|
||||
/**
|
||||
* Finds and displays a camera entity.
|
||||
*
|
||||
* @Route("/{id}", name="camera_show")
|
||||
* @Method("GET")
|
||||
* @Route("/{id}", name="camera_show", methods={"GET"})
|
||||
*/
|
||||
public function showAction(Camera $camera)
|
||||
{
|
||||
@ -88,8 +83,7 @@ class CameraController extends Controller
|
||||
/**
|
||||
* Displays a form to edit an existing camera entity.
|
||||
*
|
||||
* @Route("/{id}/edit", name="camera_edit")
|
||||
* @Method({"GET", "POST"})
|
||||
* @Route("/{id}/edit", name="camera_edit", methods={"GET", "POST"})
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function editAction(Request $request, Camera $camera)
|
||||
@ -117,8 +111,7 @@ class CameraController extends Controller
|
||||
/**
|
||||
* Deletes a camera entity.
|
||||
*
|
||||
* @Route("/{id}", name="camera_delete")
|
||||
* @Method("DELETE")
|
||||
* @Route("/{id}", name="camera_delete", methods={"DELETE"})
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function deleteAction(Request $request, Camera $camera)
|
||||
@ -136,8 +129,7 @@ class CameraController extends Controller
|
||||
/**
|
||||
* Moves a camera to the previouslyOwned table
|
||||
*
|
||||
* @Route("/{id}/deacquire", name="camera_deacquire")
|
||||
* @Method("POST")
|
||||
* @Route("/{id}/deacquire", name="camera_deacquire", methods={"POST"})
|
||||
* @param Request $request
|
||||
* @param Camera $camera
|
||||
* @throws \LogicException
|
||||
|
@ -4,8 +4,7 @@ namespace App\Controller;
|
||||
|
||||
use App\Entity\CameraType;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
@ -18,8 +17,7 @@ class CameraTypeController extends Controller
|
||||
/**
|
||||
* Lists all cameraType entities.
|
||||
*
|
||||
* @Route("/", name="camera-type_index")
|
||||
* @Method("GET")
|
||||
* @Route("/", name="camera-type_index", methods={"GET"})
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
@ -37,8 +35,7 @@ class CameraTypeController extends Controller
|
||||
/**
|
||||
* Creates a new cameraType entity.
|
||||
*
|
||||
* @Route("/new", name="camera-type_new")
|
||||
* @Method({"GET", "POST"})
|
||||
* @Route("/new", name="camera-type_new", methods={"GET", "POST"})
|
||||
*/
|
||||
public function newAction(Request $request)
|
||||
{
|
||||
@ -63,8 +60,7 @@ class CameraTypeController extends Controller
|
||||
/**
|
||||
* Finds and displays a cameraType entity.
|
||||
*
|
||||
* @Route("/{id}", name="camera-type_show")
|
||||
* @Method("GET")
|
||||
* @Route("/{id}", name="camera-type_show", methods={"GET"})
|
||||
*/
|
||||
public function showAction(CameraType $cameraType)
|
||||
{
|
||||
@ -79,8 +75,7 @@ class CameraTypeController extends Controller
|
||||
/**
|
||||
* Displays a form to edit an existing cameraType entity.
|
||||
*
|
||||
* @Route("/{id}/edit", name="camera-type_edit")
|
||||
* @Method({"GET", "POST"})
|
||||
* @Route("/{id}/edit", name="camera-type_edit", methods={"GET", "POST"})
|
||||
*/
|
||||
public function editAction(Request $request, CameraType $cameraType)
|
||||
{
|
||||
@ -104,8 +99,7 @@ class CameraTypeController extends Controller
|
||||
/**
|
||||
* Deletes a cameraType entity.
|
||||
*
|
||||
* @Route("/{id}", name="camera-type_delete")
|
||||
* @Method("DELETE")
|
||||
* @Route("/{id}", name="camera-type_delete", methods={"DELETE"})
|
||||
*/
|
||||
public function deleteAction(Request $request, CameraType $cameraType)
|
||||
{
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
class DefaultController extends Controller
|
||||
|
@ -4,15 +4,10 @@ namespace App\Controller;
|
||||
|
||||
use App\Entity\Film;
|
||||
use App\Form\FilmType;
|
||||
use Doctrine\ORM\OptimisticLockException;
|
||||
use Doctrine\ORM\ORMInvalidArgumentException;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
/**
|
||||
* Film controller.
|
||||
@ -24,8 +19,7 @@ class FilmController extends Controller
|
||||
/**
|
||||
* Lists all film entities.
|
||||
*
|
||||
* @Route("/", name="film_index")
|
||||
* @Method("GET")
|
||||
* @Route("/", name="film_index", methods={"GET"})
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
@ -45,8 +39,7 @@ class FilmController extends Controller
|
||||
/**
|
||||
* Creates a new film entity.
|
||||
*
|
||||
* @Route("/new", name="film_new")
|
||||
* @Method({"GET", "POST"})
|
||||
* @Route("/new", name="film_new", methods={"GET", "POST"})
|
||||
*/
|
||||
public function newAction(Request $request)
|
||||
{
|
||||
@ -71,8 +64,7 @@ class FilmController extends Controller
|
||||
/**
|
||||
* Finds and displays a film entity.
|
||||
*
|
||||
* @Route("/{id}", name="film_show")
|
||||
* @Method("GET")
|
||||
* @Route("/{id}", name="film_show", methods={"GET"})
|
||||
*/
|
||||
public function showAction(Film $film)
|
||||
{
|
||||
@ -87,8 +79,7 @@ class FilmController extends Controller
|
||||
/**
|
||||
* Displays a form to edit an existing film entity.
|
||||
*
|
||||
* @Route("/{id}/edit", name="film_edit")
|
||||
* @Method({"GET", "POST"})
|
||||
* @Route("/{id}/edit", name="film_edit", methods={"GET", "POST"})
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function editAction(Request $request, Film $film)
|
||||
@ -114,8 +105,7 @@ class FilmController extends Controller
|
||||
/**
|
||||
* Deletes a film entity.
|
||||
*
|
||||
* @Route("/{id}", name="film_delete")
|
||||
* @Method("DELETE")
|
||||
* @Route("/{id}", name="film_delete", methods={"DELETE"})
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function deleteAction(Request $request, Film $film)
|
||||
|
@ -4,8 +4,7 @@ namespace App\Controller;
|
||||
|
||||
use App\Entity\Flash;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
@ -18,8 +17,7 @@ class FlashController extends Controller
|
||||
/**
|
||||
* Lists all flash entities.
|
||||
*
|
||||
* @Route("/", name="flash_index")
|
||||
* @Method("GET")
|
||||
* @Route("/", name="flash_index", methods={"GET"})
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
@ -39,8 +37,7 @@ class FlashController extends Controller
|
||||
/**
|
||||
* Creates a new flash entity.
|
||||
*
|
||||
* @Route("/new", name="flash_new")
|
||||
* @Method({"GET", "POST"})
|
||||
* @Route("/new", name="flash_new", methods={"GET", "POST"})
|
||||
*/
|
||||
public function newAction(Request $request)
|
||||
{
|
||||
@ -65,8 +62,7 @@ class FlashController extends Controller
|
||||
/**
|
||||
* Finds and displays a flash entity.
|
||||
*
|
||||
* @Route("/{id}", name="flash_show")
|
||||
* @Method("GET")
|
||||
* @Route("/{id}", name="flash_show", methods={"GET"})
|
||||
*/
|
||||
public function showAction(Flash $flash)
|
||||
{
|
||||
@ -81,8 +77,7 @@ class FlashController extends Controller
|
||||
/**
|
||||
* Displays a form to edit an existing flash entity.
|
||||
*
|
||||
* @Route("/{id}/edit", name="flash_edit")
|
||||
* @Method({"GET", "POST"})
|
||||
* @Route("/{id}/edit", name="flash_edit", methods={"GET", "POST"})
|
||||
*/
|
||||
public function editAction(Request $request, Flash $flash)
|
||||
{
|
||||
@ -106,8 +101,7 @@ class FlashController extends Controller
|
||||
/**
|
||||
* Deletes a flash entity.
|
||||
*
|
||||
* @Route("/{id}", name="flash_delete")
|
||||
* @Method("DELETE")
|
||||
* @Route("/{id}", name="flash_delete", methods={"DELETE"})
|
||||
*/
|
||||
public function deleteAction(Request $request, Flash $flash)
|
||||
{
|
||||
|
@ -4,8 +4,8 @@ namespace App\Controller;
|
||||
|
||||
use App\Entity\Lenses;
|
||||
use App\Form\LensesType;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\{Method, Route};
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\HttpFoundation\{Request, RedirectResponse};
|
||||
|
||||
@ -19,8 +19,7 @@ class LensesController extends Controller
|
||||
/**
|
||||
* Lists all lens entities.
|
||||
*
|
||||
* @Route("/", name="lens_index")
|
||||
* @Method("GET")
|
||||
* @Route("/", name="lens_index", methods={"GET"})
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
@ -43,8 +42,7 @@ class LensesController extends Controller
|
||||
/**
|
||||
* Creates a new lens entity.
|
||||
*
|
||||
* @Route("/new", name="lens_new")
|
||||
* @Method({"GET", "POST"})
|
||||
* @Route("/new", name="lens_new", methods={"GET", "POST"})
|
||||
*/
|
||||
public function newAction(Request $request)
|
||||
{
|
||||
@ -69,8 +67,7 @@ class LensesController extends Controller
|
||||
/**
|
||||
* Finds and displays a lens entity.
|
||||
*
|
||||
* @Route("/{id}", name="lens_show")
|
||||
* @Method("GET")
|
||||
* @Route("/{id}", name="lens_show", methods={"GET"})
|
||||
*/
|
||||
public function showAction(Lenses $lense)
|
||||
{
|
||||
@ -85,8 +82,7 @@ class LensesController extends Controller
|
||||
/**
|
||||
* Displays a form to edit an existing lens entity.
|
||||
*
|
||||
* @Route("/{id}/edit", name="lens_edit")
|
||||
* @Method({"GET", "POST"})
|
||||
* @Route("/{id}/edit", name="lens_edit", methods={"GET", "POST"})
|
||||
*/
|
||||
public function editAction(Request $request, Lenses $lens)
|
||||
{
|
||||
@ -112,8 +108,7 @@ class LensesController extends Controller
|
||||
/**
|
||||
* Moves a camera to the previouslyOwned table
|
||||
*
|
||||
* @Route("/{id}/deacquire", name="lens_deacquire")
|
||||
* @Method("POST")
|
||||
* @Route("/{id}/deacquire", name="lens_deacquire", methods={"POST"})
|
||||
* @param Request $request
|
||||
* @param Lenses $lens
|
||||
* @return RedirectResponse
|
||||
@ -132,8 +127,7 @@ class LensesController extends Controller
|
||||
/**
|
||||
* Deletes a lens entity.
|
||||
*
|
||||
* @Route("/{id}", name="lens_delete")
|
||||
* @Method("DELETE")
|
||||
* @Route("/{id}", name="lens_delete", methods={"DELETE"})
|
||||
*/
|
||||
public function deleteAction(Request $request, Lenses $lens)
|
||||
{
|
||||
|
@ -4,8 +4,8 @@ namespace App\Controller;
|
||||
|
||||
use App\Entity\PreviouslyOwnedCamera;
|
||||
use App\Form\PreviouslyOwnedCameraType;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\{Method, Route};
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\HttpFoundation\{RedirectResponse, Request};
|
||||
|
||||
@ -19,8 +19,7 @@ class PreviouslyOwnedCameraController extends Controller
|
||||
/**
|
||||
* Lists all previouslyOwnedCamera entities.
|
||||
*
|
||||
* @Route("/", name="previously-owned-camera_index")
|
||||
* @Method("GET")
|
||||
* @Route("/", name="previously-owned-camera_index", methods={"GET"})
|
||||
* @throws \UnexpectedValueException
|
||||
*/
|
||||
public function indexAction()
|
||||
@ -41,8 +40,7 @@ class PreviouslyOwnedCameraController extends Controller
|
||||
/**
|
||||
* Finds and displays a previouslyOwnedCamera entity.
|
||||
*
|
||||
* @Route("/{id}", name="previously-owned-camera_show")
|
||||
* @Method("GET")
|
||||
* @Route("/{id}", name="previously-owned-camera_show", methods={"GET"})
|
||||
*/
|
||||
public function showAction(PreviouslyOwnedCamera $previouslyOwnedCamera)
|
||||
{
|
||||
@ -54,8 +52,7 @@ class PreviouslyOwnedCameraController extends Controller
|
||||
/**
|
||||
* Displays a form to edit an existing previouslyOwnedCamera entity.
|
||||
*
|
||||
* @Route("/{id}/edit", name="previously-owned-camera_edit")
|
||||
* @Method({"GET", "POST"})
|
||||
* @Route("/{id}/edit", name="previously-owned-camera_edit", methods={"GET", "POST"})
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function editAction(Request $request, PreviouslyOwnedCamera $previouslyOwnedCamera)
|
||||
@ -81,8 +78,7 @@ class PreviouslyOwnedCameraController extends Controller
|
||||
/**
|
||||
* Moves a camera to the previouslyOwned table
|
||||
*
|
||||
* @Route("/{id}/reacquire", name="previously-owned-camera_reacquire")
|
||||
* @Method("POST")
|
||||
* @Route("/{id}/reacquire", name="previously-owned-camera_reacquire", methods={"POST"})
|
||||
* @param Request $request
|
||||
* @param PreviouslyOwnedCamera $camera
|
||||
* @throws \LogicException
|
||||
|
@ -4,8 +4,7 @@ namespace App\Controller;
|
||||
|
||||
use App\Entity\PreviouslyOwnedFlash;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
@ -18,8 +17,7 @@ class PreviouslyOwnedFlashController extends Controller
|
||||
/**
|
||||
* Lists all previouslyOwnedFlash entities.
|
||||
*
|
||||
* @Route("/", name="previously-owned-flash_index")
|
||||
* @Method("GET")
|
||||
* @Route("/", name="previously-owned-flash_index", methods={"GET"})
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
@ -38,8 +36,7 @@ class PreviouslyOwnedFlashController extends Controller
|
||||
/**
|
||||
* Creates a new previouslyOwnedFlash entity.
|
||||
*
|
||||
* @Route("/new", name="previously-owned-flash_new")
|
||||
* @Method({"GET", "POST"})
|
||||
* @Route("/new", name="previously-owned-flash_new", methods={"GET", "POST"})
|
||||
*/
|
||||
public function newAction(Request $request)
|
||||
{
|
||||
@ -64,8 +61,7 @@ class PreviouslyOwnedFlashController extends Controller
|
||||
/**
|
||||
* Finds and displays a previouslyOwnedFlash entity.
|
||||
*
|
||||
* @Route("/{id}", name="previously-owned-flash_show")
|
||||
* @Method("GET")
|
||||
* @Route("/{id}", name="previously-owned-flash_show", methods={"GET"})
|
||||
*/
|
||||
public function showAction(PreviouslyOwnedFlash $previouslyOwnedFlash)
|
||||
{
|
||||
@ -77,8 +73,7 @@ class PreviouslyOwnedFlashController extends Controller
|
||||
/**
|
||||
* Displays a form to edit an existing previouslyOwnedFlash entity.
|
||||
*
|
||||
* @Route("/{id}/edit", name="previously-owned-flash_edit")
|
||||
* @Method({"GET", "POST"})
|
||||
* @Route("/{id}/edit", name="previously-owned-flash_edit", methods={"GET", "POST"})
|
||||
*/
|
||||
public function editAction(Request $request, PreviouslyOwnedFlash $previouslyOwnedFlash)
|
||||
{
|
||||
|
@ -4,8 +4,7 @@ namespace App\Controller;
|
||||
|
||||
use App\Entity\PreviouslyOwnedLenses;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
@ -18,8 +17,7 @@ class PreviouslyOwnedLensesController extends Controller
|
||||
/**
|
||||
* Lists all previouslyOwnedLense entities.
|
||||
*
|
||||
* @Route("/", name="previously-owned-lens_index")
|
||||
* @Method("GET")
|
||||
* @Route("/", name="previously-owned-lens_index", methods={"GET"})
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
@ -41,8 +39,7 @@ class PreviouslyOwnedLensesController extends Controller
|
||||
/**
|
||||
* Finds and displays a previouslyOwnedLense entity.
|
||||
*
|
||||
* @Route("/{id}", name="previously-owned-lens_show")
|
||||
* @Method("GET")
|
||||
* @Route("/{id}", name="previously-owned-lens_show", methods={"GET"})
|
||||
*/
|
||||
public function showAction(PreviouslyOwnedLenses $previouslyOwnedLense)
|
||||
{
|
||||
@ -54,8 +51,7 @@ class PreviouslyOwnedLensesController extends Controller
|
||||
/**
|
||||
* Displays a form to edit an existing previouslyOwnedLense entity.
|
||||
*
|
||||
* @Route("/{id}/edit", name="previously-owned-lens_edit")
|
||||
* @Method({"GET", "POST"})
|
||||
* @Route("/{id}/edit", name="previously-owned-lens_edit", methods={"GET", "POST"})
|
||||
*/
|
||||
public function editAction(Request $request, PreviouslyOwnedLenses $previouslyOwnedLense)
|
||||
{
|
||||
|
@ -311,9 +311,9 @@ trait CameraTrait
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getNotes(): ?string
|
||||
public function getNotes(): string
|
||||
{
|
||||
return $this->notes;
|
||||
return $this->notes ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -335,9 +335,9 @@ trait CameraTrait
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSerial(): ?string
|
||||
public function getSerial(): string
|
||||
{
|
||||
return $this->serial;
|
||||
return $this->serial ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
76
src/Entity/FilmFormat.php
Normal file
76
src/Entity/FilmFormat.php
Normal file
@ -0,0 +1,76 @@
|
||||
<?php declare(strict_types = 1);
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Table(name="film_format", schema="camera")
|
||||
* @ORM\Entity
|
||||
*/
|
||||
class FilmFormat {
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="number_id", type="integer")
|
||||
*/
|
||||
private $numberId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="name", type="string")
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getNumberId(): ?int
|
||||
{
|
||||
return $this->numberId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $numberId
|
||||
* @return self
|
||||
*/
|
||||
public function setNumberId(int $numberId): self
|
||||
{
|
||||
$this->numberId = $numberId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @return self
|
||||
*/
|
||||
public function setName(string $name): self
|
||||
{
|
||||
$this->name = $name;
|
||||
return $this;
|
||||
}
|
||||
}
|
@ -361,9 +361,9 @@ trait LensTrait
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSerial()
|
||||
public function getSerial(): string
|
||||
{
|
||||
return $this->serial;
|
||||
return $this->serial ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -373,7 +373,7 @@ trait LensTrait
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setNotes(string $notes): self
|
||||
public function setNotes(?string $notes): self
|
||||
{
|
||||
$this->notes = $notes;
|
||||
|
||||
@ -385,9 +385,9 @@ trait LensTrait
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getNotes(): ?string
|
||||
public function getNotes(): string
|
||||
{
|
||||
return $this->notes;
|
||||
return $this->notes ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -14,8 +14,11 @@ class Kernel extends BaseKernel
|
||||
|
||||
const CONFIG_EXTS = '.{php,xml,yaml,yml}';
|
||||
|
||||
protected $loadClassCache = FALSE;
|
||||
|
||||
public function getCacheDir()
|
||||
{
|
||||
//return '/dev/null';
|
||||
return $this->getProjectDir().'/var/cache/'.$this->environment;
|
||||
}
|
||||
|
||||
|
13
symfony.lock
13
symfony.lock
@ -59,6 +59,9 @@
|
||||
"monolog/monolog": {
|
||||
"version": "1.23.0"
|
||||
},
|
||||
"nikic/php-parser": {
|
||||
"version": "v4.0.0"
|
||||
},
|
||||
"psr/cache": {
|
||||
"version": "1.0.1"
|
||||
},
|
||||
@ -179,14 +182,8 @@
|
||||
"symfony/options-resolver": {
|
||||
"version": "v4.0.0"
|
||||
},
|
||||
"symfony/phpunit-bridge": {
|
||||
"version": "3.3",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "master",
|
||||
"version": "3.3",
|
||||
"ref": "55a81726745b54cc6f8d845f1a094ed7d9ed2e32"
|
||||
}
|
||||
"symfony/polyfill-ctype": {
|
||||
"version": "v1.8.0"
|
||||
},
|
||||
"symfony/polyfill-intl-icu": {
|
||||
"version": "v1.6.0"
|
||||
|
Loading…
Reference in New Issue
Block a user