Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ before_script:
- bin/console cache:clear --env=test --no-interaction

script:
# this runs the static code analyzer
- ./vendor/bin/phpstan analyse src tests
# this checks that the source code follows the Symfony Code Syntax rules
- ./vendor/bin/phpcs --ignore=src/migrations src tests
# this checks that the YAML config files contain no syntax errors
Expand Down
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"ext-fileinfo": "*",
"ext-iconv": "*",
"ext-json": "*",
"ext-mbstring": "*",
"ext-pdo": "*",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-fixtures-bundle": "^3.3",
Expand Down Expand Up @@ -47,8 +48,10 @@
"behat/symfony2-extension": "^2.1",
"justinrainbow/json-schema": "^5.2",
"mockery/mockery": "^1.2",
"phpstan/phpstan": "^0.12.31",
"phpunit/phpunit": "^7",
"squizlabs/php_codesniffer": "@stable",
"symfony/browser-kit": "3.4.*",
"symfony/expression-language": "3.4.*",
"symfony/phpunit-bridge": "^5.1"
},
Expand Down
159 changes: 158 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ services:
public: true
class: App\Services\DeckManager
arguments: ["@doctrine.orm.entity_manager", "@deck_validation_helper", "@agenda_helper", "@diff", "@logger"]
reviews:
class: App\Services\Reviews
arguments: ["@doctrine.orm.entity_manager"]
texts:
class: App\Services\Texts
arguments: ["%kernel.root_dir%"]
Expand Down
44 changes: 1 addition & 43 deletions src/Entity/BaseDeck.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,58 +3,16 @@
namespace App\Entity;

use App\Model\SlotCollectionInterface;
use DateTime;
use Doctrine\ORM\Mapping as ORM;

/**
* Base class for both deck and deck-list entities.
*
* @package App\Entity
*
* @todo add setters [ST 2020/05/28]
* @todo Consider making this a trait. [ST 2020/06/25]
*/
abstract class BaseDeck implements CommonDeckInterface
{
/**
* @inheritdoc
*/
public function getId()
{
return $this->id;
}

/**
* @inheritdoc
*/
public function getName()
{
return $this->name;
}

/**
* @inheritdoc
*/
public function getDateCreation()
{
return $this->dateCreation;
}

/**
* @inheritdoc
*/
public function getDateUpdate()
{
return $this->dateUpdate;
}

/**
* @inheritdoc
*/
public function getDescriptionMd()
{
return $this->descriptionMd;
}

/**
* Transforms the given object into an associative array.
* @return array
Expand Down
40 changes: 40 additions & 0 deletions src/Entity/Deck.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ public function __construct()
$this->majorVersion = 0;
}

/**
* @inheritdoc
*/
public function getId()
{
return $this->id;
}

/**
* Set name
*
Expand All @@ -187,6 +195,14 @@ public function setName($name)
return $this;
}

/**
* @inheritdoc
*/
public function getName()
{
return $this->name;
}

/**
* Set dateCreation
*
Expand All @@ -201,6 +217,14 @@ public function setDateCreation($dateCreation)
return $this;
}

/**
* @inheritdoc
*/
public function getDateCreation()
{
return $this->dateCreation;
}

/**
* Set dateUpdate
*
Expand All @@ -215,6 +239,14 @@ public function setDateUpdate($dateUpdate)
return $this;
}

/**
* @inheritdoc
*/
public function getDateUpdate()
{
return $this->dateUpdate;
}

/**
* Set descriptionMd
*
Expand All @@ -229,6 +261,14 @@ public function setDescriptionMd($descriptionMd)
return $this;
}

/**
* @inheritdoc
*/
public function getDescriptionMd()
{
return $this->descriptionMd;
}

/**
* Set problem
*
Expand Down
Loading