diff --git a/modules/cms/classes/CmsController.php b/modules/cms/classes/CmsController.php index f3d96604a..a9b9e5599 100644 --- a/modules/cms/classes/CmsController.php +++ b/modules/cms/classes/CmsController.php @@ -30,6 +30,7 @@ class CmsController extends ControllerBase /** * Extend this object properties upon construction. + * @param Closure $callback */ public static function extend(Closure $callback) { diff --git a/modules/cms/classes/CmsObject.php b/modules/cms/classes/CmsObject.php index 8b6bfccaf..2690a2508 100644 --- a/modules/cms/classes/CmsObject.php +++ b/modules/cms/classes/CmsObject.php @@ -74,7 +74,7 @@ class CmsObject implements ArrayAccess /** * Loads the object from a cache. * This method is used by the CMS in the runtime. If the cache is not found, it is created. - * @param $theme Specifies the theme the object belongs to. + * @param \Cms\Classes\Theme $theme Specifies the theme the object belongs to. * @param string $fileName Specifies the file name, with the extension. * @return mixed Returns a CMS object instance or null if the object wasn't found. */ @@ -149,7 +149,7 @@ class CmsObject implements ArrayAccess /** * Loads the object from a file. * This method is used in the CMS back-end. It doesn't use any caching. - * @param $theme Specifies the theme the object belongs to. + * @param \Cms\Classes\Theme $theme Specifies the theme the object belongs to. * @param string $fileName Specifies the file name, with the extension. * The file name can contain only alphanumeric symbols, dashes and dots. * @return mixed Returns a CMS object instance or null if the object wasn't found. @@ -446,7 +446,7 @@ class CmsObject implements ArrayAccess /** * Returns the absolute file path. - * @param $theme Specifies a theme the file belongs to. + * @param \Cms\Classes\Theme $theme Specifies a theme the file belongs to. * @param string$fileName Specifies the file name to return the path to. * @return string */ diff --git a/modules/cms/classes/CmsObjectCollection.php b/modules/cms/classes/CmsObjectCollection.php index 459908a21..1161ed116 100644 --- a/modules/cms/classes/CmsObjectCollection.php +++ b/modules/cms/classes/CmsObjectCollection.php @@ -13,7 +13,8 @@ class CmsObjectCollection extends CollectionBase { /** * Returns objects that use the supplied component. - * @param string|array $components + * @param string|array $components + * @param null|callback $callback * @return static */ public function withComponent($components, $callback = null) @@ -41,6 +42,7 @@ class CmsObjectCollection extends CollectionBase * Returns objects whose properties match the supplied value. * @param string $property * @param string $value + * @param bool $strict * @return static */ public function where($property, $value, $strict = true) diff --git a/modules/cms/classes/ComponentManager.php b/modules/cms/classes/ComponentManager.php index dc922cd88..6afbaede5 100644 --- a/modules/cms/classes/ComponentManager.php +++ b/modules/cms/classes/ComponentManager.php @@ -1,7 +1,6 @@ * + * @param callable $definitions * @return array Array values are class names. */ public function registerComponents(callable $definitions) @@ -189,7 +189,7 @@ class ComponentManager /** * Makes a component object with properties set. - * @param $name A component class name or code. + * @param string $name A component class name or code. * @param CmsObject $cmsObject The Cms object that spawned this component. * @param array $properties The properties set by the Page or Layout. * @return ComponentBase The component object. diff --git a/modules/cms/classes/Layout.php b/modules/cms/classes/Layout.php index 624c6807e..e42157dbf 100644 --- a/modules/cms/classes/Layout.php +++ b/modules/cms/classes/Layout.php @@ -26,7 +26,7 @@ class Layout extends CmsCompoundObject /** * Initializes the fallback layout. - * @param \Cms\ClassesTheme $theme Specifies a theme the file belongs to. + * @param \Cms\Classes\Theme $theme Specifies a theme the file belongs to. * @return \Cms\Classes\Layout */ public static function initFallback($theme) diff --git a/modules/cms/classes/MediaLibrary.php b/modules/cms/classes/MediaLibrary.php index b7ea73e08..603ab0a1a 100644 --- a/modules/cms/classes/MediaLibrary.php +++ b/modules/cms/classes/MediaLibrary.php @@ -500,7 +500,7 @@ class MediaLibrary /** * Initializes a library item from a path and item type. * @param string $path Specifies the item path relative to the storage disk root. - * @param string $type Specifies the item type. + * @param string $itemType Specifies the item type. * @return mixed Returns the MediaLibraryItem object or NULL if the item is not visible. */ protected function initLibraryItem($path, $itemType) diff --git a/modules/cms/classes/ThemeManager.php b/modules/cms/classes/ThemeManager.php index d3042e940..121627aa6 100644 --- a/modules/cms/classes/ThemeManager.php +++ b/modules/cms/classes/ThemeManager.php @@ -40,7 +40,8 @@ class ThemeManager /** * Flags a theme as being installed, so it is not downloaded twice. - * @param string $name Theme code + * @param string $code Theme code + * @param string|null $dirName */ public function setInstalled($code, $dirName = null) { @@ -55,7 +56,7 @@ class ThemeManager /** * Flags a theme as being uninstalled. - * @param string $name Theme code + * @param string $code Theme code */ public function setUninstalled($code) { @@ -89,7 +90,7 @@ class ThemeManager /** * Completely delete a theme from the system. - * @param string $id Theme code/namespace + * @param string $theme Theme code/namespace * @return void */ public function deleteTheme($theme) diff --git a/modules/cms/widgets/MediaManager.php b/modules/cms/widgets/MediaManager.php index 17b8adf31..3953a2eaf 100644 --- a/modules/cms/widgets/MediaManager.php +++ b/modules/cms/widgets/MediaManager.php @@ -671,12 +671,12 @@ class MediaManager extends WidgetBase protected function setSidebarVisible($visible) { - return $this->putSession('sideba_visible', !!$visible); + return $this->putSession('sidebar_visible', !!$visible); } protected function getSidebarVisible() { - return $this->getSession('sideba_visible', true); + return $this->getSession('sidebar_visible', true); } protected function itemTypeToIconClass($item, $itemType) @@ -1020,10 +1020,10 @@ class MediaManager extends WidgetBase /** * Creates a slug form the string. A modified version of Str::slug * with the main difference that it accepts @-signs - * @param string + * @param string $title * @return string */ - protected function cleanFileName($name) + protected function cleanFileName($title) { $title = Str::ascii($title); @@ -1083,7 +1083,8 @@ class MediaManager extends WidgetBase 'url' => $url, 'dimensions' => $dimensions ]; - } else { + } + else { // If the target dimensions are provided, resize the original image and return its URL // and dimensions. @@ -1107,7 +1108,8 @@ class MediaManager extends WidgetBase 'dimensions' => $dimensions ]; } - } catch (Exception $ex) { + } + catch (Exception $ex) { if ($sessionDirectoryCreated) @File::deleteDirectory($fullSessionDirectoryPath);