Skip to content

Commit

Permalink
further coding style fixes; also made .php-cs-fixer.dist more portable
Browse files Browse the repository at this point in the history
  • Loading branch information
k00ni committed Feb 13, 2024
1 parent 6174abb commit 39e4fa4
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CodingStyles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
fail-fast: true
matrix:
php:
- 8.0
- 8.2

steps:
- name: Checkout
Expand Down
11 changes: 7 additions & 4 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
use PhpCsFixer\Finder;

$finder = Finder::create()
->in(__DIR__ .'/examples')
->in(__DIR__ .'/lib')
->in(__DIR__ .'/test')
->in(__DIR__ .'/tests')
->in(__DIR__ .DIRECTORY_SEPARATOR.'examples')
->in(__DIR__ .DIRECTORY_SEPARATOR.'lib')
->in(__DIR__ .DIRECTORY_SEPARATOR.'test')
->in(__DIR__ .DIRECTORY_SEPARATOR.'tests')
->files([
__DIR__.DIRECTORY_SEPARATOR.'.php-cs-fixer.dist.php',
])
->name('*.php')
;

Expand Down
10 changes: 5 additions & 5 deletions lib/Graph.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public static function newAndLoad($uri, $format = null)
* @param string $uri The URI of the resource
* @param mixed $types RDF type of a new resource (e.g. foaf:Person)
*
* @return Resource
* @return resource
*
* @throws \InvalidArgumentException
*/
Expand Down Expand Up @@ -204,7 +204,7 @@ protected function classForResource($uri)
*
* @param mixed $types RDF type of a new blank node (e.g. foaf:Person)
*
* @return Resource The new blank node
* @return resource The new blank node
*/
public function newBNode($types = [])

Check failure on line 209 in lib/Graph.php

View workflow job for this annotation

GitHub Actions / Coding Styles (8.2)

Class EasyRdf\Resource referenced with incorrect case: EasyRdf\resource.
{
Expand Down Expand Up @@ -717,7 +717,7 @@ public function getLiteral($resource, $property, $lang = null)
* @param string $resource The URI of the resource (e.g. http://example.com/joe#me)
* @param string|array $property The name of the property (e.g. foaf:name)
*
* @return Resource Resource associated with the property
* @return resource Resource associated with the property
*/
public function getResource($resource, $property)

Check failure on line 722 in lib/Graph.php

View workflow job for this annotation

GitHub Actions / Coding Styles (8.2)

Class EasyRdf\Resource referenced with incorrect case: EasyRdf\resource.
{
Expand Down Expand Up @@ -1479,7 +1479,7 @@ public function type($resource = null)
* may be arbitrary.
* This method will return null if the resource has no type.
*
* @return Resource|null A type associated with the resource
* @return resource|null A type associated with the resource
*/
public function typeAsResource($resource = null)

Check failure on line 1484 in lib/Graph.php

View workflow job for this annotation

GitHub Actions / Coding Styles (8.2)

Class EasyRdf\Resource referenced with incorrect case: EasyRdf\resource.
{
Expand Down Expand Up @@ -1627,7 +1627,7 @@ public function label($resource = null, $lang = null)

/** Get the primary topic of the graph
*
* @return Resource|null the primary topic of the document
* @return resource|null the primary topic of the document
*/
public function primaryTopic($resource = null)

Check failure on line 1632 in lib/Graph.php

View workflow job for this annotation

GitHub Actions / Coding Styles (8.2)

Class EasyRdf\Resource referenced with incorrect case: EasyRdf\resource.
{
Expand Down
4 changes: 2 additions & 2 deletions lib/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ public function type()
* may be arbitrary.
* This method will return null if the resource has no type.
*
* @return Resource a type assocated with the resource
* @return resource a type assocated with the resource
*/
public function typeAsResource()

Check failure on line 600 in lib/Resource.php

View workflow job for this annotation

GitHub Actions / Coding Styles (8.2)

Class EasyRdf\Resource referenced with incorrect case: EasyRdf\resource.
{
Expand Down Expand Up @@ -663,7 +663,7 @@ public function setType($type)
*
* Returns null if no primary topic is available.
*
* @return Resource the primary topic of this resource
* @return resource the primary topic of this resource
*/
public function primaryTopic()

Check failure on line 668 in lib/Resource.php

View workflow job for this annotation

GitHub Actions / Coding Styles (8.2)

Class EasyRdf\Resource referenced with incorrect case: EasyRdf\resource.
{
Expand Down
2 changes: 1 addition & 1 deletion tests/EasyRdf/ResourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ResourceTest extends TestCase
/** @var Graph */
private $graph;

/** @var Resource */
/** @var resource */
private $resource;

/** @var string|\EasyRdf\Resource */
Expand Down

0 comments on commit 39e4fa4

Please sign in to comment.