Skip to content

Commit

Permalink
Change coding style to match PSR-2
Browse files Browse the repository at this point in the history
- PHP CS Fixer run using level psr2
- Use PSR-4 for tests
  • Loading branch information
mpajunen authored and bfanger committed May 2, 2015
1 parent dc86e14 commit f39d878
Show file tree
Hide file tree
Showing 77 changed files with 442 additions and 337 deletions.
4 changes: 2 additions & 2 deletions Examples/petstore.swagger.io/ApiResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
* @SWG\Xml(name="##default")
* )
*/
class ApiResponse {
class ApiResponse
{

/**
* @SWG\Property(format="int32")
Expand All @@ -26,5 +27,4 @@ class ApiResponse {
* @var string
*/
public $message;

}
38 changes: 19 additions & 19 deletions Examples/petstore.swagger.io/controllers/PetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

namespace PetstoreIO;

class PetController {
class PetController
{

/**
* @SWG\Get(
Expand Down Expand Up @@ -41,8 +42,8 @@ class PetController {
* }
* )
*/
function findByTags() {
public function findByTags()
{
}

/**
Expand Down Expand Up @@ -82,8 +83,8 @@ function findByTags() {
* }
* )
*/
function findByStatus() {
public function findByStatus()
{
}

/**
Expand Down Expand Up @@ -126,8 +127,8 @@ function findByStatus() {
* }
* )
*/
function getPetById() {
public function getPetById()
{
}

/**
Expand All @@ -153,8 +154,8 @@ function getPetById() {
* security={{"petstore_auth":{"write:pets", "read:pets"}}}
* )
*/
function addPet() {
public function addPet()
{
}

/**
Expand Down Expand Up @@ -188,8 +189,8 @@ function addPet() {
* security={{"petstore_auth":{"write:pets", "read:pets"}}}
* )
*/
function updatePet() {
public function updatePet()
{
}

/**
Expand Down Expand Up @@ -223,8 +224,8 @@ function updatePet() {
* security={{"petstore_auth":{"write:pets", "read:pets"}}}
* )
*/
function deletePet() {
public function deletePet()
{
}

/**
Expand Down Expand Up @@ -263,8 +264,8 @@ function deletePet() {
* }}
* )
*/
function updatePetWithForm() {
public function updatePetWithForm()
{
}

/**
Expand Down Expand Up @@ -308,15 +309,14 @@ function updatePetWithForm() {
* "write:pets"
* }
* }
* },
* },
* summary="uploads an image",
* tags={
* "pet"
* }
* )
* */
function uploadFile() {
public function uploadFile()
{
}

}
20 changes: 10 additions & 10 deletions Examples/petstore.swagger.io/controllers/StoreController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

namespace PetstoreIO;

class StoreController {
class StoreController
{

/**
* @SWG\Get(path="/store/inventory",
Expand All @@ -28,8 +29,8 @@ class StoreController {
* }}
* )
*/
function getInventory() {
public function getInventory()
{
}

/**
Expand All @@ -54,8 +55,8 @@ function getInventory() {
* @SWG\Response(response=400, description="Invalid Order")
* )
*/
function placeOrder() {
public function placeOrder()
{
}

/**
Expand Down Expand Up @@ -83,8 +84,8 @@ function placeOrder() {
* @SWG\Response(response=404, description="Order not found")
* )
*/
function getOrderById() {
public function getOrderById()
{
}

/**
Expand All @@ -105,8 +106,7 @@ function getOrderById() {
* @SWG\Response(response=404, description="Order not found")
* )
*/
function deleteOrder() {
public function deleteOrder()
{
}

}
32 changes: 16 additions & 16 deletions Examples/petstore.swagger.io/controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

namespace PetstoreIO;

class UserController {
class UserController
{

/**
* @SWG\Post(path="/user",
Expand All @@ -21,8 +22,8 @@ class UserController {
* @SWG\Response(response="default", description="successful operation")
* )
*/
function createUser() {
public function createUser()
{
}

/**
Expand All @@ -45,8 +46,8 @@ function createUser() {
* @SWG\Response(response="default", description="successful operation")
* )
*/
function createUsersWithArrayInput() {
public function createUsersWithArrayInput()
{
}

/**
Expand Down Expand Up @@ -111,8 +112,8 @@ function createUsersWithArrayInput() {
* @SWG\Response(response=400, description="Invalid username/password supplied")
* )
*/
function loginUser() {
public function loginUser()
{
}

/**
Expand All @@ -126,8 +127,8 @@ function loginUser() {
* @SWG\Response(response="default", description="successful operation")
* )
*/
function logoutUser() {
public function logoutUser()
{
}

/**
Expand All @@ -149,8 +150,8 @@ function logoutUser() {
* @SWG\Response(response=404, description="User not found")
* )
*/
function getUserByName($username) {
public function getUserByName($username)
{
}

/**
Expand Down Expand Up @@ -178,8 +179,8 @@ function getUserByName($username) {
* @SWG\Response(response=404, description="User not found")
* )
*/
function updateUser() {
public function updateUser()
{
}

/**
Expand All @@ -200,8 +201,7 @@ function updateUser() {
* @SWG\Response(response=404, description="User not found")
* )
*/
function deleteUser() {
public function deleteUser()
{
}

}
4 changes: 2 additions & 2 deletions Examples/petstore.swagger.io/models/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
* @SWG\Xml(name="Category")
* )
*/
class Category {
class Category
{

/**
* @SWG\Property(format="int64")
Expand All @@ -20,5 +21,4 @@ class Category {
* @var string
*/
public $name;

}
4 changes: 2 additions & 2 deletions Examples/petstore.swagger.io/models/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
/**
* @SWG\Definition(@SWG\Xml(name="Order"))
*/
class Order {
class Order
{

/**
* @SWG\Property(format="int64")
Expand Down Expand Up @@ -43,5 +44,4 @@ class Order {
* @SWG\Property(enum={"placed","approved","delivered"})
*/
public $status;

}
3 changes: 2 additions & 1 deletion Examples/petstore.swagger.io/models/Pet.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
/**
* @SWG\Definition(required={"name", "photoUrls"}, @SWG\Xml(name="Pet"))
*/
class Pet {
class Pet
{

/**
* @SWG\Property(format="int64")
Expand Down
4 changes: 2 additions & 2 deletions Examples/petstore.swagger.io/models/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
* @SWG\Xml(name="Tag")
* )
*/
class Tag {
class Tag
{

/**
* @SWG\Property(format="int64")
Expand All @@ -20,5 +21,4 @@ class Tag {
* @var string
*/
public $name;

}
4 changes: 2 additions & 2 deletions Examples/petstore.swagger.io/models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
/**
* @SWG\Definition(@SWG\Xml(name="User"))
*/
class User {
class User
{

/**
* @SWG\Property(format="int64")
Expand Down Expand Up @@ -55,5 +56,4 @@ class User {
* @SWG\Property(format="int32")
*/
public $userStatus;

}
2 changes: 1 addition & 1 deletion Examples/petstore.swagger.io/security.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
* "write:pets": "modify pets in your account"
* }
* )
*/
*/
2 changes: 1 addition & 1 deletion Examples/petstore.swagger.io/swagger-v2.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
* url="http://swagger.io"
* )
* )
*/
*/
2 changes: 1 addition & 1 deletion Examples/petstore.swagger.io/tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
* url="http://swagger.io"
* )
* )
*/
*/
4 changes: 2 additions & 2 deletions Examples/swagger-spec/petstore-simple/SimplePet.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
/**
* @SWG\Definition(definition="pet", required={"id", "name"})
*/
class SimplePet {
class SimplePet
{

/**
* @SWG\Property(format="int64")
Expand All @@ -24,5 +25,4 @@ class SimplePet {
* @SWG\Property()
*/
public $tag;

}
Loading

0 comments on commit f39d878

Please sign in to comment.