Skip to content

Commit

Permalink
Reformat code automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
meritoo committed Nov 16, 2024
1 parent f3d5964 commit f1bed40
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
25 changes: 18 additions & 7 deletions src/Bundle/Descriptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,20 @@ class Descriptor
/**
* Class constructor
*
* @param string $name (optional) Name of bundle
* @param string $configurationRootName (optional) Name of configuration root node of bundle
* @param string $rootNamespace (optional) Root namespace of bundle
* @param string $path (optional) Physical path of bundle
* @param string $name (optional) Name of bundle
* @param string $configurationRootName (optional) Name of configuration root node of bundle
* @param string $rootNamespace (optional) Root namespace of bundle
* @param string $path (optional) Physical path of bundle
* @param null|Descriptor $parentBundleDescriptor (optional) Descriptor of the parent bundle
* @param null|Descriptor $childBundleDescriptor (optional) Descriptor of the child bundle
* @param null|Descriptor $childBundleDescriptor (optional) Descriptor of the child bundle
*/
public function __construct(
string $name = '',
string $configurationRootName = '',
string $rootNamespace = '',
string $path = '',
?Descriptor $parentBundleDescriptor = null,
?Descriptor $childBundleDescriptor = null
?Descriptor $childBundleDescriptor = null,
) {
$this->name = $name;
$this->configurationRootName = $configurationRootName;
Expand All @@ -119,6 +119,7 @@ public function __construct(
* Adds names of files with data fixtures from bundle
*
* @param array $fixturesPaths Names of files with data fixtures
*
* @return Descriptor
*/
public function addDataFixtures(array $fixturesPaths): Descriptor
Expand All @@ -136,6 +137,7 @@ public function addDataFixtures(array $fixturesPaths): Descriptor
* Creates and returns descriptor from given data
*
* @param array $data Data of descriptor
*
* @return Descriptor
*/
public static function fromArray(array $data): Descriptor
Expand Down Expand Up @@ -181,14 +183,15 @@ public static function fromArray(array $data): Descriptor
$rootNamespace,
$path,
$parentBundleDescriptor,
$childBundleDescriptor
$childBundleDescriptor,
);
}

/**
* Creates and returns descriptor of given bundle
*
* @param Bundle $bundle The bundle
*
* @return Descriptor
*/
public static function fromBundle(Bundle $bundle): Descriptor
Expand Down Expand Up @@ -218,6 +221,7 @@ public function getChildBundleDescriptor(): ?Descriptor
* Sets descriptor of the child bundle
*
* @param Descriptor|null $childBundleDescriptor (optional) The child's descriptor
*
* @return Descriptor
*/
public function setChildBundleDescriptor(?Descriptor $childBundleDescriptor): Descriptor
Expand All @@ -241,6 +245,7 @@ public function getConfigurationRootName(): string
* Sets name of configuration root node of bundle
*
* @param string $configurationRootName The name
*
* @return Descriptor
*/
public function setConfigurationRootName(string $configurationRootName): Descriptor
Expand Down Expand Up @@ -293,6 +298,7 @@ public function getName(): string
* Sets name of bundle
*
* @param string $name The name
*
* @return Descriptor
*/
public function setName(string $name): Descriptor
Expand All @@ -316,6 +322,7 @@ public function getParentBundleDescriptor(): ?Descriptor
* Sets descriptor of the parent bundle
*
* @param Descriptor|null $parentBundleDescriptor (optional) The parent's descriptor
*
* @return Descriptor
*/
public function setParentBundleDescriptor(?Descriptor $parentBundleDescriptor): Descriptor
Expand All @@ -339,6 +346,7 @@ public function getPath(): string
* Sets physical path of bundle
*
* @param string $path The path
*
* @return Descriptor
*/
public function setPath(string $path): Descriptor
Expand All @@ -362,6 +370,7 @@ public function getRootNamespace(): string
* Sets root namespace of bundle
*
* @param string $rootNamespace The root namespace
*
* @return Descriptor
*/
public function setRootNamespace(string $rootNamespace): Descriptor
Expand Down Expand Up @@ -392,6 +401,7 @@ public function getShortName(): string
* Returns information if given file belongs to bundle
*
* @param string $filePath Path of file to verify
*
* @return bool
*/
public function hasFile(string $filePath): bool
Expand All @@ -404,6 +414,7 @@ public function hasFile(string $filePath): bool
*
* @param bool $withParentAndChild (optional) If is set to true, includes descriptor of the parent and child
* bundle (default behaviour). Otherwise - not.
*
* @return array
*/
public function toArray(bool $withParentAndChild = true): array
Expand Down
3 changes: 3 additions & 0 deletions src/Bundle/Descriptors.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class Descriptors extends BaseCollection
* Returns the descriptors created from given data
*
* @param array $data Data of descriptors
*
* @return Descriptors
*/
public static function fromArray(array $data): Descriptors
Expand All @@ -48,6 +49,7 @@ public static function fromArray(array $data): Descriptors
* Returns descriptor of bundle that contains given class
*
* @param string $classNamespace Namespace of class for which descriptor of bundle should be returned
*
* @return null|Descriptor
*/
public function getDescriptor(string $classNamespace): ?Descriptor
Expand Down Expand Up @@ -81,6 +83,7 @@ public function getDescriptor(string $classNamespace): ?Descriptor
* Returns descriptor of bundle with given name
*
* @param string $bundleName Name of bundle who descriptor should be returned
*
* @return null|Descriptor
*/
public function getDescriptorByName(string $bundleName): ?Descriptor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class UnreadableVersionFileException extends RuntimeException
* Creates exception
*
* @param string $filePath Path of a file who contains version of the application
*
* @return UnreadableVersionFileException
*/
public static function create(string $filePath): UnreadableVersionFileException
Expand Down

0 comments on commit f1bed40

Please sign in to comment.