Skip to content

Commit

Permalink
Removed interface prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
xificurk committed Apr 4, 2020
1 parent 40e6585 commit 25d4559
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,16 @@
<exclude-pattern>*.phpt</exclude-pattern>
<exclude-pattern>*/bootstrap.php</exclude-pattern>
</rule>
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
<exclude-pattern>src/compatibility.php</exclude-pattern>
</rule>
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement.Found">
<exclude-pattern>src/compatibility.php</exclude-pattern>
</rule>
<rule ref="Squiz.Classes.ClassFileName.NoMatch">
<exclude-pattern>src/compatibility.php</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName.NoMatchBetweenTypeNameAndFileName">
<exclude-pattern>src/compatibility.php</exclude-pattern>
</rule>
</ruleset>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ First register the control factory in your config and optionally set up default
```yaml
services:
-
implement: Nepada\MetaControl\IMetaControlFactory
implement: Nepada\MetaControl\MetaControlFactory
setup:
- setCharset('utf-8')
- setAuthor('Jon Doe')
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"autoload": {
"psr-4": {
"Nepada\\MetaControl\\": "src/MetaControl/"
}
},
"files": ["src/compatibility.php"]
},
"autoload-dev": {
"psr-4": {
Expand Down
5 changes: 5 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ parameters:
uncheckedExceptions:
- LogicException
- Nette\InvalidStateException

ignoreErrors:
-
message: '#If condition is always false#'
path: src/compatibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Nepada\MetaControl;

interface IMetaControlFactory
interface MetaControlFactory
{

public function create(): MetaControl;
Expand Down
14 changes: 14 additions & 0 deletions src/compatibility.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
declare(strict_types = 1);

namespace Nepada\MetaControl;

if (false) {
/** @deprecated use MetaControlFactory */
interface IMetaControlFactory extends MetaControlFactory
{

}
} elseif (! interface_exists(IMetaControlFactory::class)) {
class_alias(MetaControlFactory::class, IMetaControlFactory::class);
}

0 comments on commit 25d4559

Please sign in to comment.