@@ -71,7 +71,7 @@ |
||
| 71 | 71 | */ |
| 72 | 72 | public function __toString() |
| 73 | 73 | { |
| 74 | - return $this->getName() ? : ""; |
|
| 74 | + return $this->getName() ?: ""; |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
@@ -5,13 +5,13 @@ |
||
| 5 | 5 | class MediaExtension extends \Twig_Extension |
| 6 | 6 | { |
| 7 | 7 | |
| 8 | - /** |
|
| 8 | + /** |
|
| 9 | 9 | * |
| 10 | 10 | * @var \Silex\Application |
| 11 | 11 | */ |
| 12 | 12 | private $app; |
| 13 | 13 | |
| 14 | - /** |
|
| 14 | + /** |
|
| 15 | 15 | * |
| 16 | 16 | * @param \Silex\Application $app |
| 17 | 17 | */ |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | |
| 30 | 30 | public function media(\Media\Entity\Media $media) |
| 31 | 31 | { |
| 32 | - $url = "uploads/" . intval($media->getId()/1000) . "/" . $media->getName(); |
|
| 32 | + $url = "uploads/" . intval($media->getId() / 1000) . "/" . $media->getName(); |
|
| 33 | 33 | $base = $this->app['request']->getBasePath(); |
| 34 | 34 | return sprintf("%s/%s", $base, $url); |
| 35 | 35 | } |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | // } |
| 23 | 23 | |
| 24 | 24 | if ($app->offsetExists('form.factory')) { |
| 25 | - $app['form.types'] = $app->share($app->extend('form.types', function ($types) use ($app) { |
|
| 25 | + $app['form.types'] = $app->share($app->extend('form.types', function($types) use ($app) { |
|
| 26 | 26 | $types[] = new Form\Type\MediaType($app); |
| 27 | 27 | return $types; |
| 28 | 28 | })); |