Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDev committed Jan 8, 2021
1 parent 4d31fac commit 2d0e27c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 22 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/Controller/PageController.php
Expand Up @@ -79,7 +79,7 @@ protected function getView(string $path): string
return $this->app->getView($path, $this->twig);
}

public function showFeed(?string $slug, ?string $host, Request $request)
public function showFeed(?string $slug, ?string $host)
{
$page = $this->getPage($slug, $host);

Expand Down Expand Up @@ -142,7 +142,7 @@ public function showSitemap($_format, ?string $host, Request $request)
);
}

public function showRobotsTxt(?string $host, Request $request)
public function showRobotsTxt(?string $host)
{
$this->setApp($host);

Expand Down
19 changes: 0 additions & 19 deletions packages/core/src/Service/VichUploadPropertyNamer.php
Expand Up @@ -2,30 +2,11 @@

namespace Pushword\Core\Service;

use Symfony\Component\HttpFoundation\File\UploadedFile;
use Vich\UploaderBundle\Mapping\PropertyMapping;

//implements NamerInterface, ConfigurableInterface
class VichUploadPropertyNamer extends \Vich\UploaderBundle\Naming\PropertyNamer
{
/**
* Guess the extension of the given file.
*/
private function getExtension(UploadedFile $file): ?string
{
$originalName = $file->getClientOriginalName();

if ($extension = pathinfo($originalName, PATHINFO_EXTENSION)) {
return strtolower($extension);
}

if ($extension = $file->guessExtension()) {
return strtolower($extension);
}

return null;
}

public function name($object, PropertyMapping $mapping): string
{
return strtolower(parent::name($object, $mapping));
Expand Down
1 change: 0 additions & 1 deletion packages/page-scanner/src/PageScannerService.php
Expand Up @@ -98,7 +98,6 @@ protected function getHtml($liveUri)
return;
} elseif (200 != $response->getStatusCode()) {
$this->addError('error on generating the page ('.$response->getStatusCode().')');
exit;

return;
}
Expand Down

0 comments on commit 2d0e27c

Please sign in to comment.