Skip to content

Commit

Permalink
- entity psr
Browse files Browse the repository at this point in the history
- added default unit-tests
- added travis
- added coveralls
  • Loading branch information
kokspflanze committed Apr 13, 2015
1 parent f294bb4 commit 0e7527e
Show file tree
Hide file tree
Showing 30 changed files with 3,141 additions and 2,838 deletions.
26 changes: 26 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
language: php

php:
- 5.4
- 5.5
- 5.6
- 7
- hhvm
- hhvm-nightly

matrix:
fast_finish: true
allow_failures:
- php: hhvm
- php: hhvm-nightly

before_script:
- composer update --prefer-source --dev

script:
- mkdir -p build/logs
# Run tests
- php ./vendor/bin/phpunit --configuration tests/phpunit.xml

after_script:
- php vendor/bin/coveralls -v
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# PSeverCMS Module for Zend Framework 2

Master
[![Build Status](https://travis-ci.org/kokspflanze/PServerCMS.svg?branch=master)](https://travis-ci.org/kokspflanze/PServerCMS?branch=master)
[![Coverage Status](https://coveralls.io/repos/kokspflanze/PServerCMS/badge.svg?branch=master)](https://coveralls.io/r/kokspflanze/PServerCMS?branch=master)

## SYSTEM REQUIREMENTS

requires PHP 5.4 or later; we recommend using the
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"homepage": "https://github.com/kokspflanze/PServerCMS",
"autoload": {
"psr-0": {
"PServerCMS\\": "src/"
"PServerCMS\\": "src/",
"PServerCMSTest\\": "tests/"
}
},
"authors": [
Expand Down
273 changes: 132 additions & 141 deletions src/PServerCMS/Entity/AvailableCountries.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,150 +6,141 @@

/**
* AvailableCountries
*
* @ORM\Table(name="available_countries", indexes={@ORM\Index(name="fk_availableCountrys_users1_idx", columns={"users_usrId"})})
* @ORM\Entity(repositoryClass="PServerCMS\Entity\Repository\AvailableCountries")
*/
class AvailableCountries
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $acid;

/**
* @var string
*
* @ORM\Column(name="cntry", type="string", length=45, nullable=false)
*/
private $cntry;

/**
* @var string
*
* @ORM\Column(name="active", type="string", nullable=false)
*/
private $active = '1';

/**
* @var \DateTime
*
* @ORM\Column(name="created", type="datetime", nullable=false)
*/
private $created;

/**
* @var UserInterface
*
* @ORM\ManyToOne(targetEntity="User")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="users_usrId", referencedColumnName="usrId")
* })
*/
private $user;

public function __construct( ) {
$this->created = new \DateTime();
}

/**
* Get acid
*
* @return integer
*/
public function getAcid() {
return $this->acid;
}

/**
* Set cntry
*
* @param string $cntry
*
* @return self
*/
public function setCntry( $cntry ) {
$this->cntry = $cntry;

return $this;
}

/**
* Get cntry
*
* @return string
*/
public function getCntry() {
return $this->cntry;
}

/**
* Set active
*
* @param string $active
*
* @return self
*/
public function setActive( $active ) {
$this->active = $active;

return $this;
}

/**
* Get active
*
* @return string
*/
public function getActive() {
return $this->active;
}

/**
* Set created
*
* @param \DateTime $created
*
* @return self
*/
public function setCreated( $created ) {
$this->created = $created;

return $this;
}

/**
* Get created
*
* @return \DateTime
*/
public function getCreated() {
return $this->created;
}

/**
* Set user
*
* @param UserInterface $user
*
* @return self
*/
public function setUser( UserInterface $user = null ){
$this->user = $user;

return $this;
}

/**
* Get user
*
* @return UserInterface
*/
public function getUser() {
return $this->user;
}
/**
* @var integer
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $acid;

/**
* @var string
* @ORM\Column(name="cntry", type="string", length=45, nullable=false)
*/
private $cntry;

/**
* @var string
* @ORM\Column(name="active", type="string", nullable=false)
*/
private $active = '1';

/**
* @var \DateTime
* @ORM\Column(name="created", type="datetime", nullable=false)
*/
private $created;

/**
* @var UserInterface
* @ORM\ManyToOne(targetEntity="User")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="users_usrId", referencedColumnName="usrId")
* })
*/
private $user;

public function __construct()
{
$this->created = new \DateTime();
}

/**
* Get acid
* @return integer
*/
public function getAcid()
{
return $this->acid;
}

/**
* Set cntry
* @param string $cntry
* @return self
*/
public function setCntry( $cntry )
{
$this->cntry = $cntry;

return $this;
}

/**
* Get cntry
* @return string
*/
public function getCntry()
{
return $this->cntry;
}

/**
* Set active
* @param string $active
* @return self
*/
public function setActive( $active )
{
$this->active = $active;

return $this;
}

/**
* Get active
* @return string
*/
public function getActive()
{
return $this->active;
}

/**
* Set created
* @param \DateTime $created
* @return self
*/
public function setCreated( $created )
{
$this->created = $created;

return $this;
}

/**
* Get created
* @return \DateTime
*/
public function getCreated()
{
return $this->created;
}

/**
* Set user
* @param UserInterface $user
* @return self
*/
public function setUser( UserInterface $user = null )
{
$this->user = $user;

return $this;
}

/**
* Get user
* @return UserInterface
*/
public function getUser()
{
return $this->user;
}
}
Loading

0 comments on commit 0e7527e

Please sign in to comment.