@@ -41,7 +41,7 @@ class RdfResource implements \ArrayAccess
4141 *
4242 * @param EasyRdfGraph|RdfGraph|null $graph
4343 */
44- public function __construct (?string $ uri , $ graph = null , ? EasyRdfResource $ resource = null )
44+ public function __construct (?string $ uri , $ graph = null , EasyRdfResource $ resource = null )
4545 {
4646 $ graph = ($ graph instanceof RdfGraph) ? $ graph ->getEasyGraph () : $ graph ;
4747 $ this ->resource = $ resource ?? new EasyRdfResource ($ uri , $ graph );
@@ -174,7 +174,7 @@ public function localId(): ?string
174174 * Returns the label of the resource in the given language with given style
175175 * or make use of the default label if none exists in the defined language.
176176 */
177- private function labelAsName (?string $ language , ? string $ namingConvention = null ): ?string
177+ private function labelAsName (?string $ language , string $ namingConvention = null ): ?string
178178 {
179179 // English is the default language, forseeing graphs with several ones.
180180 $ language = $ language ?: 'en ' ;
@@ -185,18 +185,19 @@ private function labelAsName(?string $language, ?string $namingConvention = null
185185 return $ label ? u ($ label ->getValue ())->snake ()->__toString () :
186186 ($ defaultLabel ? u ($ defaultLabel ->getValue ())->snake ()->__toString () : null );
187187 }
188+
188189 // default is camel case style as with schema.org
189190 return $ label ? u ($ label ->getValue ())->camel ()->__toString () :
190191 ($ defaultLabel ? u ($ defaultLabel ->getValue ())->camel ()->__toString () : null );
191192 }
192193
193- /**
194- * Gets the graph related to this resource as a Schema Generator's RdfGraph.
195- */
196- public function getGraph (): ?RdfGraph
197- {
198- return ($ this ->hasGraph ()) ? RdfGraph::fromEasyRdf ($ this ->resource ->getGraph ()) : null ;
199- }
194+ /**
195+ * Gets the graph related to this resource as a Schema Generator's RdfGraph.
196+ */
197+ public function getGraph (): ?RdfGraph
198+ {
199+ return ($ this ->hasGraph ()) ? RdfGraph::fromEasyRdf ($ this ->resource ->getGraph ()) : null ;
200+ }
200201
201202 /**
202203 * Returns true if the current RdfResource belongs to a graph.
@@ -405,7 +406,7 @@ public function offsetExists($offset): bool
405406 /**
406407 * Array Access Interface: perform get at using array syntax.
407408 *
408- * @return mixed Can return all value types.
409+ * @return mixed can return all value types
409410 */
410411 #[\ReturnTypeWillChange]
411412 public function offsetGet ($ offset )
0 commit comments