public function gitattributesAction(Request $request, $repository, $format='svg')
    {
        if ($request->query->get('format') == 'plastic') {
            $format = 'plastic';
        }

        $this->useCase = $this->container->get('use_case_badge_gitattributes');
        $this->imageFactory = $this->container->get('image_factory');


        $badge = $this->useCase->createGitattributesBadge($repository, $format);
        $image = $this->imageFactory->createFromBadge($badge);

        return ResponseFactory::createFromImage($image, 200);
    }
public function gitattributesAction(Request $request, $repository, $format='svg')
    {
        if ($request->query->get('format') == 'plastic') {
            $format = 'plastic';
        }

        $this->useCase = $this->container->get('use_case_badge_gitattributes');
        $this->imageFactory = $this->container->get('image_factory');


        $badge = $this->useCase->createGitattributesBadge($repository, $format);
        $image = $this->imageFactory->createFromBadge($badge);

        return ResponseFactory::createFromImage($image, 200);
    }
public function gitattributesAction ( Request $ request , $ repository , $ format = 'svg' ) { if ( $ request -> query -> get ( 'format' ) == 'plastic' ) { $ format = 'plastic' ; } $ this -> useCase = $ this -> container -> get ( 'use_case_badge_gitattributes' ) ; $ this -> imageFactory = $ this -> container -> get ( 'image_factory' ) ; $ badge = $ this -> useCase -> createGitattributesBadge ( $ repository , $ format ) ; $ image = $ this -> imageFactory -> createFromBadge ( $ badge ) ; return ResponseFactory :: createFromImage ( $ image , 200 ) ; }
.gitattributes action.

@param string $repository repository

@Route("/{repository}/gitattributes",
name="pugx_badge_gitattributes",
requirements={"repository" = "[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+?"}
)
@Method({"GET"})
@Cache(maxage="3600", smaxage="3600", public=true)

@return Response
. gitattributes action .