Commit ee858922 authored by Anthony Gautreau's avatar Anthony Gautreau
Browse files

Initial commit

parents
Loading
Loading
Loading
Loading

.php-cs-fixer.dist.php

0 → 100644
+14 −0
Changes for .php-cs-fixer.dist.php: 14 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php

$finder = (new PhpCsFixer\Finder())
    ->in(__DIR__. '/src')
    ->exclude('var')
    ->exclude('vendor'); 
;

return (new PhpCsFixer\Config())
    ->setRules([
        '@Symfony' => true,
    ])
    ->setFinder($finder)
;

composer.json

0 → 100644
+33 −0
Changes for composer.json: 33 added lines, 0 removed lines.
Original line number Diff line number Diff line
{
    "name": "unicaen-modern/skeleton",
    "type": "symfony-bundle",
    "description": "Bundle API Platform pour Unicaen Skeleton",
    "repositories": [
        {
            "type": "composer",
            "url": "https://gest.unicaen.fr/packagist"
        }
    ],
    "license": "MIT",
    "autoload": {
        "psr-4": {
            "Unicaen\\Skeleton\\": "src/"
        }
    },
    "require": {
        "php": "^8.2",
        "doctrine/orm": "^3.3",
        "api-platform/core": "^4.1"
    },
    "require-dev": {
        "friendsofphp/php-cs-fixer": "^3.75",
        "symfony/maker-bundle": "^1.62"
    },
    "extra": {
        "symfony": {
            "bundle": {
                "Unicaen\\Skeleton\\UnicaenSkeletonBundle": "all"
            }
        }
    }
}

config/services.yaml

0 → 100644
+7 −0
Changes for config/services.yaml: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
services:
  _defaults:
    autowire: true
    autoconfigure: true

  Unicaen\Skeleton\:
    resource: '../src/*'
 No newline at end of file
+57 −0
Changes for src/Entity/Skeleton.php: 57 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php

namespace Unicaen\Skeleton\Entity;

use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\OpenApi\Model\Operation;
use Doctrine\ORM\Mapping as ORM;

#[ORM\Entity]
#[ORM\Table(name: 'unicaen_skeleton')]
#[ApiResource(
    openapi: new Operation(
        tags: ['unicaen_skeleton Skeleton'],
    )
)]
class Skeleton
{
    #[ORM\Id]
    #[ORM\GeneratedValue]
    #[ORM\Column(type: 'integer')]
    private ?int $id = null;

    #[ORM\Column(length: 255)]
    private ?string $code;

    #[ORM\Column(length: 255)]
    private ?string $libelle;

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getCode(): ?string
    {
        return $this->code;
    }

    public function setCode(?string $code): static
    {
        $this->code = $code;

        return $this;
    }

    public function getLibelle(): ?string
    {
        return $this->libelle;
    }

    public function setLibelle(?string $libelle): static
    {
        $this->libelle = $libelle;

        return $this;
    }
}
+9 −0
Changes for src/UnicaenSkeletonBundle.php: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php

namespace Unicaen\Skeleton;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class UnicaenSkeletonBundle extends Bundle
{
}