Completed
Push — master ( 2311d5...4dfad4 )
by Rafidison
08:45
created
Event/UploadEvent.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Created by PhpStorm.
4
- * User: Rafidion Michael
5
- * Date: 30/11/2014
6
- * Time: 18:21
7
- */
3
+     * Created by PhpStorm.
4
+     * User: Rafidion Michael
5
+     * Date: 30/11/2014
6
+     * Time: 18:21
7
+     */
8 8
 
9 9
 namespace Mykees\MediaBundle\Event;
10 10
 
Please login to merge, or discard this patch.
Form/Type/MediaShowType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,10 +21,10 @@
 block discarded – undo
21 21
     public function buildForm(FormBuilderInterface $builder, array $options)
22 22
     {
23 23
         $builder
24
-            ->add('name','text',[
24
+            ->add('name', 'text', [
25 25
                 "label"=>"Nom de l'image"
26 26
             ])
27
-            ->add('file','text',[
27
+            ->add('file', 'text', [
28 28
                 "label"=>"Chemin de l'image"
29 29
             ])
30 30
         ;
Please login to merge, or discard this patch.
Form/Type/MediaType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     public function buildForm(FormBuilderInterface $builder, array $options)
16 16
     {
17 17
         $builder
18
-            ->add('fileData','file')
18
+            ->add('fileData', 'file')
19 19
         ;
20 20
     }
21 21
     
Please login to merge, or discard this patch.
Controller/MediasController.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -26,24 +26,24 @@  discard block
 block discarded – undo
26 26
      * @param $editor
27 27
      * @return \Symfony\Component\HttpFoundation\Response
28 28
      */
29
-    public function indexAction( $model, $bundle, $model_id, $editor )
29
+    public function indexAction($model, $bundle, $model_id, $editor)
30 30
     {
31 31
         $params = [
32 32
             'medias'=>$this->get('mk.media.manager')->findMediasByModelAndId($model, $model_id),
33 33
             'entity'=>$this->getManage()->getRepository("$bundle:$model")->find($model_id),
34
-            'mode'=>$editor=='true' ? $editor : null,
35
-            'url'=>$editor == "true" ? ['model'=>$model,'bundle'=>$bundle,'model_id'=>$model_id,'mode'=>'true'] : ['model'=>$model,'bundle'=>$bundle,'model_id'=>$model_id]
34
+            'mode'=>$editor == 'true' ? $editor : null,
35
+            'url'=>$editor == "true" ? ['model'=>$model, 'bundle'=>$bundle, 'model_id'=>$model_id, 'mode'=>'true'] : ['model'=>$model, 'bundle'=>$bundle, 'model_id'=>$model_id]
36 36
         ];
37 37
         $form = $this->createForm(
38 38
             new MediaType(),
39 39
             new Media,
40 40
             [
41
-                'action' => $this->generateUrl('mykees_media_add',$params['url']),
41
+                'action' => $this->generateUrl('mykees_media_add', $params['url']),
42 42
                 'method' => 'POST',
43 43
             ]
44 44
         );
45 45
 
46
-        return $this->render('MykeesMediaBundle:Media:index.html.twig',[
46
+        return $this->render('MykeesMediaBundle:Media:index.html.twig', [
47 47
             'form'=>$form->createView(),
48 48
             'model'=>$model,
49 49
             'bundle'=> $bundle,
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      * @throws \Exception
59 59
      * @return \Symfony\Component\HttpFoundation\Response
60 60
      */
61
-    public function addAction( Request $request )
61
+    public function addAction(Request $request)
62 62
     {
63 63
         $requestArray = [
64 64
             'file'=>$request->files,
@@ -68,24 +68,24 @@  discard block
 block discarded – undo
68 68
         $bundle = $request->get('bundle');
69 69
         $model_id = $request->get('model_id');
70 70
 
71
-        if( $request->isXmlHttpRequest() && $requestArray['file'] )
71
+        if ($request->isXmlHttpRequest() && $requestArray['file'])
72 72
         {
73 73
             //Init Event
74
-            $event = $this->initEvent($requestArray['file'],$model,$model_id);
74
+            $event = $this->initEvent($requestArray['file'], $model, $model_id);
75 75
 
76
-            if($event->getMedia())
76
+            if ($event->getMedia())
77 77
             {
78 78
                 $requestArray['entity'] = $this->getManage()->getRepository("$bundle:$model")->find($model_id);
79 79
 
80 80
 
81
-                return $this->render('MykeesMediaBundle:Media:upload/upload_list.html.twig',[
81
+                return $this->render('MykeesMediaBundle:Media:upload/upload_list.html.twig', [
82 82
                     'params'=>$requestArray,
83 83
                     'media'=>$event->getMedia(),
84 84
                     'model'=>$model,
85 85
                     'bundle'=>$bundle,
86 86
                     'model_id'=>$model_id
87 87
                 ]);
88
-            }else{
88
+            }else {
89 89
                 $response = new Response();
90 90
                 $response->setContent(json_encode(array(
91 91
                     'error'=>"Le format n'est pas valid"
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         }
98 98
     }
99 99
 
100
-    private function initEvent($file,$model,$model_id)
100
+    private function initEvent($file, $model, $model_id)
101 101
     {
102 102
         $event = new UploadEvent();
103 103
         $event->setFile($file);
@@ -120,10 +120,10 @@  discard block
 block discarded – undo
120 120
      * @param Request $request
121 121
      * @return \Symfony\Component\HttpFoundation\RedirectResponse
122 122
      */
123
-    public function thumbAction( $model, $bundle, $model_id, $id, Request $request )
123
+    public function thumbAction($model, $bundle, $model_id, $id, Request $request)
124 124
     {
125
-        $media  = $this->getManage()->getRepository("MykeesMediaBundle:Media")->find($id);
126
-        $entity  = $this->getManage()->getRepository("$bundle:$model")->find($model_id);
125
+        $media = $this->getManage()->getRepository("MykeesMediaBundle:Media")->find($id);
126
+        $entity = $this->getManage()->getRepository("$bundle:$model")->find($model_id);
127 127
         $entity->setThumb($media);
128 128
         $this->getManage()->persist($entity);
129 129
         $this->getManage()->flush();
@@ -138,16 +138,16 @@  discard block
 block discarded – undo
138 138
      * @param Request $request
139 139
      * @return Response
140 140
      */
141
-    public function showAction( $model=null, $id = null, Request $request )
141
+    public function showAction($model = null, $id = null, Request $request)
142 142
     {
143
-        if( !$id )
143
+        if (!$id)
144 144
         {
145 145
             $params = [
146 146
                 'class'=>$request->get('class'),
147 147
                 'alt'=>$request->get('alt')
148 148
             ];
149
-            $params['media'] = $this->getManage()->getRepository('MykeesMediaBundle:Media')->findOneBy(['name'=>$params['alt'],'model'=>$model]);
150
-        }else{
149
+            $params['media'] = $this->getManage()->getRepository('MykeesMediaBundle:Media')->findOneBy(['name'=>$params['alt'], 'model'=>$model]);
150
+        }else {
151 151
             $params = [
152 152
                 'media'=>$this->getManage()->getRepository('MykeesMediaBundle:Media')->find($id),
153 153
                 'class'=>null
@@ -157,18 +157,18 @@  discard block
 block discarded – undo
157 157
             new MediaShowType(),
158 158
             $params['media'],
159 159
             [
160
-                'action' => $this->generateUrl('mykees_media_show',['model'=>$model,'id'=>$id]),
160
+                'action' => $this->generateUrl('mykees_media_show', ['model'=>$model, 'id'=>$id]),
161 161
                 'method' => 'POST',
162 162
             ]
163 163
         );
164
-        if($request->getMethod() == "POST")
164
+        if ($request->getMethod() == "POST")
165 165
         {
166 166
             $media = $request->request->all();
167
-            return $this->render('MykeesMediaBundle:Media:tinymce.html.twig',['media'=>$media]);
167
+            return $this->render('MykeesMediaBundle:Media:tinymce.html.twig', ['media'=>$media]);
168 168
         }
169 169
 
170
-        return $this->render('MykeesMediaBundle:Media:show/show.html.twig',[
171
-            'media'=>$params['media'],'form'=>$form->createView(),'class'=>$params['class'],"model"=>$model
170
+        return $this->render('MykeesMediaBundle:Media:show/show.html.twig', [
171
+            'media'=>$params['media'], 'form'=>$form->createView(), 'class'=>$params['class'], "model"=>$model
172 172
         ]);
173 173
     }
174 174
 
@@ -180,16 +180,16 @@  discard block
 block discarded – undo
180 180
      * @param $id
181 181
      * @return Response
182 182
      */
183
-    public function deleteAction( $model, $bundle, $id )
183
+    public function deleteAction($model, $bundle, $id)
184 184
     {
185
-        if( $id )
185
+        if ($id)
186 186
         {
187 187
             $media = $this->getManage()->getRepository('MykeesMediaBundle:Media')->find($id);
188 188
             $media_manager = $this->get('mk.media.manager');
189
-            $media_manager->unlink($model,$media);
189
+            $media_manager->unlink($model, $media);
190 190
 
191 191
             $model_referer = $this->getManage()->getRepository("$bundle:$model")->find($media->getMediableId());
192
-            if(method_exists($model_referer,'getThumb') && $model_referer->getThumb() !== null && $model_referer->getThumb()->getId() == $media->getId())
192
+            if (method_exists($model_referer, 'getThumb') && $model_referer->getThumb() !== null && $model_referer->getThumb()->getId() == $media->getId())
193 193
             {
194 194
                 $model_referer->setThumb(null);
195 195
             }
Please login to merge, or discard this patch.
Helper/ResizeHelper.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Created by PhpStorm.
4
- * User: tetsu0o
5
- * Date: 29/12/14
6
- * Time: 02:03
7
- */
3
+     * Created by PhpStorm.
4
+     * User: tetsu0o
5
+     * Date: 29/12/14
6
+     * Time: 02:03
7
+     */
8 8
 
9 9
 namespace Mykees\MediaBundle\Helper;
10 10
 
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     public $webroot;
17 17
 
18 18
 
19
-    public function __construct(array $resize_option, $webroot){
19
+    public function __construct(array $resize_option, $webroot) {
20 20
         $this->options = $resize_option;
21 21
         $this->webroot = $webroot.'/img/';
22 22
     }
@@ -24,22 +24,22 @@  discard block
 block discarded – undo
24 24
 
25 25
     public function resize($image)
26 26
     {
27
-        $absolute_path = $this->webroot . $image;
27
+        $absolute_path = $this->webroot.$image;
28 28
         $absolute_info = pathinfo($absolute_path);
29
-        $allowedExtension = ['jpg','JPG','jpeg',"JPEG",'png','PNG','gif','GIF'];
29
+        $allowedExtension = ['jpg', 'JPG', 'jpeg', "JPEG", 'png', 'PNG', 'gif', 'GIF'];
30 30
         $extension = pathinfo($image);
31 31
 
32
-        if(in_array($extension['extension'],$allowedExtension))
32
+        if (in_array($extension['extension'], $allowedExtension))
33 33
         {
34
-            if(!empty($this->options))
34
+            if (!empty($this->options))
35 35
             {
36
-                foreach($this->options['size'] as $k=>$v)
36
+                foreach ($this->options['size'] as $k=>$v)
37 37
                 {
38 38
                     $width = $v['width'];
39 39
                     $height = $v['height'];
40
-                    $dest = $absolute_info['dirname'] . '/' . $absolute_info['filename'] . "_$width" . "x$height" . '.jpg';
40
+                    $dest = $absolute_info['dirname'].'/'.$absolute_info['filename']."_$width"."x$height".'.jpg';
41 41
 
42
-                    if(file_exists($dest))
42
+                    if (file_exists($dest))
43 43
                     {
44 44
                         return false;
45 45
                     }
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
                     $imagine = new \Imagine\Gd\Imagine();
48 48
                     $mode = $this->options['mode'];
49 49
 
50
-                    $imagine->open($absolute_info['dirname'] . '/' . $absolute_info['filename'] . '.jpg')
51
-                        ->thumbnail(new \Imagine\Image\Box($width,$height), !empty($mode) && $mode == 'inset' ? ImageInterface::THUMBNAIL_INSET : ImageInterface::THUMBNAIL_OUTBOUND)
50
+                    $imagine->open($absolute_info['dirname'].'/'.$absolute_info['filename'].'.jpg')
51
+                        ->thumbnail(new \Imagine\Image\Box($width, $height), !empty($mode) && $mode == 'inset' ? ImageInterface::THUMBNAIL_INSET : ImageInterface::THUMBNAIL_OUTBOUND)
52 52
                         ->save($dest);
53 53
                 }
54 54
             }
Please login to merge, or discard this patch.
Repository/MediaRepository.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -23,11 +23,11 @@  discard block
 block discarded – undo
23 23
     {
24 24
         $query = $this->_em->createQueryBuilder()
25 25
             ->select('m')
26
-            ->from($this->_entityName,'m')
26
+            ->from($this->_entityName, 'm')
27 27
             ->where('m.model = :model')
28 28
             ->andWhere('m.modelId = :modelId')
29
-            ->setParameter('model',$model)
30
-            ->setParameter('modelId',$model_id)
29
+            ->setParameter('model', $model)
30
+            ->setParameter('modelId', $model_id)
31 31
             ->getQuery()
32 32
         ;
33 33
         return $query;
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
     {
43 43
         $query = $this->_em->createQueryBuilder()
44 44
             ->select('m')
45
-            ->from($this->_entityName,'m')
45
+            ->from($this->_entityName, 'm')
46 46
             ->where('m.model = :model')
47
-            ->setParameter('model',$model)
47
+            ->setParameter('model', $model)
48 48
             ->getQuery()
49 49
         ;
50 50
         return $query;
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
     {
60 60
         $query = $this->_em->createQueryBuilder()
61 61
             ->select('m')
62
-            ->from($this->_entityName,'m')
62
+            ->from($this->_entityName, 'm')
63 63
             ->where('m.model IN(:model)')
64 64
             ->andWhere('m.modelId IN(:modelId)')
65
-            ->setParameter('model',array_values($model_info['models']))
66
-            ->setParameter('modelId',array_values($model_info['ids']))
65
+            ->setParameter('model', array_values($model_info['models']))
66
+            ->setParameter('modelId', array_values($model_info['ids']))
67 67
             ->getQuery()
68 68
         ;
69 69
         return $query;
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      * @param array $model_info
75 75
      * @return array
76 76
      */
77
-    public function findForArrayModels(array $model_info){
77
+    public function findForArrayModels(array $model_info) {
78 78
         return $this->queryForArray($model_info)
79 79
                     ->getResult();
80 80
     }
Please login to merge, or discard this patch.
Twig/Extension/UploaderExtension.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
     public $generator;
18 18
 
19
-    public function __construct(UrlGeneratorInterface $generator )
19
+    public function __construct(UrlGeneratorInterface $generator)
20 20
     {
21 21
         $this->generator = $generator;
22 22
     }
@@ -40,21 +40,21 @@  discard block
 block discarded – undo
40 40
      * @param $entity
41 41
      * @return string
42 42
      */
43
-    public function iframeUploader(Mediable $entity )
43
+    public function iframeUploader(Mediable $entity)
44 44
     {
45 45
         $model    = Reflection::getClassShortName($entity);
46 46
         $model_id = $entity->getId();
47 47
         $bundle   = Reflection::getShortBundleRepository($entity);
48
-        if($model_id)
48
+        if ($model_id)
49 49
         {
50
-            $url = $this->generator->generate('mykees_media',[
50
+            $url = $this->generator->generate('mykees_media', [
51 51
                 'model' => $model,
52 52
                 'bundle'=> $bundle,
53 53
                 'model_id'=> $model_id
54 54
             ]);
55 55
 
56 56
             return '<iframe src="'.$url.'" style="width:100%;border: none;min-height:100%;" class="iframe-uploader"></iframe>';
57
-        }else{
57
+        }else {
58 58
 
59 59
             return '<h3 style="font-weight: bold;text-align: center;color:#777">The <span style="color:#DD6F6F;border-bottom:2px dashed #777;">ID</span> from your entity <span style="color:#DD6F6F;border-bottom:2px dashed #777;">'.$model.'</span> is required to use the uploader</h3>';
60 60
         }
@@ -65,13 +65,13 @@  discard block
 block discarded – undo
65 65
      * @param $entity
66 66
      * @return
67 67
      */
68
-    public function wysiwygUploader( \Twig_Environment $env, Mediable $entity )
68
+    public function wysiwygUploader(\Twig_Environment $env, Mediable $entity)
69 69
     {
70 70
         $model    = Reflection::getClassShortName($entity);
71 71
         $model_id = $entity->getId();
72 72
         $bundle   = Reflection::getShortBundleRepository($entity);
73 73
 
74
-        return  $env->render('MykeesMediaBundle:Media:editor/tinymce.html.twig',[
74
+        return  $env->render('MykeesMediaBundle:Media:editor/tinymce.html.twig', [
75 75
             'model'=>$model,
76 76
             'model_id'=>$model_id,
77 77
             'bundle'=> $bundle,
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Created by PhpStorm.
4
- * User: Rafidion Michael
5
- * Date: 30/11/2014
6
- * Time: 17:41
7
- */
3
+     * Created by PhpStorm.
4
+     * User: Rafidion Michael
5
+     * Date: 30/11/2014
6
+     * Time: 17:41
7
+     */
8 8
 
9 9
 namespace Mykees\MediaBundle\Twig\Extension;
10 10
 
Please login to merge, or discard this patch.
Twig/Extension/ImageResizeExtension.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Created by PhpStorm.
4
- * User: tetsu0o
5
- * Date: 30/12/14
6
- * Time: 02:47
7
- */
3
+     * Created by PhpStorm.
4
+     * User: tetsu0o
5
+     * Date: 30/12/14
6
+     * Time: 02:47
7
+     */
8 8
 
9 9
 namespace Mykees\MediaBundle\Twig\Extension;
10 10
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@  discard block
 block discarded – undo
27 27
         ];
28 28
     }
29 29
 
30
-    public function getImage($image, $width, $height, $options=[])
30
+    public function getImage($image, $width, $height, $options = [])
31 31
     {
32 32
         $attr = false;
33
-        foreach($options as $k=>$opt)
33
+        foreach ($options as $k=>$opt)
34 34
         {
35
-            if( $k > 1 ){
35
+            if ($k > 1) {
36 36
                 $attr .= ' ';
37 37
             }
38 38
             $attr .= $k.'="'.$opt.'"';
@@ -40,13 +40,13 @@  discard block
 block discarded – undo
40 40
 
41 41
         $webroot = $this->rootDir.'/../web/';
42 42
         $info = pathinfo($image);
43
-        $imageResize = $info['dirname'] . '/' . $info['filename'] . "_$width" . "x$height" . '.jpg';
44
-        $fullPathImageResize = $webroot . $imageResize;
43
+        $imageResize = $info['dirname'].'/'.$info['filename']."_$width"."x$height".'.jpg';
44
+        $fullPathImageResize = $webroot.$imageResize;
45 45
 
46
-        if(file_exists($fullPathImageResize))
46
+        if (file_exists($fullPathImageResize))
47 47
         {
48
-            return '<img src="'. $imageResize .'" '. $attr .'>';
49
-        } else {
48
+            return '<img src="'.$imageResize.'" '.$attr.'>';
49
+        }else {
50 50
             return false;
51 51
         }
52 52
 
Please login to merge, or discard this patch.
Tests/Controller/MediasControllerTest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -32,28 +32,28 @@  discard block
 block discarded – undo
32 32
     public function testListMedias()
33 33
     {
34 34
         $crawler = $this->client->request('GET', '/admin/medias/Post/MvcBlogBundle/1');
35
-        $this->assertEquals(200,$this->client->getResponse()->getStatusCode());
36
-        $this->assertEquals(2,$crawler->filter('.count-tr')->count());
35
+        $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
36
+        $this->assertEquals(2, $crawler->filter('.count-tr')->count());
37 37
 
38 38
 
39 39
         $crawler = $this->client->request('GET', '/admin/medias/Post/MvcBlogBundle/2');
40
-        $this->assertEquals(200,$this->client->getResponse()->getStatusCode());
41
-        $this->assertEquals(1,$crawler->filter('.count-tr')->count());
40
+        $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
41
+        $this->assertEquals(1, $crawler->filter('.count-tr')->count());
42 42
     }
43 43
 
44 44
     public function testFindAllMediasForAModel()
45 45
     {
46
-        $medias  = $this->manager->findMediasByModelAndId('Post',1);
47
-        $this->assertGreaterThan(1,count($medias));
46
+        $medias = $this->manager->findMediasByModelAndId('Post', 1);
47
+        $this->assertGreaterThan(1, count($medias));
48 48
         $this->assertEquals(2, count($medias));
49 49
     }
50 50
 
51 51
     public function testRemoveFile()
52 52
     {
53 53
         $this->client->request('GET', '/admin/medias/delete/Post/MvcBlogBundle/9');
54
-        $this->assertEquals(200,$this->client->getResponse()->getStatusCode());
54
+        $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
55 55
 
56
-        $medias  = $this->manager->findMediasByModelAndId('Post',2);
56
+        $medias = $this->manager->findMediasByModelAndId('Post', 2);
57 57
         $this->assertEquals(0, count($medias));
58 58
     }
59 59
 
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
             ['HTTP_X-Requested-With' => 'XMLHttpRequest']
76 76
         );
77 77
 
78
-        $this->assertEquals(200,$this->client->getResponse()->getStatusCode());
79
-        $medias  = $this->manager->findMediasByModelAndId('Post',13);
78
+        $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
79
+        $medias = $this->manager->findMediasByModelAndId('Post', 13);
80 80
 
81 81
         $this->assertEquals(1, count($medias));
82 82
 
@@ -99,10 +99,10 @@  discard block
 block discarded – undo
99 99
             ['HTTP_X-Requested-With' => 'XMLHttpRequest']
100 100
         );
101 101
 
102
-        $this->assertEquals(500,$this->client->getResponse()->getStatusCode());
102
+        $this->assertEquals(500, $this->client->getResponse()->getStatusCode());
103 103
 
104 104
         $this->manager = $this->container->get('mk.media.manager');
105
-        $medias  = $this->manager->findMediasByModelAndId('Post',17);
105
+        $medias = $this->manager->findMediasByModelAndId('Post', 17);
106 106
         $this->assertEquals(0, count($medias));
107 107
     }
108 108
 
Please login to merge, or discard this patch.