@@ -472,19 +472,19 @@ discard block |
||
472 | 472 | { |
473 | 473 | return null === $this->photo |
474 | 474 | ? null |
475 | - : $this->getUploadRootDir().'/'.$this->photo; |
|
475 | + : $this->getUploadRootDir() . '/' . $this->photo; |
|
476 | 476 | } |
477 | 477 | |
478 | 478 | public function getWebPath() |
479 | 479 | { |
480 | 480 | return null === $this->photo |
481 | 481 | ? null |
482 | - : $this->getUploadDir().'/'.$this->photo; |
|
482 | + : $this->getUploadDir() . '/' . $this->photo; |
|
483 | 483 | } |
484 | 484 | |
485 | 485 | protected function getUploadRootDir() |
486 | 486 | { |
487 | - return __DIR__.'/../../../web/'.$this->getUploadDir(); |
|
487 | + return __DIR__ . '/../../../web/' . $this->getUploadDir(); |
|
488 | 488 | } |
489 | 489 | |
490 | 490 | protected function getUploadDir() |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | { |
501 | 501 | if (null !== $this->getFile()) { |
502 | 502 | $filename = sha1(uniqid(mt_rand(), true)); |
503 | - $this->photo = $filename.'.'.$this->getFile()->guessExtension(); |
|
503 | + $this->photo = $filename . '.' . $this->getFile()->guessExtension(); |
|
504 | 504 | } |
505 | 505 | } |
506 | 506 | |
@@ -517,9 +517,9 @@ discard block |
||
517 | 517 | $this->getFile()->move($this->getUploadRootDir(), $this->photo); |
518 | 518 | |
519 | 519 | if (isset($this->temp)) { |
520 | - unlink($this->getUploadRootDir().'/'.$this->temp); |
|
520 | + unlink($this->getUploadRootDir() . '/' . $this->temp); |
|
521 | 521 | |
522 | - $this->clearCache($this->getUploadDir().'/'.$this->temp); |
|
522 | + $this->clearCache($this->getUploadDir() . '/' . $this->temp); |
|
523 | 523 | |
524 | 524 | $this->temp = null; |
525 | 525 | } |
@@ -481,19 +481,19 @@ discard block |
||
481 | 481 | { |
482 | 482 | return null === $this->picture |
483 | 483 | ? null |
484 | - : $this->getUploadRootDir().'/'.$this->picture; |
|
484 | + : $this->getUploadRootDir() . '/' . $this->picture; |
|
485 | 485 | } |
486 | 486 | |
487 | 487 | public function getWebPath() |
488 | 488 | { |
489 | 489 | return null === $this->picture |
490 | 490 | ? null |
491 | - : $this->getUploadDir().'/'.$this->picture; |
|
491 | + : $this->getUploadDir() . '/' . $this->picture; |
|
492 | 492 | } |
493 | 493 | |
494 | 494 | protected function getUploadRootDir() |
495 | 495 | { |
496 | - return __DIR__.'/../../../web/'.$this->getUploadDir(); |
|
496 | + return __DIR__ . '/../../../web/' . $this->getUploadDir(); |
|
497 | 497 | } |
498 | 498 | |
499 | 499 | protected function getUploadDir() |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | { |
510 | 510 | if (null !== $this->getFile()) { |
511 | 511 | $filename = sha1(uniqid(mt_rand(), true)); |
512 | - $this->picture = $filename.'.'.$this->getFile()->guessExtension(); |
|
512 | + $this->picture = $filename . '.' . $this->getFile()->guessExtension(); |
|
513 | 513 | } |
514 | 514 | } |
515 | 515 | |
@@ -526,9 +526,9 @@ discard block |
||
526 | 526 | $this->getFile()->move($this->getUploadRootDir(), $this->picture); |
527 | 527 | |
528 | 528 | if (isset($this->temp)) { |
529 | - unlink($this->getUploadRootDir().'/'.$this->temp); |
|
529 | + unlink($this->getUploadRootDir() . '/' . $this->temp); |
|
530 | 530 | |
531 | - $this->clearCache($this->getUploadDir().'/'.$this->temp); |
|
531 | + $this->clearCache($this->getUploadDir() . '/' . $this->temp); |
|
532 | 532 | |
533 | 533 | $this->temp = null; |
534 | 534 | } |
@@ -111,7 +111,7 @@ |
||
111 | 111 | if ($action == "edit") { |
112 | 112 | $role = $em->getRepository('AppBundle:Role') |
113 | 113 | ->find($id); |
114 | - $title = 'Edit role id: '.$id; |
|
114 | + $title = 'Edit role id: ' . $id; |
|
115 | 115 | } |
116 | 116 | else { |
117 | 117 | $role = new Role(); |
@@ -112,8 +112,7 @@ |
||
112 | 112 | $role = $em->getRepository('AppBundle:Role') |
113 | 113 | ->find($id); |
114 | 114 | $title = 'Edit role id: '.$id; |
115 | - } |
|
116 | - else { |
|
115 | + } else { |
|
117 | 116 | $role = new Role(); |
118 | 117 | $title = 'Create new role'; |
119 | 118 | } |
@@ -112,7 +112,7 @@ |
||
112 | 112 | $em = $this->getDoctrine()->getManager(); |
113 | 113 | $comment = $em->getRepository('AppBundle:Comment') |
114 | 114 | ->find($id); |
115 | - $title = 'Edit comment id: "'.$id. '" for article "' . $comment->getArticle()->getTitle() . '"'; |
|
115 | + $title = 'Edit comment id: "' . $id . '" for article "' . $comment->getArticle()->getTitle() . '"'; |
|
116 | 116 | |
117 | 117 | $form = $this->createForm(CommentAdminType::class, $comment, [ |
118 | 118 | 'em' => $em, |
@@ -111,7 +111,7 @@ |
||
111 | 111 | if ($action == "edit") { |
112 | 112 | $user = $em->getRepository('AppBundle:User') |
113 | 113 | ->find($id); |
114 | - $title = 'Edit user id: '.$id; |
|
114 | + $title = 'Edit user id: ' . $id; |
|
115 | 115 | } |
116 | 116 | else { |
117 | 117 | $user = new User(); |
@@ -112,8 +112,7 @@ |
||
112 | 112 | $user = $em->getRepository('AppBundle:User') |
113 | 113 | ->find($id); |
114 | 114 | $title = 'Edit user id: '.$id; |
115 | - } |
|
116 | - else { |
|
115 | + } else { |
|
117 | 116 | $user = new User(); |
118 | 117 | $title = 'Create new user'; |
119 | 118 | } |
@@ -64,7 +64,7 @@ |
||
64 | 64 | if ($action == "edit") { |
65 | 65 | $article = $em->getRepository('AppBundle:Article') |
66 | 66 | ->find($id); |
67 | - $title = 'Edit article id: '.$id; |
|
67 | + $title = 'Edit article id: ' . $id; |
|
68 | 68 | } |
69 | 69 | else { |
70 | 70 | $article = new Article(); |
@@ -65,8 +65,7 @@ |
||
65 | 65 | $article = $em->getRepository('AppBundle:Article') |
66 | 66 | ->find($id); |
67 | 67 | $title = 'Edit article id: '.$id; |
68 | - } |
|
69 | - else { |
|
68 | + } else { |
|
70 | 69 | $article = new Article(); |
71 | 70 | $title = 'Create new article'; |
72 | 71 | } |