Skip to content

Commit

Permalink
updated CS
Browse files Browse the repository at this point in the history
removed invokable from view-helper and form
  • Loading branch information
kokspflanze committed Mar 15, 2016
1 parent e3962c7 commit 957028d
Show file tree
Hide file tree
Showing 19 changed files with 201 additions and 238 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"zendframework/zend-loader": "~2.5",
"zendframework/zend-config": "~2.5",
"zendframework/zend-view": "~2.5",
"zendframework/zend-http": "~2.5",
"zendframework/zend-serializer": "~2.5",
"zendframework/zend-log": "~2.5",
"zendframework/zend-i18n": "~2.5",
Expand Down
4 changes: 2 additions & 2 deletions config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
],
],
'service_manager' => [
'invokables' => array(
'invokables' => [
'zfcticketsystem_ticketsystem_service' => 'ZfcTicketSystem\Service\TicketSystem',
'zfcticketsystem_category_service' => 'ZfcTicketSystem\Service\Category',
),
],
],
'controllers' => [
'invokables' => [
Expand Down
5 changes: 4 additions & 1 deletion src/ZfcTicketSystem/Entity/Repository/TicketSubject.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ public function getTicketSubject4Admin($ticketId)
}

/**
* @return \ZfcTicketSystem\Entity\TicketSubject|null
* @param $userId
* @param $ticketId
* @return null|\ZfcTicketSystem\Entity\TicketSubject
* @throws \Doctrine\ORM\NonUniqueResultException
*/
public function getTicket4UserId($userId, $ticketId)
{
Expand Down
2 changes: 1 addition & 1 deletion src/ZfcTicketSystem/Entity/TicketEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace ZfcTicketSystem\Entity;

use SmallUser\Entity\UserInterface;
use Doctrine\ORM\Mapping as ORM;
use SmallUser\Entity\UserInterface;

/**
* TicketEntry
Expand Down
6 changes: 3 additions & 3 deletions src/ZfcTicketSystem/Entity/TicketSubject.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace ZfcTicketSystem\Entity;

use SmallUser\Entity\UserInterface;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use SmallUser\Entity\UserInterface;

/**
* TicketSubject
Expand Down Expand Up @@ -230,7 +230,7 @@ public function getLastEdit()

/**
* Set ticketCategory
* @param TicketEntry $ticketCategory
* @param TicketEntry $ticketEntry
* @return $this
*/
public function addTicketEntry(TicketEntry $ticketEntry = null)
Expand Down
52 changes: 26 additions & 26 deletions src/ZfcTicketSystem/Form/AdminTicketCategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,59 +12,59 @@ class AdminTicketCategory extends ProvidesEventsForm
public function __construct()
{
parent::__construct();
$this->add(array(
$this->add([
'type' => 'Zend\Form\Element\Csrf',
'name' => 'dfhs5ghrth3e4zn43ezj'
));
]);

$this->add(array(
$this->add([
'name' => 'subject',
'options' => array(
'options' => [
'label' => 'Subject',
),
'attributes' => array(
],
'attributes' => [
'placeholder' => 'Subject',
'class' => 'form-control',
),
));
],
]);

$this->add(array(
$this->add([
'name' => 'sort_key',
'options' => array(
'options' => [
'label' => 'Sortkey',
),
'attributes' => array(
],
'attributes' => [
'placeholder' => 'Sortkey',
'class' => 'form-control',
),
));
],
]);

$this->add(array(
$this->add([
'name' => 'active',
'type' => 'Zend\Form\Element\Select',
'options' => array(
'options' => [
'label' => 'Active',
'value_options' => array(
'value_options' => [
0 => 'deactive',
1 => 'active',
),
),
'attributes' => array(
],
],
'attributes' => [
'placeholder' => 'Active',
'class' => 'form-control',
),
));
],
]);

$submitElement = new Element\Button('submit');
$submitElement
->setLabel('Submit')
->setAttributes(array(
->setAttributes([
'class' => 'btn btn-default',
'type' => 'submit',
));
]);

$this->add($submitElement, array(
$this->add($submitElement, [
'priority' => -100,
));
]);
}
}
48 changes: 24 additions & 24 deletions src/ZfcTicketSystem/Form/AdminTicketCategoryFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,42 @@ class AdminTicketCategoryFilter extends ProvidesEventsInputFilter
{
public function __construct()
{
$this->add(array(
$this->add([
'name' => 'subject',
'required' => true,
'filters' => array(array('name' => 'StringTrim')),
'validators' => array(
array(
'filters' => [['name' => 'StringTrim']],
'validators' => [
[
'name' => 'StringLength',
'options' => array(
'options' => [
'min' => 1,
'max' => 200,
),
),
),
));
],
],
],
]);

$this->add(array(
$this->add([
'name' => 'sort_key',
'required' => false,
'validators' => array(
array(
'validators' => [
[
'name' => 'IsInt',
),
),
));
],
],
]);

$this->add(array(
$this->add([
'name' => 'active',
'required' => true,
'validators' => array(
array(
'validators' => [
[
'name' => 'InArray',
'options' => array(
'haystack' => array(0, 1),
),
),
),
));
'options' => [
'haystack' => [0, 1],
],
],
],
]);
}
}
25 changes: 12 additions & 13 deletions src/ZfcTicketSystem/Form/TicketEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace ZfcTicketSystem\Form;

use Zend\Form\Form;
use Zend\Form\Element;
use ZfcBase\Form\ProvidesEventsForm;

Expand All @@ -12,33 +11,33 @@ class TicketEntry extends ProvidesEventsForm
public function __construct()
{
parent::__construct();
$this->add(array(
$this->add([
'type' => 'Zend\Form\Element\Csrf',
'name' => 'fdh456eh56ujzum45zkuik45zhrh'
));
]);

$this->add(array(
$this->add([
'name' => 'memo',
'type' => 'Zend\Form\Element\Textarea',
'options' => array(
'options' => [
'label' => 'Memo',
),
'attributes' => array(
],
'attributes' => [
'placeholder' => 'Memo',
'class' => 'form-control',
),
));
],
]);

$submitElement = new Element\Button('submit');
$submitElement
->setLabel('Submit')
->setAttributes(array(
->setAttributes([
'class' => 'btn btn-primary',
'type' => 'submit',
));
]);

$this->add($submitElement, array(
$this->add($submitElement, [
'priority' => -100,
));
]);
}
}
18 changes: 9 additions & 9 deletions src/ZfcTicketSystem/Form/TicketEntryFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ class TicketEntryFilter extends ProvidesEventsInputFilter

public function __construct()
{
$this->add(array(
$this->add([
'name' => 'memo',
'required' => true,
'filters' => array(array('name' => 'StringTrim')),
'validators' => array(
array(
'filters' => [['name' => 'StringTrim']],
'validators' => [
[
'name' => 'StringLength',
'options' => array(
'options' => [
'min' => 3,
),
),
),
));
],
],
],
]);

}

Expand Down
Loading

0 comments on commit 957028d

Please sign in to comment.