Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,12 @@
},
"config": {
"sort-packages": true
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.7"
},
"scripts": {
"phpcs": "phpcs",
"phpcbf": "phpcbf"
}
}
15 changes: 15 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<ruleset name="ToArrayInterface">
<description>PHP_CodeSniffer configuration for the ToArrayInterface package</description>

<!-- Show progress -->
<arg value="sp"/>

<!-- Check all files in the src directory -->
<file>src</file>

<!-- Include the PSR-12 standard -->
<rule ref="PSR12">
</rule>

</ruleset>
13 changes: 7 additions & 6 deletions src/ToArrayInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace Imponeer;
Expand All @@ -8,10 +9,10 @@
*/
interface ToArrayInterface
{
/**
* Converts object to array
*
* @return array
*/
public function toArray(): array;
/**
* Converts object to array
*
* @return array
*/
public function toArray(): array;
}