Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Úkol 2 - Aleš Kúdela #23

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

Aleku22
Copy link

@Aleku22 Aleku22 commented Oct 16, 2016

Aleš

if (!$category) {
throw new NotFoundHttpException("Kategorie neexistuje");
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ty ponechané whitespacy, pryč (zde a :30)

}
}

/* public function renderShow($id, $page, $more = null, $order = null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zakomentovaný kód většinou necommitujeme, nebo píšeme proč je zakomentovaný. Za půl roku nebudeš vědět proč tu je :)


$paginator = new PaginatorHelper;
$products = $this->getDoctrine()->getRepository(Product::class)->countByCategory($category);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

odsazení oproti zbytku kódu

$page = $request->query->get('page');

$paginator = new PaginatorHelper;
$products = $this->getDoctrine()->getRepository(Product::class)->countAll();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

odsazení oproti zbytku kódu

return [
"products" => $this->getDoctrine()->getRepository(Product::class)->findBy(
[],
[
"rank" => "desc"
],
21
$paginator->getLength(),
$paginator->getOffset()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

odsazení oproti zbytku kódu

@@ -0,0 +1,256 @@
<?php
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Palec nahoru za použití knihovny odjinud 👍

@vasekboch vasekboch changed the title Paginator Úkol 2 - Aleš Kúdela Oct 16, 2016
')
->setParameter("lft", $category->getLeft())
->setParameter("rgt", $category->getRight());
dump($query->getScalarResult());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zapomenutý debug výstup :)

Copy link
Collaborator

@vasekboch vasekboch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hej za mě úplně v pohodě řešení. Až na čistotu výstupu nemám výhrad. Možná to vypadá jako banalita, ale v tom kódu se po tobě musí vyznat další lidé. A proto je potřeba menší štábní kultura :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants