File tree Expand file tree Collapse file tree 11 files changed +60
-17
lines changed Expand file tree Collapse file tree 11 files changed +60
-17
lines changed Original file line number Diff line number Diff line change 1+ # These are supported funding model platforms
2+
3+ github : byjg
Original file line number Diff line number Diff line change @@ -16,15 +16,15 @@ jobs:
1616 strategy :
1717 matrix :
1818 php-version :
19+ - " 8.3"
1920 - " 8.2"
2021 - " 8.1"
21- - " 8.0"
22- - " 7.4"
2322
2423 steps :
2524 - uses : actions/checkout@v4
2625 - run : composer install
2726 - run : ./vendor/bin/phpunit
27+ - run : ./vendor/bin/psalm
2828
2929 Documentation :
3030 if : github.ref == 'refs/heads/master'
Original file line number Diff line number Diff line change 1+ <component name =" ProjectRunConfigurationManager" >
2+ <configuration default =" false" name =" PHPUnit" type =" PHPUnitRunConfigurationType" factoryName =" PHPUnit" >
3+ <TestRunner configuration_file =" $PROJECT_DIR$/phpunit.xml.dist" scope =" XML" use_alternative_configuration_file =" true" />
4+ <method v =" 2" />
5+ </configuration >
6+ </component >
Original file line number Diff line number Diff line change 1+ <component name =" ProjectRunConfigurationManager" >
2+ <configuration default =" false" name =" PSalm" type =" PhpLocalRunConfigurationType" factoryName =" PHP Console" path =" $PROJECT_DIR$/vendor/bin/psalm" >
3+ <method v =" 2" />
4+ </configuration >
5+ </component >
Original file line number Diff line number Diff line change 66 "ByJG\\ DesignPattern\\ " : " src/"
77 }
88 },
9+ "autoload-dev" : {
10+ "psr-4" : {
11+ "Tests\\ " : " tests/"
12+ }
13+ },
914 "require" : {
10- "php" : " >=7 .4"
15+ "php" : " >=8.1 <8 .4"
1116 },
1217 "require-dev" : {
13- "phpunit/phpunit" : " 5.7.*|7.4.*|^9.5"
18+ "phpunit/phpunit" : " ^9.6" ,
19+ "vimeo/psalm" : " ^5.9"
1420 },
1521 "license" : " MIT"
1622}
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" ?>
2+ <psalm
3+ errorLevel =" 4"
4+ resolveFromConfigFile =" true"
5+ findUnusedBaselineEntry =" true"
6+ findUnusedCode =" false"
7+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
8+ xmlns =" https://getpsalm.org/schema/config"
9+ xsi : schemaLocation =" https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
10+ >
11+ <projectFiles >
12+ <directory name =" src" />
13+ <directory name =" tests" />
14+ <ignoreFiles >
15+ <directory name =" vendor" />
16+ </ignoreFiles >
17+ </projectFiles >
18+ </psalm >
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public function __wakeup()
3636 /**
3737 * @return static
3838 */
39- public static function getInstance ()
39+ public static function getInstance (): static
4040 {
4141 static $ instances ;
4242
Original file line number Diff line number Diff line change 22
33namespace ByJG \DesignPattern ;
44
5- class SingletonException extends \Exception
5+ use Exception ;
6+
7+ class SingletonException extends Exception
68{
79
810}
Original file line number Diff line number Diff line change 11<?php
22
3- require_once __DIR__ . "/../vendor/autoload.php " ;
3+ namespace Tests ;
4+
5+ use ByJG \DesignPattern \Singleton ;
46
57class Sample1
68{
7- use \ ByJG \ DesignPattern \ Singleton;
9+ use Singleton;
810
9- public $ property ;
11+ public int $ property ;
1012
1113 private function __construct ()
1214 {
Original file line number Diff line number Diff line change 11<?php
22
3- require_once __DIR__ . "/../vendor/autoload.php " ;
3+ namespace Tests ;
4+
5+ use ByJG \DesignPattern \Singleton ;
46
57class Sample2
68{
7- use \ ByJG \ DesignPattern \ Singleton;
9+ use Singleton;
810
9- public $ property2 ;
11+ public int $ property2 ;
1012}
You can’t perform that action at this time.
0 commit comments