* use php-cs-fixer instead of phpcodesniffer * updated scrutinizer config * adjusted code yules to all files * updated CONTRIBUTING guidelines
This commit is contained in:
@@ -26,11 +26,11 @@ class AppFixtures extends Fixture
|
||||
{
|
||||
use FixturesTrait;
|
||||
|
||||
const DEFAULT_PASSWORD = 'kitten';
|
||||
const USERNAME_USER = 'john_user';
|
||||
const USERNAME_TEAMLEAD = 'tony_teamlead';
|
||||
const USERNAME_ADMIN = 'anna_admin';
|
||||
const USERNAME_SUPER_ADMIN = 'susan_super';
|
||||
public const DEFAULT_PASSWORD = 'kitten';
|
||||
public const USERNAME_USER = 'john_user';
|
||||
public const USERNAME_TEAMLEAD = 'tony_teamlead';
|
||||
public const USERNAME_ADMIN = 'anna_admin';
|
||||
public const USERNAME_SUPER_ADMIN = 'susan_super';
|
||||
|
||||
/**
|
||||
* @var UserPasswordEncoderInterface
|
||||
@@ -87,7 +87,7 @@ class AppFixtures extends Fixture
|
||||
}
|
||||
|
||||
/**
|
||||
* @return []
|
||||
* @return array
|
||||
*/
|
||||
protected function getUserDefinition()
|
||||
{
|
||||
|
||||
@@ -44,6 +44,7 @@ trait FixturesTrait
|
||||
protected function getRandomPhrase()
|
||||
{
|
||||
$phrases = $this->getPhrases();
|
||||
|
||||
return $phrases[array_rand($phrases)];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ use Doctrine\Common\Persistence\ObjectManager;
|
||||
*/
|
||||
class InvoiceFixtures extends Fixture
|
||||
{
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
||||
@@ -28,9 +28,9 @@ class TimesheetFixtures extends Fixture
|
||||
{
|
||||
use FixturesTrait;
|
||||
|
||||
const AMOUNT_TIMESHEET = 5000; // timesheet entries total
|
||||
const RATE_MIN = 10; // minimum rate for one hour
|
||||
const RATE_MAX = 80; // maximum rate for one hour
|
||||
public const AMOUNT_TIMESHEET = 5000; // timesheet entries total
|
||||
public const RATE_MIN = 10; // minimum rate for one hour
|
||||
public const RATE_MAX = 80; // maximum rate for one hour
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
@@ -55,6 +55,7 @@ class TimesheetFixtures extends Fixture
|
||||
foreach ($entries as $temp) {
|
||||
$all[$temp->getId()] = $temp;
|
||||
}
|
||||
|
||||
return $all;
|
||||
}
|
||||
|
||||
@@ -70,6 +71,7 @@ class TimesheetFixtures extends Fixture
|
||||
foreach ($entries as $temp) {
|
||||
$all[$temp->getId()] = $temp;
|
||||
}
|
||||
|
||||
return $all;
|
||||
}
|
||||
|
||||
@@ -85,8 +87,10 @@ class TimesheetFixtures extends Fixture
|
||||
foreach ($entries as $temp) {
|
||||
$all[$temp->getId()] = $temp;
|
||||
}
|
||||
|
||||
return $all;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ObjectManager $manager
|
||||
* @return Activity[]
|
||||
@@ -99,6 +103,7 @@ class TimesheetFixtures extends Fixture
|
||||
foreach ($entries as $temp) {
|
||||
$all[$temp->getId()] = $temp;
|
||||
}
|
||||
|
||||
return $all;
|
||||
}
|
||||
|
||||
@@ -181,7 +186,7 @@ class TimesheetFixtures extends Fixture
|
||||
$i = 1;
|
||||
|
||||
foreach ($allCustomer as $customerName) {
|
||||
$visible = $i++ % 6 != 0;
|
||||
$visible = 0 != $i++ % 6;
|
||||
$entry = new Customer();
|
||||
$entry
|
||||
->setCurrency($this->getRandomCurrency())
|
||||
@@ -205,7 +210,7 @@ class TimesheetFixtures extends Fixture
|
||||
foreach ($allCustomer as $id => $customer) {
|
||||
$projectForCustomer = rand(0, 7);
|
||||
for ($i = 1; $i <= $projectForCustomer; $i++) {
|
||||
$visible = $i % 5 != 0;
|
||||
$visible = 0 != $i % 5;
|
||||
$entry = new Project();
|
||||
|
||||
$entry
|
||||
@@ -228,7 +233,7 @@ class TimesheetFixtures extends Fixture
|
||||
foreach ($allProject as $projectId => $project) {
|
||||
$activityCount = rand(0, 10);
|
||||
for ($i = 1; $i <= $activityCount; $i++) {
|
||||
$visible = $i % 4 != 0;
|
||||
$visible = 0 != $i % 4;
|
||||
$entry = new Activity();
|
||||
$entry
|
||||
->setName($this->getRandomActivity() . ($visible ? '' : '.'))
|
||||
@@ -283,6 +288,7 @@ class TimesheetFixtures extends Fixture
|
||||
private function getRandomActivity()
|
||||
{
|
||||
$all = $this->getActivities();
|
||||
|
||||
return $all[array_rand($all)];
|
||||
}
|
||||
|
||||
@@ -321,6 +327,7 @@ class TimesheetFixtures extends Fixture
|
||||
private function getRandomProject()
|
||||
{
|
||||
$all = $this->getProjects();
|
||||
|
||||
return $all[array_rand($all)];
|
||||
}
|
||||
|
||||
@@ -361,6 +368,7 @@ class TimesheetFixtures extends Fixture
|
||||
private function getRandomLocation()
|
||||
{
|
||||
$all = $this->getLocations();
|
||||
|
||||
return $all[array_rand($all)];
|
||||
}
|
||||
|
||||
@@ -430,6 +438,7 @@ class TimesheetFixtures extends Fixture
|
||||
private function getRandomCurrency()
|
||||
{
|
||||
$all = $this->getCurrencies();
|
||||
|
||||
return $all[array_rand($all)];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user