Skip to content
This repository has been archived by the owner on Apr 20, 2022. It is now read-only.

Commit

Permalink
Whitespace cleanup for psr-2 compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiahsmall committed Mar 20, 2013
1 parent 9813631 commit 51b2cd1
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion module/Application/Module.php
Expand Up @@ -32,7 +32,7 @@ public function getAutoloaderConfig()
), ),
); );
} }

public function getServiceConfig() public function getServiceConfig()
{ {
/** /**
Expand Down
42 changes: 21 additions & 21 deletions module/Application/config/module.config.php
Expand Up @@ -77,12 +77,12 @@
'service_manager' => array( 'service_manager' => array(
/** /**
* Notes on ServiceManager config from http://akrabat.com/zend-framework-2/zendservicemanager-configuration-keys/ * Notes on ServiceManager config from http://akrabat.com/zend-framework-2/zendservicemanager-configuration-keys/
* Within the service_manager array, there are a set of nested arrays which are generally used to configure * Within the service_manager array, there are a set of nested arrays which are generally used to configure
* how you want a given class to be instantiated. the names of these sub-arrays are hardcoded, so you just * how you want a given class to be instantiated. the names of these sub-arrays are hardcoded, so you just
* need to learn their names and the difference between them: * need to learn their names and the difference between them:
*/ */
'factories' => array( 'factories' => array(
/** /**
* The factories node defines callbacks that return an instantiated class. This is for cases where you need * The factories node defines callbacks that return an instantiated class. This is for cases where you need
* to configure the instance of the object. The callback can be a class that implements * to configure the instance of the object. The callback can be a class that implements
* Zend\ServiceManager\FactoryInterface as in the first example for the simple_fm adapter below, or * Zend\ServiceManager\FactoryInterface as in the first example for the simple_fm adapter below, or
Expand All @@ -101,12 +101,12 @@
$simpleFMAdapter = $sm->get('simple_fm'); $simpleFMAdapter = $sm->get('simple_fm');
return new \Application\Gateway\Task($sm, $entity, $simpleFMAdapter); return new \Application\Gateway\Task($sm, $entity, $simpleFMAdapter);
}, },


), ),
'invokables' => array( 'invokables' => array(
// /** // /**
// * A string which is the name of a class to be instantiated. The ServiceManager will instantiate the // * A string which is the name of a class to be instantiated. The ServiceManager will instantiate the
// * class for you when needed. // * class for you when needed.
// * For example: // * For example:
// */ // */
Expand All @@ -116,26 +116,26 @@
// 'zfcuser_user' => 'User\Service\User' // 'zfcuser_user' => 'User\Service\User'
), ),
'services' => array( 'services' => array(
// /** // /**
// * An instance of a class. This is used to register already instantiated objects with the ServiceManager. // * An instance of a class. This is used to register already instantiated objects with the ServiceManager.
// * For example: // * For example:
// */ // */
// 'rob' => $rob, // $rob is already instantiated // 'rob' => $rob, // $rob is already instantiated
), ),
'aliases' => array( 'aliases' => array(
// /** // /**
// * Another name for a class. Generally, you see this used within a module so that the module uses it's // * Another name for a class. Generally, you see this used within a module so that the module uses it's
// * own alias name and then the user of the module can configure exactly which class that alias name is // * own alias name and then the user of the module can configure exactly which class that alias name is
// * to be. // * to be.
// * For example: // * For example:
// */ // */
// // example 1 // // example 1
// 'mymodule_zend_db_adapter' => 'Zend\Db\Adapter\Adapter', // 'mymodule_zend_db_adapter' => 'Zend\Db\Adapter\Adapter',
), ),
'initializers' => array( 'initializers' => array(
// /** // /**
// * A callback that is executed every time the ServiceManager creates a new instance of a class. These are // * A callback that is executed every time the ServiceManager creates a new instance of a class. These are
// * usually used to inject an object into the new class instance if that class implements a particular // * usually used to inject an object into the new class instance if that class implements a particular
// * interface. // * interface.
// * For example: // * For example:
// */ // */
Expand All @@ -145,20 +145,20 @@
// } // }
// } // }
// /** // /**
// * In the case, the initialiser checks if $instance implements AuthorizeAwareInterface and if it injects // * In the case, the initialiser checks if $instance implements AuthorizeAwareInterface and if it injects
// * the Authorize service into the instance ready for use. Another really common use-case is injecting a // * the Authorize service into the instance ready for use. Another really common use-case is injecting a
// * database adapter and Zend Framework supplies Zend\Db\Adapter\AdapterAwareInterface for this case. // * database adapter and Zend Framework supplies Zend\Db\Adapter\AdapterAwareInterface for this case.
// */ // */
), ),
'abstract_factories' => array( 'abstract_factories' => array(
// /** // /**
// * There is also the abstract_factories key, but this is rarely used in most apps. // * There is also the abstract_factories key, but this is rarely used in most apps.
// * // *
// * A factory instance that can create multiple services based on the name supplied to the factory. This is // * A factory instance that can create multiple services based on the name supplied to the factory. This is
// * used to enable ServiceManager to fallback to another Service Locator system if it can cannot locate the // * used to enable ServiceManager to fallback to another Service Locator system if it can cannot locate the
// * required class from within its own configuration. As an example, you could write an abstract factory // * required class from within its own configuration. As an example, you could write an abstract factory
// * that proxies to Symfony's DependencyInjection component. Items within this sub-key can be either a // * that proxies to Symfony's DependencyInjection component. Items within this sub-key can be either a
// * classname string or an instance of the factory itself // * classname string or an instance of the factory itself
// * All abstract factories must implement Zend\ServiceManager\AbstractFactoryInterface. // * All abstract factories must implement Zend\ServiceManager\AbstractFactoryInterface.
// * For example: // * For example:
// */ // */
Expand Down
14 changes: 7 additions & 7 deletions module/Application/src/Application/Entity/Project.php
Expand Up @@ -12,14 +12,14 @@


class Project extends AbstractEntity class Project extends AbstractEntity
{ {

/** /**
* Writable Fields * Writable Fields
*/ */
protected $projectName; protected $projectName;
protected $description; protected $description;
protected $tag; protected $tag;

/** /**
* Read-only Fields * Read-only Fields
*/ */
Expand All @@ -41,7 +41,7 @@ public function __construct($simpleFMAdapterRow = array())
$this->tasks = new ArrayCollection(); $this->tasks = new ArrayCollection();
parent::__construct($simpleFMAdapterRow); parent::__construct($simpleFMAdapterRow);
} }

/** /**
* @param array $simpleFMAdapterRow * @param array $simpleFMAdapterRow
* @see \Soliant\SimpleFM\ZF2\Entity\AbstractEntity::unserialize() * @see \Soliant\SimpleFM\ZF2\Entity\AbstractEntity::unserialize()
Expand All @@ -61,13 +61,13 @@ public function unserialize()
$this->unserializeField('daysElapsed', 'Days Elapsed'); $this->unserializeField('daysElapsed', 'Days Elapsed');
$this->unserializeField('statusOnScreen', 'Status on Screen'); $this->unserializeField('statusOnScreen', 'Status on Screen');
$this->unserializeField('createdBy', 'Created By'); $this->unserializeField('createdBy', 'Created By');

if (!empty($this->simpleFMAdapterRow["Tasks"]["rows"])){ if (!empty($this->simpleFMAdapterRow["Tasks"]["rows"])){
foreach ($this->simpleFMAdapterRow["Tasks"]["rows"] as $row){ foreach ($this->simpleFMAdapterRow["Tasks"]["rows"] as $row){
$this->tasks->add(new Task($row)); $this->tasks->add(new Task($row));
} }
} }

return $this; return $this;
} }


Expand Down Expand Up @@ -218,8 +218,8 @@ public static function getDefaultControllerRouteSegment()
return 'project'; return 'project';
} }






} }


Expand Down
14 changes: 7 additions & 7 deletions module/Application/src/Application/Entity/Task.php
Expand Up @@ -12,14 +12,14 @@


class Task extends AbstractEntity class Task extends AbstractEntity
{ {

/** /**
* Writable Fields * Writable Fields
*/ */
protected $taskName; protected $taskName;
protected $description; protected $description;
protected $tag; protected $tag;

/** /**
* Read-only Fields * Read-only Fields
*/ */
Expand Down Expand Up @@ -50,7 +50,7 @@ public function __construct($simpleFMAdapterRow = array())
{ {
parent::__construct($simpleFMAdapterRow); parent::__construct($simpleFMAdapterRow);
} }

/** /**
* @param array $simpleFMAdapterRow * @param array $simpleFMAdapterRow
* @see \Soliant\SimpleFM\ZF2\Entity\AbstractEntity::unserialize() * @see \Soliant\SimpleFM\ZF2\Entity\AbstractEntity::unserialize()
Expand All @@ -77,11 +77,11 @@ public function unserialize()
$this->unserializeField('personnelName', 'PERSONNEL NAME MATCH FIELD'); $this->unserializeField('personnelName', 'PERSONNEL NAME MATCH FIELD');
$this->unserializeField('personnelEmail', 'Personnel::Email'); $this->unserializeField('personnelEmail', 'Personnel::Email');
$this->unserializeField('personnelPhone', 'Personnel::Phone'); $this->unserializeField('personnelPhone', 'Personnel::Phone');

if (!empty($this->simpleFMAdapterRow["Projects"]["rows"])){ if (!empty($this->simpleFMAdapterRow["Projects"]["rows"])){
$this->project = new Project($this->simpleFMAdapterRow["Projects"]["rows"][0]); $this->project = new Project($this->simpleFMAdapterRow["Projects"]["rows"][0]);
} }

return $this; return $this;
} }


Expand Down Expand Up @@ -113,7 +113,7 @@ public function getTaskName ()
{ {
return $this->taskName; return $this->taskName;
} }

/** /**
* @param field_type $taskName * @param field_type $taskName
* @return \Application\Entity\Task * @return \Application\Entity\Task
Expand Down Expand Up @@ -159,7 +159,7 @@ public function setTag ($tag)
$this->tag = $tag; $this->tag = $tag;
return $this; return $this;
} }

/** /**
* @return the $startDate * @return the $startDate
*/ */
Expand Down
8 changes: 4 additions & 4 deletions module/Application/src/Application/Gateway/Project.php
Expand Up @@ -14,15 +14,15 @@ class Project extends AbstractGateway
{ {


public function helloWorld() { public function helloWorld() {

$project = $this->find(7676); $project = $this->find(7676);

$project->setProjectName('Launch web site ' . $project->getModid()) $project->setProjectName('Launch web site ' . $project->getModid())
->setDescription('myDescription') ->setDescription('myDescription')
->setTag('myTag'); ->setTag('myTag');

return $this->edit($project); return $this->edit($project);

} }


} }
Expand Down

0 comments on commit 51b2cd1

Please sign in to comment.